gaoding去水印12.5

去水印神器

  1. // ==UserScript==
  2. // @name gaoding去水印12.5
  3. // @description 去水印神器
  4. // @namespace maomao1996.kill-watermark
  5. // @version 1.0.2
  6. // @author solid
  7. // @license MIT
  8. // @match *://*.gaoding.com/editor/*
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11.  
  12. !(function() {
  13. "use strict";
  14.  
  15. // 水印样式处理
  16. let h = 'div[style*="visibility"][style*="display"][style*="position"][style*="top"][style*="left"] {\n clip-path:circle(0) !important;\n //z-index:-1 !important;\n }\n ',
  17. t = '.water,.watermark {\n clip-path:circle(0)!;\n display:none;\n }\n .material-water-mark{\n clip-path:circle(0)!;\n display:none;\n }\n ',
  18. h2 = 'div[style*="pointer-events"][style*="background"][style*="position"][style*="top"][style*="left"] {\n clip-path:circle(0) !important;\n //z-index:-1 !important;\n }\n ';
  19.  
  20. // 添加样式
  21. GM_addStyle(h);
  22. GM_addStyle(h2);
  23. GM_addStyle(t);
  24.  
  25. // 添加下载按钮
  26. let button = document.createElement('button');
  27. button.innerHTML = '下载';
  28. button.style.position = 'fixed';
  29. button.style.right = '20px';
  30. button.style.top = '80px';
  31. button.style.zIndex = '999';
  32. button.style.padding = '8px 16px';
  33. button.style.fontSize = '14px';
  34. button.style.color = '#FF4D4D';
  35. button.style.backgroundColor = '#FFD700';
  36. button.style.border = '1px solid transparent';
  37. button.style.borderColor = '#230eff';
  38. button.style.borderRadius = '4px';
  39. button.style.cursor = 'pointer';
  40.  
  41. document.body.appendChild(button);
  42.  
  43. // 点击事件
  44. button.onclick = function() {
  45. alert('关注公众号:小黑臭臭,获取下载链接');
  46. };
  47.  
  48. // 处理Math.max
  49. var originalMathMax = Math.max;
  50. Math.max = function() {
  51. var args = Array.prototype.slice.call(arguments);
  52. var result = originalMathMax.apply(null, args);
  53. if (args[0] <= 500 && args[1] == 256) {
  54. const sizeInfo = document.querySelector('[test-id="right-canvas-size-info"]');
  55. let width = 1024;
  56. if (sizeInfo) {
  57. const text = sizeInfo.textContent;
  58. const matches = text.match(/(\d+)\s*×\s*(\d+)/);
  59. width = matches[1];
  60. }
  61. return width;
  62. }
  63. return result;
  64. };
  65.  
  66. // 处理URL.createObjectURL
  67. var originalCreateObjectURL = URL.createObjectURL;
  68. URL.createObjectURL = function(blob) {
  69. if (blob.type == 'image/svg+xml') {
  70. blob = new Blob([''], {
  71. type: 'image/svg+xml'
  72. });
  73. }
  74. var url = originalCreateObjectURL(blob);
  75. return url;
  76. };
  77. })();

QingJ © 2025

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