The end of a story...
Friday, October 15, 2010 7:54:58 AM
Pour ceux qui ne le savent pas encore, Opera 11 supportera les extensions. Une des premières extensions sera WOT.
For those who don't know yet, Opera 11 will support addons. One of the first will be WOT.
Une fois qu'Opera 11 et cette extension seront disponibles, je vous conseille de les utiliser et de dire adieu à mon UserJs
Once Opera 11 and this addon will be available, I suggest you to use it and say good bye to my UserJS.
For those who don't know yet, Opera 11 will support addons. One of the first will be WOT.
Une fois qu'Opera 11 et cette extension seront disponibles, je vous conseille de les utiliser et de dire adieu à mon UserJs

Once Opera 11 and this addon will be available, I suggest you to use it and say good bye to my UserJS.












QuHno # Friday, October 15, 2010 10:21:55 AM
Thank you for all your efforts to give us the UserJS!
It was fun as long as it lasted, but don't despair:
Some Opera users will still need your services in the future
Those poor Mac PowerPC users will never come into the situation to use the WOT extension, because 10.6x is the last version that supports that processor architecture ...
BTW: Extensions are written in JS too (+ a little bit more stuff around, but that doesn't count much, the main work is done by the JS), I hope they didn't copy shamelessly parts of your code without giving credit
PHcphr666 # Friday, October 15, 2010 12:12:11 PM
Originally posted by QuHno:
I don't think so, it sucked
I'm better now
j.Paradiseparadj # Thursday, October 21, 2010 11:39:37 AM
et depuis Opera 11 est pas tout à fait ici pour l'instant ..
Je vais continuer à l'utiliser ...
comme il l'a sauvé mes fesses de plus d'un site de Troie.
I too want to Thank you for your talents with WOT for Opera
and since Opera 11 isn't quite here yet..
i'm going to keep using it...
as it has saved my butt from many a trojan site.
QuHno # Thursday, October 21, 2010 12:06:24 PM
Originally posted by PH`:
Write an extension, I would suggest a WOT extension because there ain't one
It is like the widgets API, with xhdr and script storage, should be a piece of cake for you
Arun Kumarmarunkmr # Monday, October 25, 2010 12:08:56 PM
Originally posted by QuHno:
Ya you should do that because you have great programming skills..
PHcphr666 # Monday, October 25, 2010 3:58:08 PM
Arthur WilkinsonGT500 # Thursday, June 16, 2011 10:57:02 PM
Disabling the only other UserJS I have installed doesn't make a difference. Issue is definitely caused by the WOT script... I guess I have to decide whether or not I want to live without WOT. I don't need it for work anymore, so its not as big of a deal these days.
Edit: After further YouTube usage, I've noticed that the issues are not completely gone. YouTube works a lot better without the WOT script, but I'm still having occasional issues. Maybe I'll just install Fedora in a VM and use Konqueror.
PHcphr666 # Tuesday, August 9, 2011 9:51:24 PM
You can try to disable the script on Youtube.
At the top of the script, you should see a lot of @include.
After all these includes, add a new line :
@exclude http://*youtube.com/*
That way, the script will be disabled on Youtube
QuHno # Saturday, August 20, 2011 7:51:05 PM
... and your script needs a small update for one of the major search engines - the crap thing with instant, you know?
I know at least one Apple user who still needs the userJS because he has an old, but reliable PPC and can not update to Opera 11 because Opera decided not to make a PPC version ...
PHcphr666 # Tuesday, August 23, 2011 7:40:03 AM
I know, and I still use mine
Hum... I thought no one uses Google
QuHno # Tuesday, August 23, 2011 9:44:49 AM
Originally posted by PH:
*I* don't use it if possible and I know how to shut that instant crap off without disabling JS generally
... but Google has a market share of 99% for searches here (really!) and the script breaks with the new Bing images too ...
PHcphr666 # Tuesday, August 23, 2011 8:28:22 PM
Then, I could listen to the right events, and call WOT.
It needs some time
I could try.
QuHno # Wednesday, August 24, 2011 4:51:07 AM
... but may be just listening to changes of the body or the results container and restarting the script after a change could be enough, may be with a little timeout, to avoid too many repetetive restarts ...
Bing image search: Tapping the scroll event and restarting the script afterwards could work too. Bing seems to load the new contents as soon as you stop scrolling. (funny side effect if I use an auto-scroller: No reloads before I don't stop auto-scrolling, I have to stop it to get the new results
QuHno # Monday, October 31, 2011 2:30:47 PM
http://userscripts.org/scripts/review/105887
prototypes the XMLHttpRequest and seems to work quite fine, so the "simple" way should be enough. Could work on bing images and other AJAXian pages too ...
PHcphr666 # Friday, November 4, 2011 11:14:11 AM
Originally posted by QuHno:
I tried that, but DOMNodeInserted and DOMSubtreeModified didn’t fire anything
QuHno # Friday, November 4, 2011 6:09:35 PM
In 11.60 or 12 they fire but that wouldn't help the Mac PPC users because they can't use 11 or 12. Prototyping works in the 10 series too, so that seems to be the way to go.
QuHno # Thursday, January 5, 2012 12:44:13 AM
Tapping XMLHttpRequests works without breaking the pages!
See my clumsy solution:
http://my.opera.com/QuHno/blog/2012/01/05/tapping-xmlhttprequests
I watched the error console during several surf sessions and looks as if it should be safe to use the .apply() method.
Just one ouestion, because your script is quite complicated (for me):
Is it enough to call from the tapping script to restart the WOT script? (just as a quick hack, to get it working with those pesky AJAX pages like Google Instant and Bing Images etc.) or are further actions needed?
I thought about an additional timeout, that can be re-triggered to avoid too many calls to the API, but I don't know if that is really necessary ...
QuHno # Friday, January 6, 2012 9:41:29 AM
I experimentally added the above mentioned code to the modified WOT script version and it seems to work so far
... but the changed code really needs a JS expert review, my changes look awfully out of place and I am sure that there is a lot room for improvement
The script is here
PHcphr666 # Wednesday, January 11, 2012 7:07:08 PM
I read what you did to the XMLHttpRequest object. It’s not bad, but I think you can do better.
XMLHttpRequest.prototype.nativeOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(method, url, async, user, password) { // your modifications this.nativeOpen(method, url, async, user, password); }That way, you don’t have to use the apply method, and work in this scope. I did it for another script.
Originally posted by QuHno:
I guess so. It restarts the browsing of the new content. That’s what I call it everywhere in the script.
PHcphr666 # Wednesday, January 11, 2012 7:19:00 PM
Because when you do that, you modify the global native object (userd by the page, other scripts, etc.).
So, in your example, you modify the object, and if some code makes an XHR request, it’ll call startBrowsing. Whatever the query is, and the content it needs to retrieve. So I guess you should filter the call of startBrowsing only to known URL (Google Instant & Bing).
QuHno # Thursday, January 12, 2012 5:13:49 AM
btw: I don't fully understand the code you wrote for the nativeOpen, so a question if I guess right:
Am I right that by writing
the the whole XMLHttpRequest.open method and it's occurring events are added as new nativeOpen method of the same XMLHttpRequest object?
If yes:
What is the advantage of doing this over assigning the prototype's method only to a plain variable, as I did?
(function(){ var open = window.XMLHttpRequest.prototype.open; /*here the rest of it */ return open.apply(this, arguments); })()If not:
Could you please post a link where I can read up how it works? (Or, if it is short and easy enough to explain, explain it here?)
I looked through some documentation but didn't find anything that made clear to me, what the benefit of your method is, apart from being able to use this instead of apply(this, arguments). As I see it, you just add a second open method to the basic prototype in the global context. It could still cause conflicts if someone decides to do the same thing with the same name on his website, or am I wrong? "var open = foo;" on the other hand should stay inside the local scope of the enclosing function (especially if it is an anonymous function) and not be directly accessible from the outside AFAIK.
About filtering:
Good point, may be I should filter the overwrite too, so that it doesn't even start on pages where it shouldn't.
... apart from that, the rating that should pop up when hovering over the circle doesn't show up with my modification (or one of the many Google did lately) and I don't find the reason for it ...
PHcphr666 # Thursday, January 12, 2012 10:11:48 PM
How can I say it... It’s really hard to explain.
I’d say the call of the .apply, in this case, is just a hack. It’s usually used on DOM events.
For example, when you listen an event on a DOM node (let’s say click), you’do :
previousFunction : function() {}, aLambdaMethodInAObject : function() { myNode.addEVentListener("click", function(e) { this.myClickFunction(e); }, false); }, myClickFunction : function(e) { alert(e.keyCode); }, nextFunction : function() {}If you do that, myClickFunction’ll be called in the scope of myNode. It’ll fail cause there’s no myClickFunction in myNode.
To prevent this from happening, you could create a hitch function (You can read a code example here from Dojo) :
previousFunction : function() {}, aLambdaMethodInAObject : function() { myNode.addEVentListener("click", hitch(this, "myClickFunction"), false); }, myClickFunction : function(e) { alert(e.keyCode); }, nextFunction : function() {}This hitch function calls the method you specified in the scope you specified, with all arguments. That’s what you did in your experimental code.
But, when you have a tool like the prototype property, I suppose you can’t use this hack (in your case, for me, it’s a hack), it’s against nature
It’s just like when you create an object from scratch. :
// Just declare a class function myClass(a, b) { this.propertyA = a; this.propertyB = b; } // Add functions to it myClass.prototype.render = function() { alert(this.propertyA + " / " + this.propertyB + "\n"); } // Instanciate it var zz = new myClass(12, 13); zz.render()I hope it helped