WOT for Opera
Friday, November 13, 2009 10:06:39 PM
Update : More details about the new version

This is my first post in this blog after about 2 years of subscription. Better late than never, right ?
I guess I won't say/write a lof of things in this blog, but I'll at least share some useful (I hope so...) User Javascript for Opera.
In this first post, I will share with you my first UserJS : WOT for Opera.
For those who don't know what's WOT (Web Of Trust), take a look at this website.
To summarize, WOT, using its members' contribution, gives a score of a website. In fact, it gives 4 scores :
- Trustworthiness : Can you trust this website ?
- Vendor reliability : Do you think you can buy on this website ?
- Privacy : Are you sure you can search porn on this website without being tracked ?
- Child Safety : Can kids go on this website ?
These scores go from 0 to 100. 0 suxx, 100 roxx

To simplify, you have 5 icons, from green to red :
- Green : 80-100
- Light green : 60-79,99
- Yellow : 40-59,99
- Orange : 20-39,99
- Red : 0-19,99
Let's now talk about this UserJS. It's made to work on various search engines. It will display the icon of the average score of the website ((sum of 4 previous scores)/4), at the left of the link in the search engine :

Hold over the mouse on the icon (you can change the size of the icons by modifying values of ImgWidth and ImgHeight), and you'll see details of the website :

If it's red, click at your own risk

It supports 24 search engines :
- Yahoo
- Exalead
- Ask
- Netscape
- AllTheWeb
- Altavista
- Bing
- Yebol
- Duck Duck Go
- Seek.fr
- Yauba
- Baidu
- Green Maven
- Ethicle
- Good Tree
- Ecocho
- Yandex
- Orange
- Le moteur
- Voila
- Clusty
- Dogpile
- Metacrawler
Any search engine can work with this UserJS. You just need to develop a parser

It will also display the score of the current website at the top right of the page. You can disable this by setting b_checkCurrentSite as false.
Supported languages are : English, French, Spanish, Italian, Deutsch, Turkish.
There's also an updater (since v0.9). It will check every 7 days (cookies must be enabled) if a new version is available.
If you want to try this UserJS, just download it.
If you want to add new translations or search engines in this UserJS, just say so, I'll see what I can do.
If you think it sucks, just say so. If you think it rocks, just say so.
See you for the next UserJS.












1 2 3 Next »
Evangelline # Friday, November 13, 2009 10:48:33 PM
João EirasxErath # Saturday, November 14, 2009 4:23:29 AM
dapxin # Saturday, November 14, 2009 9:13:15 AM
PHcphr666 # Saturday, November 14, 2009 11:01:59 AM
Originally posted by xErath:
That's what I wanted to do, but because of a callback function (Json), I can't. If you have an idea, let me know
blinkybill # Saturday, November 14, 2009 12:53:06 PM
I really like your wot js file but one thing
I noticed if you click on the coloured icon
beside the search result it takes you a wot
page in french.
Can it be made to go to the english site of wot?
cheers
blinky
João EirasxErath # Saturday, November 14, 2009 6:58:52 PM
Originally posted by PH`:
Wrap everything in an anonymous function, and export your function doing
window.m_func = blah; function blah(){ delete window.m_func; /*rest of code*/ }Also, you can use DOMContentLoaded instead of the load event, so your script will trigger when the dom is ready, but inlines are still loading.
Next, you can get the domain of a link by checking link.hostname. Opera 10 has a bug and reports the port on that property, but you can strip it using
PHcphr666 # Sunday, November 15, 2009 12:51:34 AM
I also set the listener to DOMContentLoaded, it makes the WOT icons show earlier, so let's say faster
dapxin # Sunday, November 15, 2009 3:38:09 AM
dapxin # Sunday, November 15, 2009 3:38:09 AM
QuHno # Sunday, November 15, 2009 6:56:15 PM
Hope you've got the strings for the German translation ...
Mağruf ÇolakoğluZAHEK # Sunday, November 15, 2009 9:02:58 PM
Mağruf ÇolakoğluZAHEK # Sunday, November 15, 2009 9:14:02 PM
http://search.yahoo.com/search?p=zahek&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-832
QuHno # Sunday, November 15, 2009 9:25:16 PM
and all other national altavistas too...
PHcphr666 # Sunday, November 15, 2009 10:19:19 PM
I've uploaded a new version with :
- Correction for Yahoo (thanks ZAHEK)
- @include for all supported search engines
- A few modifications in the code
You can download it at : http://files.myopera.com/PH`/UserJs/wot.js
Mağruf ÇolakoğluZAHEK # Monday, November 16, 2009 8:54:11 AM
http://www.operaturkiye.net/opera-ve-wot-ile-daha-guvenli-bir-internet
QuHno # Monday, November 16, 2009 1:19:58 PM
Originally posted by PH`:
Nearly the same as was with Yahoo - some links weren't tested, maybe the same problem as it was with Yahoo? I is basically the same search engine
But it seems, that only shown subpages in the results are not tested
PHcphr666 # Monday, November 16, 2009 1:48:00 PM
PHcphr666 # Tuesday, November 17, 2009 10:10:31 PM
0.4 (2009-11-17):
+ New language: Italian
+ New language: Spanish
+ New search engine www.dogpile.com
+ New search engine www.metacrawler.com
* Yebol: id "searchw_result" doesn't exist anymore. Replaced by document.getElementsByTagName("body")[0]. Class "st" replaced by "stw".
* All links from a same domain have now a WOT icon
dudekracked # Wednesday, November 18, 2009 2:28:11 AM
PHcphr666 # Wednesday, November 18, 2009 11:06:08 AM
0.5 (2009-11-18):
* WOT for Opera is now (almost fully) compatible with google-pager
* WOT icon at the top-right is now back if b_checkCurrentSite is true (only available in included domains)
BobJam # Thursday, November 19, 2009 9:15:47 PM
Is there a separate set of instructions for Linux? If so, I can't find them.
LinkDefender0fHyrule # Thursday, November 19, 2009 9:23:05 PM
PHcphr666 # Thursday, November 19, 2009 10:27:51 PM
Originally posted by BobJam:
I did it under Debian, so...
Create a directory "userjs" into /home/<user>/.opera
Put the script into this directory.
Then, in Opera, go to Tools > Preferences > Advanced > Content > Javascript Options, and set UserJS textbox as /home/<user>/.opera/userjs and restart Opera \o/
Originally posted by Defender0fHyrule:
I'll check this out.
BobJam # Friday, November 20, 2009 6:18:48 PM
Originally posted by PH`:
I got it to work doing that. The reason I didn't before was that the Opera instructions say "select the folder", not type it in.Thanks for the tip. Perhaps Opera could make a mention of the slightly different Linux method on the instruction page.
Originally posted by Defender0fHyrule:
If you are a registered WOT user, than this works: Go to the WOT site and log in, then when you go to the scorecard (by clicking on the WOT donut next to the link in the search), it will then show the "Edit my rating" link above the categories. You can click on that "Edit" link and then make your rating and then click on the "Save" button after you've made your ratings (by sliding the indicator in each category). The key to this is logging in.Sort of a roundabout way to do it, but I haven't found the WOT icon in a toolbar to do it that way, as you would say in FF.
Originally posted by PH`:
Don't see it. Is it on a toolbar, or does it create it's own toolbar?erikiscool # Sunday, November 22, 2009 6:56:28 AM
erikiscool # Sunday, November 22, 2009 6:58:44 AM
QuHno # Sunday, November 22, 2009 11:04:18 AM
Originally posted by erikiscool:
Why should it?If a site has i.e. a poor vendor reliability, it does no harm to my computer - and not clicking on a link with a red circle before it blocks quite thoroughly, I think
erikiscool # Sunday, November 22, 2009 7:54:26 PM
erikiscool # Sunday, November 22, 2009 7:55:22 PM
PHcphr666 # Monday, November 23, 2009 7:40:08 PM
Originally posted by Defender0fHyrule:
I guess, for now, I won't do it.
First : there is nothing about that in the WOT wiki.
Second : I don't know if you're logged on WOT when you're on Google.
DaringineerQuadunit404 # Tuesday, November 24, 2009 2:17:22 AM
QuHno # Tuesday, November 24, 2009 5:31:30 AM
Opera 10.10 b 1893 on XP, Vista and W7 ...
Suggestion: May be a "No WOT Response (timeout)" image as visible indicator would help? (if possible)
DaringineerQuadunit404 # Tuesday, November 24, 2009 5:33:39 AM
PHcphr666 # Tuesday, November 24, 2009 9:49:07 AM
Originally posted by Quadunit404:
I've just tried it. I have to copy/paste the content of the UserJS in UJS Manager, save it as wot.js to make it work.
Wasn't there a pop-up when document.location has ".js" in it to save it ?
DaringineerQuadunit404 # Tuesday, November 24, 2009 4:57:57 PM
PHcphr666 # Tuesday, November 24, 2009 5:50:02 PM
Check in your UserJS folder if this one has an extension ".js", or if exists.
DaringineerQuadunit404 # Tuesday, November 24, 2009 6:42:11 PM
That's what my UserJS folder looks like. When taking that screenshot wot.js had just happened to been highlighted
PHcphr666 # Wednesday, November 25, 2009 8:55:45 AM
DaringineerQuadunit404 # Wednesday, November 25, 2009 6:54:09 PM
PHcphr666 # Wednesday, November 25, 2009 9:13:57 PM
DaringineerQuadunit404 # Wednesday, November 25, 2009 11:06:36 PM
I'll try removing them and then disabling my YouTube scripts to see if that works.
UPDATE: Nope, disabling the YouTube scripts didn't work. Looks like I'll have to wait until I get a chance to finish setting up this WinXP VM and installing this UserJS in there to see if it makes a difference on whether I'm using the UJS Manager or not.
PHcphr666 # Thursday, November 26, 2009 9:00:29 PM
Check in the Error Console (Tools > Advanced > Error Console), maybe there's an error regarding my UJS.
DaringineerQuadunit404 # Friday, November 27, 2009 1:21:21 AM
What the error console says:
Syntax error C:\Users\Tom\Documents\UserJS\wot.js: line 983 of User JS script :
Expected token: '}'
window.wot_showHide = wot_showHide;
-------------------------------------^
PHcphr666 # Tuesday, December 1, 2009 9:11:23 PM
Thanks.
DaringineerQuadunit404 # Tuesday, December 1, 2009 9:56:53 PM
UPDATE: http://files.myopera.com/Quadunit404/files/wot.js
PHcphr666 # Wednesday, December 2, 2009 7:33:10 AM
You can just add this line at the end (after window.wot_showHide....) :
Luis RicardoLuRCon # Wednesday, December 2, 2009 8:14:27 AM
QuHno # Wednesday, December 2, 2009 9:45:14 AM
to
If you wat it to see it on other pages, you must edit the @include lines, too.
But you could use the WOT Button for checking every page you want manually...
opera:/button/Go%20to%20page,%22javascript%3A(function()%7Bvar%20f%3Ddocument.getElementById('wot-bookmarklet')%3Bif(f)%7Bf.parentNode.removeChild(f)%3Breturn%3B%7Dvar%20l%3Dlocation.hostname%3Bif(l%20%26%26%20l.length)%7Bf%3Ddocument.createElement('iframe')%3Bif(f)%7Bf.setAttribute('id'%2C'wot-bookmarklet')%3Bf.setAttribute('src'%2C'http%3A%2F%2Fwww.mywot.com%2Fbookmarklet%2F'%2BencodeURIComponent(location.hostname))%3Bf.setAttribute('frameborder'%2C0)%3Bf.setAttribute('scrolling'%2C'no')%3Bf.setAttribute('style'%2C'position%3Afixed%3Btop%3A10px%3Bleft%3A10px%3B'%2B'width%3A135px%3Bheight%3A235px%3Bborder%3A0%3Bmargin%3A0%3Bpadding%3A0%3Bz-index%3A10487575%3B')%3Bvar%20div%3Ddocument.createElement('div')%3Bdiv.setAttribute('id'%2C'wot-opera')%3Bdiv.setAttribute('style'%2C%20'position%3Afixed%3Btop%3A10px%3Bleft%3A10px%3B'%2B'width%3A135px%3Bheight%3A235px%3Bborder%3A0%3Bmargin%3A0%3Bpadding%3A0%3Bz-index%3A10487576%3Bopacity%3A0%3B')%3Bdiv.onclick%20%3D%20function()%7Bvar%20f%3Ddocument.getElementById('wot-bookmarklet')%3Bif(f)%7Bf.parentNode.removeChild(f)%3B%7Dvar%20div%3D%20document.getElementById('wot-opera')%3Bif(div)%7Bdiv.parentNode.removeChild(div)%3B%7D%7D%3Bif(document.body)%7Bdocument.body.appendChild(f)%3Bdocument.body.appendChild(div)%3B%7D%7D%7D%7D)()%3B%22,1,%22WOT%22,%22Trust%20Information%22Copy to address line, hit enter, drag the link of the error page to the toolbar you want...
It uses the Security Info graphic as button image.
DaringineerQuadunit404 # Wednesday, December 2, 2009 11:03:34 PM
Emil Albualbuemil # Thursday, December 3, 2009 12:43:31 PM
Any way to make it compatible with GoogleFX ?
If I use GoogleFX and have the numbers show up ("Show counter numbers") then the numbers are all wrong.
A solution would be to show the WOT icon after the text of the link (not in front of it like it is now), maybe add an option where to add the WOT icon.