This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 武汉科技大学选课系统去除其他校区 | |
// @namespace https://github.com/symant233 | |
// @version 0.0.1 | |
// @description 武汉科技大学选课系统 去除其他校区 | |
// @author symant233 | |
// @icon https://cdn.jsdelivr.net/gh/symant233/PublicTools/Beautify/Bkela.png | |
// @require https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js | |
// @match http://59.68.177.189/pyxx/pygl/pyjhxk.aspx | |
// @grant GM_addStyle | |
// @license GPL-3.0 | |
// @homepageURL https://github.com/symant233 | |
// ==/UserScript== | |
;(function() { | |
// 武汉科技大学选课系统 去除其他校区 | |
function filter() { | |
const tmp = document.querySelectorAll('#dgData tr'); | |
let count = 0; | |
for ( let i in tmp ) { | |
if ( !tmp[i].innerText ) return; | |
if ( tmp[i].innerText.includes("青山校区") || tmp[i].innerText.includes('中心医院') ) { | |
tmp[i].remove(); | |
console.log('[rm]' + tmp[i].textContent.replace(/\s+/g, ' ').trim()); | |
count++; | |
} | |
if (tmp[i].style.backgroundColor === "rgb(0, 0, 0)") tmp[i].style.backgroundColor = '#6fa7f8'; | |
} | |
console.log(`[Beautify] 本次过滤共移除了 ${count} 条内容.`); | |
} | |
$('<button id="btn-filter" style="position:fixed;top:29px;left:0px;width:28px;">过滤</button>').appendTo('body'); | |
$('#btn-filter').click(filter); | |
setTimeout(() => {filter()}, 600); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment