LogoChanger v1.0.5

replaces the any logo with one of your wish

  1. // ==UserScript==
  2. // @name LogoChanger v1.0.5
  3. // @namespace Logo
  4. // @author Maxy
  5. // @description replaces the any logo with one of your wish
  6. // @include http://baidu.com/*
  7. // @include *.baidu.com/*
  8. // @version 1.0.5
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12.  
  13.  
  14. // saves all settings of all <img> tags in the tags variable/array
  15. var tags = document.getElementsByTagName('img');
  16.  
  17.  
  18. // goes through every entry in the tags array, so through every <img> tag
  19.  
  20. for (var i = 0; i < tags.length; i++) {
  21.  
  22.  
  23. // replaces the searched image src with the one you want. This happens in ALL <img> tags with the searched src
  24. tags[i].src = tags[i].src.replace('http://img.baidu.com/img/baike/logo-baike.png', 'https://farm4.staticflickr.com/3901/14767310726_7f804f1944_o.png');
  25. tags[i].src = tags[i].src.replace('http://www.baidu.com/img/baidu_jgylogo3.gif?v=06534357.gif', 'https://farm4.staticflickr.com/3901/14767310726_7f804f1944_o.png');
  26.  
  27. }