115增加链接任务按钮

让世界更加美好

  1. // ==UserScript==
  2. // @name 115增加链接任务按钮
  3. // @namespace http://tampermonkey.net/
  4. // @version 20231005
  5. // @description 让世界更加美好
  6. // @author 塞北的雪
  7. // @match https://115.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=115.com
  9. // @match https://115.com/*
  10. // @exclude https://115.com/s/*
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. var offlineTaskButton = `
  16. <div class="my115Dropdown" id="my115Dropdown">
  17. <div class="my115Dropbtn">
  18. <a href="javascript:;" class="button btn-upload" menu="offline_task"><i class="icon-operate ifo-linktask"></i><span>新建链接任务</span></a>
  19. </div>
  20. </div>
  21. `;
  22.  
  23. if (!$("#my115Dropdown").length > 0) {
  24. $(".left-tvf").eq(0).append(offlineTaskButton);
  25. }
  26.  
  27. //重命名自定义增强
  28. //https://gf.qytechs.cn/scripts/447226
  29. let _indexOf = String.prototype.indexOf;
  30. Object.defineProperty(String.prototype, 'indexOf', {
  31. configurable: true,
  32. writable: true,
  33. value: function(search, start) {
  34. try {
  35. let me = String.prototype.indexOf;
  36. // caller is forbidden in strict mode, so try and catch exception simply.
  37. if (me.caller !== me) {
  38. if (me.caller.toString().indexOf('cache.suffix') != -1) {
  39. return -1;
  40. }
  41. }
  42. } catch (e) {}
  43. return _indexOf.apply(this, [search, start]);
  44. },
  45. });
  46. })();

QingJ © 2025

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