Doge pieces
< Părere la script-ul DogeChess
Simplified Code
No need to SetInterval
Utilize CSS instead
// ==UserScript== // @name DogeChess // @namespace http://tampermonkey.net/ // @version 0.1 // @description Doge pieces // @author Firecreper2 // @match https://www.chess.com/* // @grant none // @run-at document-start // ==/UserScript== function GM_addStyle(cssStr) { var newNode = document.createElement("style"); newNode.textContent = cssStr; var targ = document.querySelector("head") || document.body || document.documentElement; targ.appendChild(newNode); } GM_addStyle(` .piece.wp { background-image: url('https://raw.githubusercontent.com/Firecreper2/DogeChess/main/dogepawn.png') !important; } .piece.wr { background-image: url('https://raw.githubusercontent.com/Firecreper2/DogeChess/main/dogerook.png') !important; } .piece.wb { background-image: url('https://raw.githubusercontent.com/Firecreper2/DogeChess/main/dogebishop.png') !important; } .piece.wn { background-image: url('https://raw.githubusercontent.com/Firecreper2/DogeChess/main/dogeknight.png') !important; } .piece.wk { background-image: url('https://raw.githubusercontent.com/Firecreper2/DogeChess/main/dogeking.png') !important; } .piece.wq { background-image: url('https://raw.githubusercontent.com/Firecreper2/DogeChess/main/dogequeen.png') !important; } `);
Autentifică-te pentru a posta un răspuns.
Simplified Code
No need to SetInterval
Utilize CSS instead