Posted By

kevinkhill on 03/13/10


Tagged

greasemonkey


Versions (?)

My Greasemnokey Object


 / Published in: JavaScript
 

  1. var GM = {
  2. css:function(s){GM_addStyle(s)},
  3. setVal:function(key,value){GM_setValue(key,value)},
  4. getVal:function(key){var tmp=GM_getValue(key);
  5. if(tmp==null||tmp=='undefined'){return false;} else {return tmp}},
  6. ajax:function(o){GM_xmlhttpRequest(o)},
  7. ajaxHeaders:{
  8. "Content-type":"application/x-www-form-urlencoded",
  9. "User-Agent":"Mozilla/5.0",
  10. "Accept":"text/xml"
  11. },
  12. ajaxLoadGif:'<img src="' + GM_getResourceURL('ajaxLoadGif') + '" class="ajaxLoadGif"/>'
  13. };

Report this snippet  

You need to login to post a comment.