您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Block certain user's content
当前为
// ==UserScript== // @name S1 User Blocker // @namespace http://tampermonkey.net/ // @version 0.4 // @description Block certain user's content // @author 冰箱研会长 // @match https://bbs.saraba1st.com/2b/* // ==/UserScript== var User_Blocked = new Array(`要屏蔽的用户1`,`这里用的是键盘左上角的backtick符号`,`逗号分隔主体`); var Correspond_Section = new Array(`和用户1对应的板块名称`,`PC数码`,`动漫论坛PC数码`); function S1_Reply_Blocker(){ var PostLists = getElementByXpath(`//div[@id='postlist']`); if(PostLists){ var PostCounter = 1; while(getElementByXpath(`//div[@id='postlist']/div[${PostCounter}]`)){ var PostAuthor = getElementByXpath(`//div[@id='postlist']/div[${PostCounter}]/table/tbody/tr[1]/td[1]/div/div[1]/div/a`); if(PostAuthor){ if( User_Blocked.includes(PostAuthor.innerText) ){ var PostSection = getElementByXpath(`/html/body/div[8]/div[2]/div/a[4]`).innerText; if(Correspond_Section[User_Blocked.indexOf(PostAuthor.innerText)] == ""){ getElementByXpath(`//div[@id='postlist']/div[${PostCounter}]`).style.display = `none`; }else if(Correspond_Section[User_Blocked.indexOf(PostAuthor.innerText)].includes(PostSection)){ getElementByXpath(`//div[@id='postlist']/div[${PostCounter}]`).style.display = `none`; } } } PostCounter = PostCounter + 1; } } } function S1_Sure_Blocker(){ //var SureList = getElementByXpath('/html/body/div[8]/div[4]/div/div/div[5]/div[2]/form/table'); var SureList = getElementByXpath(`//*[@id="threadlisttableid"]`); if(SureList){ var SureCounter = 1; //while(getElementByXpath(`/html/body/div[8]/div[4]/div/div/div[5]/div[2]/form/table/tbody[${SureCounter}]`)){ while(getElementByXpath(`//*[@id="threadlisttableid"]/tbody[${SureCounter}]`)){ //var SureAuthor = getElementByXpath(`/html/body/div[8]/div[4]/div/div/div[5]/div[2]/form/table/tbody[${SureCounter}]/tr/td[2]/cite/a`); var SureAuthor = getElementByXpath(`//*[@id="threadlisttableid"]/tbody[${SureCounter}]/tr/td[2]/cite/a`); if(SureAuthor){ if(User_Blocked.includes(SureAuthor.innerText)){ var SureSection = getElementByXpath(`/html/body/div[8]/div[2]/div/a[4]`).innerText; if(Correspond_Section[User_Blocked.indexOf(SureAuthor.innerText)] == ""){ getElementByXpath(`//*[@id="threadlisttableid"]/tbody[${SureCounter}]`).style.display = `none`; }else if(Correspond_Section[User_Blocked.indexOf(SureAuthor.innerText)].includes(SureSection)){ getElementByXpath(`//*[@id="threadlisttableid"]/tbody[${SureCounter}]`).style.display = `none`; } } } SureCounter = SureCounter + 1; } } } S1_Reply_Blocker(); S1_Sure_Blocker();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址