My Opera is closing 1st of March

Croquemichette

Un blog qui veut dire tellement de choses...

New major version of WOT for Opera : you can vote !

, , , , , , ,

Hi there !

So, after a few minor versions, I release a major version (with only a 0.01 in the version number) : 0.93.

Voting system


This version contains new things (of course...), in particular a voting system. In fact, it's a quite simple system. When you click on the WOT icon (see the cursor on the screenshot), an iframe opens so you can vote for a link or a website :


Then, a wonderful iframe opens (its size depends on the width of the window) :


Danger ! Danger ! High voltage !


In the original WOT addon, you can configure WOT to display a warning when the website you're about to visit is dangerours/unsafe or however you define it.

In this UJS, you can now enable this feature (disabled by default), and specify the security level.

There's one constant to enable (B_DISPLAYWARNING must be set to true).
And one constant to set security level (N_SECURITY_LEVEL). This security goes from 1 to 5 (1 = dangerous, 2 = not safe, 3 = not sure, 4 = alright 5 = trusted). You will get a warning for every link you click whom domain has a score under the one you specify.

Here is how it looks :


New search engines, and social bookmarking services


Here is the list :


ToDo List


  • Updater : Replace the popup by a DOM element (quite difficult, I still haven't found a way to do it)
  • Add a configuration window (size of the WOT logo, default language, disable/enable updater, check current website, etc.).


If you have any ideas of what I could add to this UserJS, just say so ninja
If you want to report bugs, do it through this post.

This UserJS is available here, here or via the update checker.

========================================================================
Salut les jeunes !

Bon, après quelques versions mineures, je sors une version majeure (avec seulement +0.01 dans le numéro de version) de ce UJS : 0.93.

Cette version contient de nouvelles choses (normal quoi...), en particulier le système de votes. En fait, c'est un système relativement simple. Lorsque vous cliquez sur le logo de WOT (voir le curseur sur la capture d'écran), une iframe s'ouvre pour que vous puissiez voter :


Puis, une superbe iframe s'ouvre (sa taille dépend de la largeur de la fenêtre) :


Danger ! Danger ! High voltage !


Dans l'extension officieille de WOT, il est possible de le configurer pour qu'il affiche un avertissement lorsque vous êtes sur le point de visiter un site potentiellement dangereux.

Dans ce UJS, vous pouvez activer la même fonctionnalité (désactivée par défaut), et configurer un niveau de sécurité.

Il y a un constante pour activer l'avertissement (B_DISPLAYWARNING doit être initialisé à "true").
Et une autre constante pour le niveau de sécurité (N_SECURITY_LEVEL). La sécurité va de 1 à 5 (1= dangereux, 5 = sûr). Vous recevrez un avertissement pour chaque lien sur lequel vous cliquez dont le domaine a une note inférieure à celle définie.

Voilà à quoi ressemble cet avertissement :


Nouveaux moteurs de recherche, sites communautaires


Voici la liste :


À faire


  • Système de mise à jour : remplacer la popup par un élément du DOM (j'ai du mal pour ça...)
  • Ajouter une fenêtre de configuration (pour régler la taille du logo WOT, langue par défaut, activer/ou non les mises à jour, etc.).


Si vous avez des idées qui pourraient être intégrées à ce UJS, n'hésitez pas à le dire ninja
Si vous souhaitez rapporter des bogues, faites-le dans ce sujet.

Ce nouveau JS est disponible ici, ici ou via le système de mise à jour.

A few benchmarks of Opera 10.50 on Debian SqueezeStill WOT :)

Comments

QuHno Tuesday, January 26, 2010 7:39:51 PM

First test went fine, it works yes

Could you add a visual hint, that the WOT Symbol at the scorecard is clickable?
I plan to install the script on some computers and just tested it with a non JS experienced user. She didn't get it in the first run.

There are some minor issues:

In the German version seems to be too little space for the buttons in the warning screen, the go button is under the back button,
 var divWarningAttributes = {"style": "width:35em;
(line 1161) solved that minor "issue" for me smile

const S_EXCLUDEDDOMAINS = "(overture\.com|mywot\.com)";
(line 163) doesn't work in the rating iframe when
const B_CHECKCURRENTSITE = true;
(line 149) with all @includes are deleted. Adding those two domains as @exclude seems to work so far...

DaringineerQuadunit404 Tuesday, January 26, 2010 9:01:13 PM

I was going to say that it wasn't working when I configured it, but now it does.

Anyway, this new version of the script is beginning to work a lot like the official WOT add-on for Firefox and Chrome extension. It's configurable, it blocks access to bad sites, it supports almost everything, although it still doesn't add the WOT logo over every image on Google Images...

That, my friend, is something the official WOT does (How do I know? Because I installed the WOT extension for Chrome in SRWare Iron 4.0.275.3 and it places a tiny WOT logo over each image. If you want I'll take a screenshot as reference.)

QuHno Tuesday, January 26, 2010 9:12:10 PM

Originally posted by Quadunit404:

although it still doesn't add the WOT logo over every image on Google Images...


That would be nice, but I believe it would break when you use the googleimages-thumblink userJS, that changes the page code into direct links to the images and to the webpage without the google frames.

I solved it by opening dragonfly and looking for the selector of my modified thumblink script and added it to the O_SITES - it works screenshotsmile

Now, with the new selector parsing, it is easy enough even for me to add own selectors - very nice PH` wine

Fix YLulu64 Tuesday, January 26, 2010 9:22:32 PM

A comma is missing after this line:

{"name": "yebol", "domain": "^https?://(.+)?\.?yebol\.", "selector": "table[class$=title_box] a[class$=st]"}



The lang detection messing up the url by adding an extra "hu" (in my case) to the links -> .../en/hu/scorecard...

And if you use oAutoPagerize, only the first page is changed by the script.

PHcphr666 Tuesday, January 26, 2010 9:43:56 PM

Thanks for your feedbacks.

Originally posted by QuHno:

In the German version seems to be too little space for the buttons in the warning screen, the go button is under the back button,

 var divWarningAttributes = {"style": "width:35em;


I'll try that out, thanks smile
And I don't understand what follows bigsmile

Originally posted by Quadunit404:

If you want I'll take a screenshot as reference


Yes, thanks, I would appreciate that smile


Originally posted by Lulu64:

A comma is missing after this line:


Hum, you're right. It'll be online soon.

Originally posted by Lulu64:

And if you use oAutoPagerize, only the first page is changed by the script.


On what site ? Google ? I don't have any problems cat

Fix YLulu64 Tuesday, January 26, 2010 9:58:19 PM

metude Tuesday, January 26, 2010 9:59:32 PM

up

PHcphr666 Tuesday, January 26, 2010 10:06:05 PM

Originally posted by Lulu64:

http://img192.imageshack.us/img192/3863/wot00.jpg



But it isn't site specific.


Weird... I don't have this problem with oAutoPagerize 1.4.0 : http://files.getwebb.org/index.php?mode=view&id=cre66fgl

QuHno Tuesday, January 26, 2010 10:12:09 PM

Originally posted by PH`:

And I don't understand what follows :D


See:
Screenshot
my modified WOT script.

Those examples are better than my descriptions bigsmile

PHcphr666 Tuesday, January 26, 2010 10:12:54 PM

Fix Y, do you have any JS errors regaring this UJS in the console (Tools > Advanced > Error console) ?

PHcphr666 Tuesday, January 26, 2010 10:13:59 PM

Originally posted by QuHno:

Those examples are better than my descriptions :D


Yes, you're right... Weird ninja

Edit : In fact, it's normal by seeing the code. It only removes excluded domain from search results bigsmile
I think I should change that.

QuHno Tuesday, January 26, 2010 10:20:42 PM

BTW: Errors in the JS Console:

When I resize the Opera window by clicking on the maximize button, I get this one:
JavaScript - http://www.google.com/search?hl=de&q=serialz&btnG=Suche&lr=&aq=f&oq=
Event thread: resize
Error:
name: TypeError
message: Statement on line 1144: Cannot convert undefined or null to Object
stacktrace:   Line 1144 of User JS script 
    			document.getElementById("wot_transparentiframe").style.width = (document.documentElement.clientWidth+20) + "px";
But the script still works...

PHcphr666 Tuesday, January 26, 2010 10:21:16 PM

New version online : 0.935.


* Missing comma after yebol definition
* Change width of the warning element
* Don't check current website if this website is in S_EXCLUDEDDOMAINS

PHcphr666 Tuesday, January 26, 2010 10:26:15 PM

Originally posted by QuHno:

When I resize the Opera window by clicking on the maximize button, I get this one:


Reproduced. I still don't get how works removeEventListener sad

QuHno Wednesday, January 27, 2010 5:44:29 AM

Originally posted by PH`:

I still don't get how works removeEventListener


Does this Link help? (look for arguments.callee)

If I'm not wrong, you use an anonymous function to call it. If you don't maintain a reference to the function object, then there is no way to remove a listener from the outside - AFAIK

Fix YLulu64 Wednesday, January 27, 2010 6:02:57 AM

Originally posted by PH`:

Fix Y, do you have any JS errors regaring this UJS in the console (Tools > Advanced > Error console) ?


No errors. I use Opera 10.50.3206 (latest beta).

QuHno Wednesday, January 27, 2010 6:23:52 AM

Just tested: The updater fires on every page I visit (as intended) when I have cookies disabled, decline the update and have set the option
const B_CHECKCURRENTSITE = true;


Disabling the automatic updater when enabling that option and showing a link or button instead that calls the
DoCheckForNewVersion()
function when clicked could help to reduce your server load ...

I think I've checked at least 10 times in less than one minute during the test wink

PHcphr666 Wednesday, January 27, 2010 7:55:06 AM

Yeah, I could add some sort of button in the WOT ratings to update manually.

PHcphr666 Wednesday, January 27, 2010 8:09:10 AM

I think I'm gonna do this :
- Add three buttons just under the results of WOT (the popup). 1 to update, 1 to score, 1 for information (WOT client, blablabla).

Mağruf ÇolakoğluZAHEK Wednesday, January 27, 2010 9:47:45 PM

Hi PH,
Thanks for new js. I tried it but take an error as picture??
http://img718.imageshack.us/img718/3120/20100127234637.jpg

QuHno Thursday, January 28, 2010 8:53:48 AM

@z@h3k:

When you click at
http://mywot.com/
does the address change in the address bar to a country specific URL (like i.e. mywot.com/de in my case)?

The selection of the scorecard URL depends on the language settings of your Opera. It is possible that the WOT people didn't do the translation for your language (tr?) yet, so the mywot.com/yourTLD/ does not exist for your country.

Here you can see the currently supported languages:
http://www.mywot.com/select_language


EDIT:
I just tested it: If I delete the /de in my scorecard URL, I am redirected to the right rating URL with /de in between, too, so I've changed the following line in the script
const WOT_URL = "http://www.mywot.com/" + s_Lang + "/scorecard/";
to
const WOT_URL = "http://www.mywot.com/scorecard/";

and I am still redirected to the right scorecard. May be it works in your case too ...

Ichann Sunday, January 31, 2010 5:54:33 PM

// If score of a domain is lower than this value, it will wisplay a security warning

Mmmmmm. Wisplay.

PHcphr666 Sunday, January 31, 2010 8:52:05 PM

It's a new word smile

DaringineerQuadunit404 Sunday, January 31, 2010 9:09:58 PM

lol I hadn't even seen that before. Anyway, I corrected it.

Also, I set the security level to 4, and it doesn't block yellow sites, only orange and red ones. Yes, I do have B_DISPLAYWARNING set to true.

PHcphr666 Monday, February 1, 2010 2:50:05 PM

Oh, right. I forgot to replace the number in the code by the constant XD

QuHno Monday, February 1, 2010 5:10:39 PM

SHIFT happens bigsmile

BTW: Did you see that? Would be nice to have in v10.10 or better since v7.xx - could have spared the cookie trouble ...

PHcphr666 Monday, February 1, 2010 8:54:07 PM

I'll do that when Opera 10.50 will be in final version smile

NicolasNickko Tuesday, February 2, 2010 2:38:38 PM

3 remarques :
- Chez moi la bouton "close" n'est pas centré sous l'iframe.
- Lorsque j'affiche l'iframe avec le panel ouvert et que je ferme le panel, le fond gros n'est pas assez large, je suppose qu'il faudrait rafraichir la page en cas de redimensionnement de la fenêtre mais je ne sais pas si on peut détecter ça.
- J'ai trouvé par hasard qu'il fallait cliquer sur le logo pour ouvrir l'iframe.
En cliquant sur le logo je m'attends plutot à voir la page d'accueil de l'application.
Pourquoi ne pas afficher un lien plus explicite, par exemple "plus de détails" / "more details".

PHcphr666 Tuesday, February 2, 2010 2:45:15 PM

Re Nico,

Les points que tu as mentionnés sont en cours de refonte.
Tu peux jeter un oeil à une proposition de QuHno. Le résultat sera très proche de cela : http://quhno.internetstrahlen.de/myopera/wot/

DaringineerQuadunit404 Wednesday, February 3, 2010 8:35:11 PM

Using Opera 10.50 build 3218, doesn't seem to work. It worked just fine in Opera 10.10.

QuHno Thursday, February 4, 2010 4:54:04 AM

Can't confirm, works fine here with 3218 under Win XP and 7.
Did you check the userjs settings after installing 3218?

DaringineerQuadunit404 Thursday, February 4, 2010 5:14:04 PM

Oh, of course, I aimed the UJS options in the Preferences window at a different folder doh

Now it's working.

Dennis TardioTardio Friday, February 5, 2010 12:24:10 PM

Just want to say good job, nice Js for Opera !

Merci, en plus tu es Français, ca fait plaisir smile

fmerel Sunday, February 7, 2010 1:14:36 PM

how to use that?

QuHno Sunday, February 7, 2010 1:26:35 PM

See here:

To enable user JavaScript, use Tools > Preferences > Advanced > Content > JavaScript options, and select the directory where you will put your User JavaScript files. Opera will load all files in the specified directory whose names end with .js and will use them as User JavaScript files.



Afterwards you just put the downloaded wot.js file into that folder.
You can edit the preferences of the script with any good text editor like i.e. Notepad++. To edit just open it with the editor and look for the comments to see where it is save to change things.

If you have Javascript enabled during your browsing session, you will see the WOT ratings like in the screenshots above at all supported sites.

Mağruf ÇolakoğluZAHEK Monday, February 8, 2010 3:07:38 PM

Originally posted by QuHno:

@z@h3k: When you click at http://mywot.com/ does the address change in the address bar to a country specific URL (like i.e. mywot.com/de in my case)? The selection of the scorecard URL depends on the language settings of your Opera. It is possible that the WOT people didn't do the translation for your language (tr?) yet, so the mywot.com/yourTLD/ does not exist for your country. Here you can see the currently supported languages: http://www.mywot.com/select_language EDIT: I just tested it: If I delete the /de in my scorecard URL, I am redirected to the right rating URL with /de in between, too, so I've changed the following line in the script

const WOT_URL = "http://www.mywot.com/" + s_Lang + "/scorecard/";
to
const WOT_URL = "http://www.mywot.com/scorecard/";
and I am still redirected to the right scorecard. May be it works in your case too ...

Quote


Sory,doesn't work this.

Write a comment

New comments have been disabled for this post.