vcv Posted April 23, 2005 Share Posted April 23, 2005 There is an infamous "bug" where you can't empty junkmail in hotmail when using Opera because of Hotmail sending different code to opera. With Opera8, you can have "user javascript" files that will execute on whatever sites you define. So using this, I have attempted to write code to fix this infamous bug simply by dropping this js file in your userjs folder (defined in prefs > advanced > content > javascript options...). Here it is. I don't really use hotmail, so I had no junkmail.. but it seems to work from what I could see. Any brave souls want to try it out? // ==UserScript== // @include http://*.hotmail.com/* // @include http://*.hotmail.msn.com/* // ==/UserScript== window.opera.defineMagicVariable( 'ie', function (curVal) { return true; }, function (newVal) { if(!newVal) { window.status = 'Repairing script'; } } ); window.opera.defineMagicFunction( 'CloseModal', function( real, thisObject, fv ) { if( thisObject == window ) { var frm = window.opener.document.hotmail; if (frm.rj.checked) R = 2; else R = 1; var jmfAct = 'delete'; if (R==2) { frm.rj.value="yes"; frm.ReportLevel.value="1"; frm._HMaction.value=jmfAct; //if (jmfAct=='doEmpty') frm.DoEmpty.value="1" frm.submit(); } else if (R==1) { frm.rj.value="no"; frm.ReportLevel.value="1"; frm._HMaction.value=jmfAct; //if (jmfAct=='doEmpty') frm.DoEmpty.value="1" frm.submit(); } window.close(); return false; } else { return real.apply( thisObject, arguments.slice(2) ); } } ); Save this to a .js file and drop it in the proper folder. Link to comment Share on other sites More sharing options...
ign.des Posted April 23, 2005 Share Posted April 23, 2005 I tried this js. I clicked on the Empty button. A javascript window popped up. I clicked OK. The js window disappeared and the page refreshed, but nothing happened. Link to comment Share on other sites More sharing options...
vcv Posted April 23, 2005 Author Share Posted April 23, 2005 Sorry. Here is the working code: // ==UserScript== // @include http://*.hotmail.com/* // @include http://*.hotmail.msn.com/* // ==/UserScript== window.opera.defineMagicVariable( ? ?'ie', ? ?function (curVal) { return true; }, ? ?function (newVal) { if(!newVal) { window.status = 'Repairing script'; } } ); window.opera.defineMagicFunction( ? ?'CloseModal', ? ?function( real, thisObject, fv ) { ? ?if( thisObject == window ) { ? ? ? ?var frm = window.opener.document.hotmail; ? ? ? ?if (frm.rj.checked) ? ? ? ? ? ?R = 2; ? ? ? ?else ? ? ? ? ? ?R = 1; ? ? ? ?var jmfAct = 'delete'; ? ? ? ? ? ? ? ?checkAll(); ? ? ? ?if (R==2) ? ? ? ?{ ? ? ? ? ? ?frm.rj.value="yes"; ? ? ? ? ? ?frm.ReportLevel.value="1"; ? ? ? ? ? ?frm._HMaction.value=jmfAct; ? ? ? ? ? ?frm.DoEmpty.value="1" ? ? ? ? ? ?frm.submit(); ? ? ? ?} ? ? ? ?else if (R==1) ? ? ? ?{ ? ? ? ? ? ?frm.rj.value="no"; ? ? ? ? ? ?frm.ReportLevel.value="1"; ? ? ? ? ? ?frm._HMaction.value=jmfAct; ? ? ? ? ? ?frm.DoEmpty.value="1" ? ? ? ? ? frm.submit(); ? ? ? ?} ? ? ? ?window.close(); ? ? ? ?return false; ? ?} ? ?else { ? ? ? ?return real.apply( thisObject, arguments.slice(2) ); ? ?} ?} ); function checkAll() { ? ?var trk=0; ? ?var frm = window.opener.document.hotmail; ? ?for (var i = 0; i < frm.elements.length; i++) ? ?{ ? ? ? ?var e = frm.elements[i]; ? ? ? ?if ((e.name != 'allbox') && (e.type=='checkbox')) ? ? ?:)?{ ? ? ? ? ? ?trk++; ? ? ? ? ? ?e.checked = "checked"; ? ? ? ?} ? ?} } Tested and it works :) Link to comment Share on other sites More sharing options...
Toxicfume Veteran Posted April 23, 2005 Veteran Share Posted April 23, 2005 Yup, it does work :) Great job. This is pretty neat, opens up a big potential for what Opera can do. Link to comment Share on other sites More sharing options...
Chode Posted April 23, 2005 Share Posted April 23, 2005 Or else you can use my trick which I listed further down the forum: https://www.neowin.net/forum/index.php?showtopic=311156 Link to comment Share on other sites More sharing options...
Rix Posted April 23, 2005 Share Posted April 23, 2005 Yey, cheers :) Link to comment Share on other sites More sharing options...
LeNath Posted April 23, 2005 Share Posted April 23, 2005 Works perfectly, Thanks for sharing! Pity one has to go thru such methods to browse properly though! Link to comment Share on other sites More sharing options...
vcv Posted April 24, 2005 Author Share Posted April 24, 2005 Works perfectly, Thanks for sharing!Pity one has to go thru such methods to browse properly though! 585819545[/snapback] Yeah, but it's not Operas fault. They at least provide a way to fix it. Link to comment Share on other sites More sharing options...
LeNath Posted April 24, 2005 Share Posted April 24, 2005 Yeah, but it's not Operas fault. They at least provide a way to fix it. 585821789[/snapback] Yeah, that's what i meant... Link to comment Share on other sites More sharing options...
max84 Posted April 24, 2005 Share Posted April 24, 2005 Thanks a bunch. Finally I can replace IE completly. This is definately better than FireFox. Link to comment Share on other sites More sharing options...
worbd Posted April 25, 2005 Share Posted April 25, 2005 There's an easier way... Add hotmail.msn.com=4 to your ua.ini. Link to comment Share on other sites More sharing options...
biorK Posted April 25, 2005 Share Posted April 25, 2005 This works great and this is know bookmarked :) Thanks a lot vcv! (Y) Link to comment Share on other sites More sharing options...
uniacidz Posted April 28, 2005 Share Posted April 28, 2005 Opera 8 works for me anyway. No need for the above. Thats for 7.XX as far as i know. Link to comment Share on other sites More sharing options...
Techno_Funky Posted April 29, 2005 Share Posted April 29, 2005 lovely man thanks a lot for this :) Link to comment Share on other sites More sharing options...
xzor9 Posted April 29, 2005 Share Posted April 29, 2005 Ah, I've been looking for a fix for hotmail =) It works great, thanks! Link to comment Share on other sites More sharing options...
yisman Posted May 4, 2005 Share Posted May 4, 2005 This is what I'm using: Version 7.54u2 Build 3929 Platform Win32 System Windows XP I can't seem to locate the Preferences. Where is it located? Thanks Link to comment Share on other sites More sharing options...
uniacidz Posted May 4, 2005 Share Posted May 4, 2005 erm, tools menu/preferences. Why dont you upgrade to Opera 8, free upgrade for Opera 7.x users. Opera 8, the problem in Hotmail is fixed. Link to comment Share on other sites More sharing options...
yisman Posted May 5, 2005 Share Posted May 5, 2005 Where on the Opera website should I upgrade? thanks Link to comment Share on other sites More sharing options...
megamanXplosion Posted May 5, 2005 Share Posted May 5, 2005 Where on the Opera website should I upgrade? thanks 585874324[/snapback] uhhh... the download page? :blink: Link to comment Share on other sites More sharing options...
yisman Posted May 5, 2005 Share Posted May 5, 2005 Yeah. I was asking whether I just download the whole thing, or if there was an update function. I guess I just download over the top. Link to comment Share on other sites More sharing options...
Recommended Posts