every links to litteral links

replaces every link's text with the word link on every website

  1. // ==UserScript==
  2. // @name every links to litteral links
  3. // @namespace http://tampermonkey.net/
  4. // @version 69.420
  5. // @description replaces every link's text with the word link on every website
  6. // @author joe
  7. // @match *://*/*
  8. // @grant none
  9. // ==/UserScript==
  10. function code() {
  11. // Your code here...
  12. var p = document.getElementsByTagName('a');
  13. for (let i = 0; i<p.length; i++) {
  14. p[i].textContent = "link";
  15. }
  16. }
  17.  
  18. (function() {
  19. 'use strict';
  20. window.onload = code();
  21. })();