The script can be downloaded from :: http://userscripts.org/scripts/show/6499
Changing the "Megashare" function with the following will make the script stop at the password prompt, if the file is protected by password. Otherwise it goes in an intfinite loop ...
function megashare(tld){ if (tld!='com') return; try { unsafeWindow.c=0; } catch(e){}; unsafeWindow.setTimeout( function() { try { //var urlLink = getFirstXPathResult("//input[@name='auth_nm']"); var urlLink = getFirstXPathResult("//*[contains(text(), 'Enter Password')]"); if(!urlLink){ findClick("//input[@value='Click Here to Download']"); } } catch(e){} }, 1000); try { findClick("//input[@name='FreeDz']"); } catch(e){}; try { findClick("//input[@name='yes']"); } catch(e){}; }