信息技术网站优化 使用教程 按F12,选择控制台(Console),然后把代码粘贴进去,如果没有粘贴成功请在控制台输入“允许粘贴”
改头像/名字/性别 1 document.getElementById("ctl00_Cstu_Btnphoto" ).removeAttribute("disabled" )
1 document.getElementById("ctl00_Cstu_Btnname" ).removeAttribute("disabled" )
1 document.getElementById("ctl00_Cstu_Btnsex" ).removeAttribute("disabled" )
打字练习优化 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 function enablePaste ( ) { document .querySelectorAll ('*' ).forEach (element => { element.onpaste = null ; }); document .onpaste = null ; const oldAddEventListener = EventTarget .prototype .addEventListener ; EventTarget .prototype .addEventListener = function (type, listener, options ) { if (type === 'paste' ) { console .log ('[Paste Guard] 已阻止 paste 事件监听器:' , listener.toString ()); return ; } oldAddEventListener.call (this , type, listener, options); }; console .log ('粘贴功能已启用' ); } function copyToClipboard (text ) { const textarea = document .createElement ('textarea' ); textarea.value = text; document .body .appendChild (textarea); textarea.select (); const success = document .execCommand ('copy' ); console .log ('单词:' , text); document .body .removeChild (textarea); } function observeAndCopy ( ) { const targetDiv = document .querySelector ('div#TextWord.showtxt' ); const inputElement = document .getElementById ('InputWord' ); if (!targetDiv) { console .warn ('[Observer] 未找到 div#TextWord.showtxt' ); return null ; } const initialText = (targetDiv.textContent || targetDiv.innerText ).trim (); if (initialText) { copyToClipboard (initialText); } if (inputElement) { inputElement.focus (); } const observer = new MutationObserver ((mutations ) => { const newText = (targetDiv.textContent || targetDiv.innerText ).trim (); if (newText && newText !== initialText) { copyToClipboard (newText); if (inputElement) { inputElement.focus (); document .getElementById ('Meanword' ).textContent = '' ; } } }); observer.observe (targetDiv, { childList : true , subtree : true , characterData : true , }); console .log ('[Observer] 已开始监听 div#TextWord.showtxt 的内容变化' ); return observer; } function initAutoCopy ( ) { document .getElementById ('Meanword' ).textContent = '' ; document .getElementById ('msg' ).textContent = '' ; enablePaste (); const observer = observeAndCopy (); return observer; } initAutoCopy ();
显示打字练习里被隐藏的游戏 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 const commentNodes = document .querySelectorAll ('*' ); let targetComment = null ; for (let node of commentNodes) { for (let child of node.childNodes ) { if (child.nodeType === Node .COMMENT_NODE && child.textContent .includes ('键盘钢琴' ) && child.textContent .includes ('推箱子游戏' )) { targetComment = child; break ; } } if (targetComment) break ; } if (targetComment) { const htmlContent = targetComment.textContent .replace (/^<!--/ , '' ) .replace (/-->$/ , '' ); const tempDiv = document .createElement ('div' ); tempDiv.innerHTML = htmlContent; targetComment.replaceWith (tempDiv); console .log ('游戏链接已显示!' ); } else { console .log ('未找到包含游戏链接的注释' ); }
主页显示头像 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 const commentNodes = document .querySelectorAll ('*' ); let targetComment = null ; for (let node of commentNodes) { for (let child of node.childNodes ) { if (child.nodeType === Node .COMMENT_NODE && child.textContent .includes ('ctl00_Cphs_Imageface' )) { targetComment = child; break ; } } if (targetComment) break ; } if (targetComment) { const htmlContent = targetComment.textContent .trim () .replace (/^<!--/ , '' ) .replace (/-->$/ , '' ); const fragment = document .createRange ().createContextualFragment (htmlContent); targetComment.replaceWith (fragment); console .log ('内容已显示,无多余div' ); } else { console .log ('未找到目标注释' ); }