Security alert. Cross Site Request Forgery. More info here, fixed release available. [25] (what's this?)
Security alert. Information Leakage and Privilege Escalation. More info here, fixed release available. [24] (what's this?)
New release available: 2009-12-25 "Lemming". upgrade now! [23] (what's this?)
New release candidate available: 2009-12-02 "Mulled Wine". upgrade now! [22] (what's this?)
Security alert. Local file inclusion bug. More info here, fixed release available. [18] (what's this?)
New release available: 2009-02-14. upgrade now! [17] (what's this?)
New release candidate available: 2009-01-30 (RC2). upgrade now! [16] (what's this?)
 

jQuery is an excellent javascript library which makes writing JS fun again!

Bookmarklet to load jQuery onto the currently visible page! jQuerify

code from above Bookmarklet for direct (userscript) use:

(function() {
var s=document.createElement('script');
s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js');
if(typeof jQuery!='undefined') {
  var msg='This page already using jQuery v' + jQuery.fn.jquery;
} else {
  document.getElementsByTagName('head')[0].appendChild(s);
  var msg='This page is now jQuerified'
}
var el=document.createElement('div');
  el.style.position='fixed';
  el.style.height='30';
  el.style.width='200';
  el.style.margin='0 auto 0 auto';
  el.id='jq-kswedberg';
  el.style.top='0';
  el.style.left='40%';
  el.style.padding='5px 10px 5px 10px';
  el.style.backgroundColor='#f99';
  el.innerHTML=msg;
var b=document.getElementsByTagName('body')[0];
b.appendChild(el);
window.setTimeout(function() {
  jQuery('#jq-kswedberg').fadeOut('slow',function() {
	jQuery(this).remove()
  });
}, 2500);
})();

JS snippet (Userscriptable) to load jQuery on the page if not loaded already:

// Add jQuery
var GM_JQ = document.createElement('script');
GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
GM_JQ.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(GM_JQ);

// Check if jQuery's loaded
function GM_wait() {
    if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); }
else { $ = unsafeWindow.jQuery; letsJQuery(); }
}
GM_wait();

// All your GM code must be inside this function
function letsJQuery() {
    alert($); // check if the dollar (jquery) function works
}

(via http://joanpiedra.com/jquery/greasemonkey/)

using_jquery_with_greasemonkey.txt · Last modified: 2009/01/26 23:22 by 68.161.228.208
 
 
2007-2008 by the artzilla.org crew tobi-x and jdubs and gleuch