old google Favicon

old google.

  1. // ==UserScript==
  2. // @name old google Favicon
  3. // @namespace https://churro.net
  4. // @version 0.1
  5. // @description old google.
  6. // @author Churro
  7. // @match https://www.google.com/*
  8. // @run-at document-start
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. //Change @match and add another site to change that sites favicon example:
  15. // @match https://stackoverflow.com
  16.  
  17. const favicon = document.querySelector("link[rel='shortcut icon']");
  18. [favicon, ...document.querySelectorAll("link[rel='icon']")].forEach(favicon => {
  19. favicon.remove();
  20. })
  21. console.log("Favicon Removed");
  22.  
  23. const clone = favicon.cloneNode();
  24. //Change link to whatever image you want to change the favicon to that image.
  25. clone.href = "https://www.favicon.cc/?action=icon&file_id=837778";
  26. document.head.appendChild(clone);
  27. })();