Advertisement
Guest User

SatorinSatorinGo.user.js

a guest
Oct 22nd, 2012
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           SatorinSatorinGo
  3. // @namespace      *
  4. // @description    Replace DuckDuckGo logo with Satorin. Now includes favicon.
  5. // @include        https://duckduckgo.com/*
  6. // @include        http://duckduckgo.com/*
  7. // @grant          none
  8. // ==/UserScript==
  9.  
  10.  
  11. document.title="Satorin Satorin Go";
  12.  
  13. var img = document.getElementById('logo_homepage');
  14. var img2 = document.getElementById('header_logo');
  15. var img3 = document.getElementById('logo_internal');
  16.  
  17. if (img != null) {
  18.     img.setAttribute('style', 'background: url("http://i41.tinypic.com/15xjqd5.png") no-repeat scroll center top transparent; margin-bottom: 40px; padding-bottom: 1px; margin-left: 20%; width: 341px; height: 161px;');
  19.     img.removeAttribute('id');
  20.     img.innerHTML = '';
  21. }
  22.  
  23. if (img2 != null) {
  24.     img2.setAttribute('style', 'background: url("http://i43.tinypic.com/200r7u9.png") no-repeat scroll 0 0 transparent; float: left; height: 53px; margin: 0 0 -100px -130px; overflow: visible; width: 80px;');
  25.     img2.removeAttribute('id');
  26. }
  27.  
  28. if (img3 != null) {
  29.     img3.setAttribute('style', 'background: url("http://i41.tinypic.com/211jkfs.png") no-repeat scroll left 10px transparent; height: 63px; margin-left: -8px;');
  30.     img3.removeAttribute('id');
  31. }
  32.  
  33. var images = document.getElementsByTagName ("img");
  34. var x = 0;
  35.  
  36. while(x<images.length)
  37. {
  38.     if ((images[x].src == "https://duckduckgo.com/icon16.png") || (images[x].src == "http://duckduckgo.com/icon16.png"))
  39.     {
  40.         images[x].src = "http://i49.tinypic.com/2vigz7q.png";
  41.     }
  42.    
  43.     x=x+1;
  44. }
  45.  
  46. var head = document.getElementsByTagName('head')[0];
  47. var favicon = document.createElement('link');
  48.  
  49. favicon.setAttribute('type', 'image/x-icon');
  50. favicon.setAttribute('rel', 'shortcut icon');
  51. favicon.setAttribute('href', "http://i49.tinypic.com/2vigz7q.png");
  52. head.appendChild(favicon);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement