javascript - WOT Bookmarklet -


I am trying to write a bookmark that I would like to see for all the links on a page before rating them. Will allow. While WOT offers its bookmarklet, this is not very useful because you need to go to the page before viewing the rating. It will be used on Symony, so I can not just install the WOT extension, either.

In WOT there is such a page on which it is included but allows the rating to be activated, so I am using it as a base, however, as a bookmarklet It does not seem to work correctly. Here is an attempt where I could possibly try to keep the code close to ADI. I've only modified the watcases function so that it works in a bookmarklet and added a timeout so that the rating widget can not be loaded before jQuery.

  var wotprotocol = (document.location.protocol == "https:")? "Https: //": "http: //"; Var votebase = voteprotocol + "api.mywot.com/widgets"; Var wotinject = function (src) {document.body.appendChild (document.createElement ("script")). Src = wotbase + "/" + src + ".js"; }; Var Votejquery = Typef (jQuery)! = "Undefined"; If (Wotjquery) {wotinject ("jquery"); } Zero (window.set timeout (Watinjet, 200, "ratingwidgett"));  

I can see the API loading in the status bar, but it does nothing. Is there any way to do this work?

I'm not sure that this answers your question, but I use a bookmarklet in production I do jQuery which loads this code works well for me:

  load = function () {load.getScript ("http://ajax.googleapis.com/ajax/ Libs / jquery / 1.3.2 / jquery min.js "); Insert stuff on the end of jQuery when load.tryReady (0); } Load.getScript = function (filename) {var fileref = document.createElement ('script'); Fileref.setAttribute ("Type" "Text / JavaScript"); Fileref.setAttribute ("src", file name); If (typeof fileref! = "Undefined") document.getElementsByTagName ("head") [0] .appendChild (fileref); } LoadTryReady = function (time_elapsed) {/ * Continuous choice for the jQuery library * / If (typeof $ == "undefined") {if (time_elapsed & lt; = 5000) {setTimeout ("load.tryReady (" (Time_elapsed + 200) + ")", 200); } And {warnings ("The time jquery loading jQuery."); }} And {/ *********** JQUERY is now loading, put code here ********************************************* *****} Load ();  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -