1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
| // ==UserScript== // @name Kill Watermark // @namespace https://greasyfork.org/zh-CN/users/753623-achengovo // @version 3.1.3 // @description 支持去除图怪兽、易企秀、创客贴、比格设计、稿定设计、爱设计、标小智图片水印 // @author 阿成 // @icon https://achengovo.com/greasyfork/logo.png // @match https://*.818ps.com/* // @match https://*.eqxiu.com/* // @match https://*.chuangkit.com/* // @match https://bigesj.com/* // @match https://*.gaoding.com/* // @match https://www.isheji.com/* // @match https://www.logosc.cn/* // @match https://www.focodesign.com/* // @match https://www.logomaker.com.cn/* // @require https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js // @require https://greasyfork.org/scripts/448541-dom-to-image-js/code/dom-to-imagejs.js?version=1074759 // @require https://update.greasyfork.org/scripts/457525/1134363/html2canvas%20141.js // @grant GM_xmlhttpRequest // @grant unsafeWindow // @downloadURL https://update.greasyfork.org/scripts/424302/Kill%20Watermark.user.js // @updateURL https://update.greasyfork.org/scripts/424302/Kill%20Watermark.meta.js // ==/UserScript== (function ($) { //弹窗配置 var config = { showDonate: false, //是否显示弹窗,true为显示,false为不显示,默认显示 donateDays: 1, //弹窗显示频率,每几天一次,默认1天一次 }; init([]); newOutBtn("kill", "点我下载", kill); var tit = document.title; if (/(图怪兽)/.test(tit)) { newOutBtn("ziti", "字体问题", () => { $(".image-watermark").remove(); }); } if (config.showDonate) { donate(); }
function donate() { var domain = "." + document.domain.split(".").slice(-2).join("."); var today = new Date().toLocaleDateString(); if (readCookie("killtoday") != "") { return; } var expire = new Date(); expire.setTime(expire.getTime() + 3600000 * 24 * config.donateDays); document.cookie = "killtoday" + "=" + escape(today) + ";expires=" + expire.toGMTString() + ";domain=" + domain + ";path=/";
var modal = document.createElement("div"); modal.style.maxWidth = "800px"; modal.style.maxHeight = "800px"; modal.style.height = "100%"; modal.style.width = "100%"; modal.style.zIndex = "1000000"; modal.style.position = "fixed"; modal.style.top = "50%"; modal.style.left = "50%"; modal.style.transform = "translate(-50%, -50%)"; modal.style.backgroundColor = "rgba(70, 196, 38, 1)"; modal.style.padding = "20px"; modal.style.boxShadow = "0px 0px 10px rgba(0,0,0,0.3)"; document.body.appendChild(modal);
var title = document.createElement("h2"); title.style.textAlign = "center"; title.style.marginBottom = "10px"; title.style.color = "red"; title.innerText = "支持作者"; modal.appendChild(title);
var image = document.createElement("img"); image.style.display = "block"; image.style.margin = "0 auto"; image.style.maxWidth = "100%"; image.style.maxHeight = "200px"; image.style.height = "auto"; image.style.marginTop = "20px"; image.src = "https://minio.achengovo.com/blog/pay.png"; modal.appendChild(image);
var jiaocheng = document.createElement("a"); jiaocheng.style.color = "red"; jiaocheng.style.marginTop = "5px"; jiaocheng.href = "https://achengovo.com/archives/Kill Watermark使用教程"; jiaocheng.textContent = "使用教程:https://achengovo.com/archives/Kill Watermark使用教程"; jiaocheng.target = "_blank"; jiaocheng.style.fontSize = "20px"; modal.appendChild(jiaocheng);
var closeButton = document.createElement("button"); closeButton.style.width = "100%"; closeButton.style.height = "40px"; closeButton.style.margin = "20px auto 0px"; closeButton.style.backgroundColor = "green"; closeButton.style.display = "block"; closeButton.textContent = "已经支持"; closeButton.style.color = "red"; closeButton.style.fontSize = "20px"; closeButton.addEventListener("click", () => { modal.remove(); window.open("https://achengovo.com"); }); modal.appendChild(closeButton);
var freeButton = document.createElement("button"); freeButton.style.width = "100%"; freeButton.style.height = "40px"; freeButton.style.margin = "20px auto 0px"; freeButton.style.backgroundColor = "green"; freeButton.style.display = "block"; freeButton.textContent = "老子就要白嫖"; freeButton.style.fontSize = "20px"; freeButton.style.color = "red"; freeButton.addEventListener("click", () => { modal.remove(); alert("点一点弹出页面里的广告吧,求求了( 人´•౪•`)⌒♡"); window.open("https://achengovo.com"); }); modal.appendChild(freeButton);
var tips = document.createElement("p"); tips.style.color = "red"; tips.style.marginTop = "10px"; tips.style.marginBottom = "0px"; tips.textContent = "捐赠时备注名称可展示在致谢列表(以前捐赠过的可以加下方QQ群联系作者添加致谢名单)"; modal.appendChild(tips);
var tips2 = document.createElement("p"); tips2.style.color = "red"; tips2.style.marginTop = "5px"; tips2.style.marginBottom = "0px"; tips2.textContent = "QQ交流群1(满):595338626"; modal.appendChild(tips2);
var tips3 = document.createElement("p"); tips3.style.color = "red"; tips3.style.marginTop = "5px"; tips3.style.marginBottom = "0px"; tips3.textContent = "QQ交流群2:436315343"; modal.appendChild(tips3);
var thanksTitle = document.createElement("h3"); thanksTitle.style.textAlign = "center"; thanksTitle.style.color = "red"; thanksTitle.style.fontSize = "18px"; thanksTitle.innerText = "致谢"; modal.appendChild(thanksTitle);
var thanks = document.createElement("p"); thanks.style.color = "red"; thanks.style.marginTop = "5px"; thanks.textContent = "我在东北玩泥巴、可乐猫、#、荷包有限、小媚子、1198196517、Q1368454033、白潇阳、猫深沉、超、杨依依、书写五笔、。。。、夕丶城、罗大强、momo、旺仔茶园、汪18627733614、杨波波、微薄之力、清新脱俗的呆、、Oublie、与、一只笨猫、Eris、ggic、我是苏苏呀"; modal.appendChild(thanks);
var fuli = document.createElement("h3"); fuli.style.textAlign = "center"; fuli.style.color = "red"; fuli.style.fontSize = "18px"; fuli.innerText = "福利"; modal.appendChild(fuli);
GM_xmlhttpRequest({ method: "GET", url: "https://achengovo.com/fuli.json", onload: function (response) { var obj = JSON.parse(response.responseText); for (var i = 0; i < obj.length; i++) { console.log(obj[i]); var yangmao = document.createElement("a"); yangmao.style.color = "red"; yangmao.style.marginTop = "5px"; yangmao.textContent = obj[i].text; yangmao.style.display = "block"; (function (clickJs) { yangmao.addEventListener("click", function () { eval(clickJs); }); })(obj[i].clickJs); modal.appendChild(yangmao); } }, }); } })(jQuery); function newOutBtn(id, text, fun) { $("#outbuttons").append( "<button class='mybutton' id='" + id + "' style='float:left;background-color: rgba(70, 196, 38, 0.6); width: 70px;height: 30px;font-size: 12px;color:red;'>" + text + "</button>" ); $("#" + id + "").click(fun); } function init(data) { var outbuttons = "<div id='outbuttons' style='font-size: 12px;background-color: rgba(70, 196, 38, 0.6); position: fixed; top: 0; left: 0; z-index: 99999;'>" + "</div>"; $("body").prepend(outbuttons); var tit = document.title; for (var i = 0; i < data.length; i++) { var reg = new RegExp("(" + data[i][0] + ")"); if (reg.test(tit)) { data[i][1](); } } }
function readCookie(cookieName) { var theCookie = "" + document.cookie; var ind = theCookie.indexOf(cookieName); if (ind == -1 || cookieName == "") return ""; var ind1 = theCookie.indexOf(";", ind); if (ind1 == -1) ind1 = theCookie.length; return unescape(theCookie.substring(ind + cookieName.length + 1, ind1)); } function copyTextToClipboard(text) { if (navigator.clipboard) { navigator.clipboard .writeText(text) .then(function () { console.log("文本已成功复制到剪贴板"); }) .catch(function (err) { console.error("复制文本到剪贴板失败:", err); }); } else { console.error("浏览器不支持Clipboard API"); } } function kill() { var tit = document.title; if (/(图怪兽)/.test(tit)) { var canvas = document.querySelector(".lower-canvas"); var image = new Image(); image.src = canvas.toDataURL("image/png"); var url = image.src; // 获取图片地址 var a = document.createElement("a"); // 创建一个a节点插入的document var event = new MouseEvent("click"); // 模拟鼠标click点击事件 // var name= a.download = "1"; // 设置a节点的download属性值 a.href = url; // 将图片的src赋值给a节点的href a.dispatchEvent(event); } else if (/(易企秀)/.test(tit)) { $("div.eqc-watermark").css("position", "static"); $(".eqc-wm-close").remove(); let oldStr = window.document.body.innerHTML; var newStr = document.getElementsByClassName("safe-space")[0].innerHTML; newStr = newStr.replaceAll('data-hint="双击或从素材库拖拽进行替换"', ""); newStr = newStr.replaceAll("hint--top", ""); window.document.body.innerHTML = newStr; $("body").css("overflow", "auto"); var timename = setTimeout(function print() { $(".eqc-editor").css("transform", "none"); $("#eqc-mouse-info").css("display", "none"); }, 500); } else if (/(创客贴)/.test(tit)) { $("div[style*='ckt-watermark']").remove(); var newStr = document.getElementsByClassName("canvas-slot-inner")[0].innerHTML; window.document.body.innerHTML = newStr; $("body").css("overflow", "visible"); } else if (/(金山)/.test(tit)) { var newStr = document.getElementsByClassName("canvas_slot_item")[0].innerHTML; window.document.body.innerHTML = newStr; } else if (/(比格设计)/.test(tit)) { $("div.water").css("position", "static"); $("div.tool-bar-container").remove(); $(".water-tip").remove(); let oldStr1 = window.document.body.innerHTML; var newStr = document.getElementsByClassName("bige-canvas-list")[0].innerHTML; window.document.body.innerHTML = newStr; } else if (/(稿定设计)/.test(tit)) { var waterImages = new Set(); for ( var i = 0; i < document.querySelectorAll(".editor-watermark").length; i++ ) { var waterImage = document.querySelectorAll(".editor-watermark")[i].style.backgroundImage; waterImage = waterImage.replace('url("', "").replace('")', ""); waterImages.add(waterImage); } if (waterImages.size > 0) { var chuang = document.createElement("div"); chuang.style.maxWidth = "400px"; chuang.style.maxHeight = "600px"; chuang.style.height = "100%"; chuang.style.width = "100%"; chuang.style.zIndex = "1000000"; chuang.style.position = "fixed"; chuang.style.top = "50%"; chuang.style.left = "50%"; chuang.style.transform = "translate(-50%, -50%)"; chuang.style.backgroundColor = "rgba(70, 196, 38, 1)"; chuang.style.padding = "20px"; chuang.style.boxShadow = "0px 0px 10px rgba(0,0,0,0.3)"; document.body.appendChild(chuang);
var title = document.createElement("h2"); title.style.textAlign = "center"; title.style.marginBottom = "10px"; title.style.color = "red"; title.innerText = "请屏蔽以下网络请求后刷新页面"; chuang.appendChild(title);
waterImages.forEach((value) => { var newDiv = document.createElement("div"); newDiv.style.display = "flex"; chuang.appendChild(newDiv); var thanks = document.createElement("p"); thanks.style.color = "red"; thanks.style.marginTop = "5px"; thanks.style.wordWrap = "break-word"; thanks.textContent = value; thanks.style.width = "90%"; newDiv.appendChild(thanks); var copyBtn = document.createElement("button"); copyBtn.textContent = "复制"; copyBtn.style.color = "red"; copyBtn.addEventListener("click", () => { copyTextToClipboard(value); }); newDiv.appendChild(copyBtn); }); var freeButton = document.createElement("button"); freeButton.style.width = "100%"; freeButton.style.height = "40px"; freeButton.style.margin = "20px auto 0px"; freeButton.style.backgroundColor = "green"; freeButton.style.display = "block"; freeButton.textContent = "已经屏蔽了"; freeButton.style.fontSize = "20px"; freeButton.style.color = "red"; chuang.appendChild(freeButton); freeButton.addEventListener("click", () => { var editor; if (document.querySelectorAll(".editor-container-flow").length == 0) { editor = document.querySelectorAll(".editor-shell")[0]; } else { editor = document.querySelectorAll(".editor-container-flow")[0]; } saveImgByDom(editor); chuang.remove(); }); } else { var editor; if (document.querySelectorAll(".editor-container-flow").length == 0) { editor = document.querySelectorAll(".editor-shell")[0]; } else { editor = document.querySelectorAll(".editor-container-flow")[0]; } saveImgByDom(editor); } } else if (/(爱设计)/.test(tit)) { $( "#editorDrag > div.undefined.scrolly > div.scrolly-viewport.editor-center > div > div:nth-child(1)" ).remove(); $(".editor-watermask").remove(); $(".editor-header").remove(); $(".editor-aside").remove(); $(".editor-panel").remove(); $("#rongqi").remove(); $("#outbuttons").remove(); } else if (/(标小智)/.test(tit)) { $(".watermarklayer").remove(); } else if (/(标智客)/.test(tit)) { $(".watermark").remove(); } } // 用于生成当前日期时间字符串的辅助函数 function getCurrentDateTimeString() { var now = new Date(); var year = now.getFullYear(); var month = String(now.getMonth() + 1).padStart(2, "0"); var day = String(now.getDate()).padStart(2, "0"); var hour = String(now.getHours()).padStart(2, "0"); var minute = String(now.getMinutes()).padStart(2, "0"); var second = String(now.getSeconds()).padStart(2, "0"); return year + month + day + hour + minute + second; }
// 新方法保存图片 function saveImgByDom(dom) { html2canvas(dom, { useCORS: true, // 解决资源跨域问题 scale: 2, // 处理模糊问题 }) .then((canvas) => { var imgData = canvas.toDataURL("image/png"); var a = document.createElement("a"); a.href = imgData; a.download = Date.now(); a.click(); }) .catch(function (e) { console.log("html2canvas:err", e); }); } //旧的方法备份 function saveImgByDom2(dom) { domtoimage .toPng(dom, { quality: 1 }) .then(function (dataUrl) { var link = document.createElement("a"); link.href = dataUrl; link.download = getCurrentDateTimeString() + ".png"; // 使用当前日期时间作为文件名 link.click(); }) .catch(function (error) { console.error("Error capturing screenshot:", error); }); }
|