Better GreasyFork Code Reader

Show the Codes page of any script on GreasyFork With all code lines background in white

目前为 2020-12-20 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Better GreasyFork Code Reader
  3. // @namespace BetterGreasyCodeReader
  4. // @version 0.1
  5. // @description Show the Codes page of any script on GreasyFork With all code lines background in white
  6. // @author hacker09
  7. // @match https://greasyfork.org/*
  8. // @icon https://www.google.com/s2/favicons?domain=greasyfork.org
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12. (function() {
  13. 'use strict';
  14. setTimeout(function(){
  15. if (document.querySelector("li.current").innerText === "Code") { //Run only on the Code page
  16. var Lines = document.querySelectorAll("li"); //Create a variable to hold the total Code Lines
  17. for (var i = Lines.length; i--;) { //Starts the for condition
  18. Lines[i].style.background = 'none'; //Remove the grey line background
  19. } //Finishes the for condition
  20. } //Finishes the if condition
  21. }, 500);
  22. })();