My Greasemnokey Object


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.