您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Canvas clear confirmation and full screen.
// ==UserScript== // @name Enhanced Canvas for pawprint.ing // @namespace http://tampermonkey.net/ // @version 0.2 // @description Canvas clear confirmation and full screen. // @author ban // @match https://pawprint.ing/* // @icon https://www.google.com/s2/favicons?sz=64&domain=pawprint.ing // @license GNU GPLv3 // ==/UserScript== // confirm function wow () { if(confirm("u sure?????")) { DrawingUtils.clearCanvas(document.getElementById('drawingCanvas')); } } const tB = document.querySelector('button[title="Clear"]'); tB.setAttribute("onclick",""); tB.addEventListener("click",wow); //full screen var dC //determine if profile or pawception if (document.getElementById("drawContent") !== null) { dC = document.getElementById("drawContent").style; } else { dC = document.getElementsByClassName("card-body p-2")[3].style; } const wp = document.getElementsByClassName("paint-container-wrapper")[0].style; const mA = document.getElementsByClassName("main-area")[0].style; var f = false; function fs() { if(f == false){ dC.position = "fixed"; dC.left = 0; dC.top = 0; dC.width = "100vw"; dC.height = "100vh"; dC.zIndex = "10000"; wp.height = "100%"; wp.width = "100%"; mA.height = "100%"; mA.alignItems = "initial"; } else { dC.position = ""; dC.width = ""; dC.height = ""; dC.zIndex = ""; wp.height = ""; wp.width = ""; mA.height = ""; mA.alignItems = ""; } f = !f; } //this code is disgusting but i don't feel like cleaning it up right now const fsB = document.createElement("button"); fsB.textContent = "Expand"; fsB.addEventListener("click",fs); document.getElementById("windowTitle").appendChild(fsB);