油猴脚本更新链接自动转脚本主页

自动将油猴脚本的update链接转换至脚本首页

  1. // ==UserScript==
  2. // @name 油猴脚本更新链接自动转脚本主页
  3. // @namespace https://greasyfork.org/users/759046
  4. // @version 0.1
  5. // @description 自动将油猴脚本的update链接转换至脚本首页
  6. // @author 233yuzi
  7. // @match https://update.greasyfork.org/scripts/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. autoGo()
  15. function autoGo() {
  16. let reg = RegExp(/update./)
  17. let a = location.href
  18. if (a.match(reg)) {
  19. a = a.replace("update.", "")
  20. console.log(a)
  21. location.href = a
  22. }
  23. }
  24. })();