Pastebin Improved

Some improvements to Pastebin.com, colored buttons etc.

当前为 2019-07-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Pastebin Improved
  3. // @namespace https://gf.qytechs.cn/users/166103
  4. // @version 0.3
  5. // @description Some improvements to Pastebin.com, colored buttons etc.
  6. // @author https://github.com/Amarok24
  7. // @match https://pastebin.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14.  
  15. var pbButtons = document.querySelectorAll(".buttonsm");
  16.  
  17. if (pbButtons) {
  18.  
  19. var indexOfEditButton = null;
  20.  
  21. for (let i = 0; i < pbButtons.length; i++) {
  22. if (pbButtons[i].innerText == "edit") {
  23. indexOfEditButton = i;
  24. break;
  25. }
  26. }
  27.  
  28. if (indexOfEditButton) {
  29. console.log("Edit button found, index = " + indexOfEditButton);
  30. pbButtons[indexOfEditButton].style.backgroundColor = "coral";
  31. pbButtons[indexOfEditButton].style.fontWeight = 700;
  32. }
  33.  
  34. }
  35.  
  36. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址