瀏覽單個文章
michelle-lai529
Regular Member
 

加入日期: Jun 2010
文章: 86
重新整理,現在可以完全取代黑名單功能,名單陣列裡的完全不在自己的生命裡。
加上區塊註解,可以自行選擇想要隱藏的區塊斟酌使用。
引用:
作者原始碼
// ==UserScript==
// @name pcdvd隱藏發文
// @namespace http://tampermonkey.net/
// @version 2024-06-11
// @description pcdvd隱藏發文
// @author You
// @match https://www.pcdvd.com.tw/forumdisplay.php*
// @match https://www.pcdvd.com.tw/showthread.php*
// @icon
// @require https://code.jquery.com/jquery-1.11.0.min.js
// @grant none
// ==/UserScript==

(function() {
//隱藏發文ID清單陣列
var hideIDArray = [
'ytb0315'
,'w8433'
,'s95526'
,'kkdah'
,'lineytb0315'
,'kk00336'
,'jk141k'
];

//隱藏名單發文主題
$("span").each(function( index ){
if(hideIDArray.indexOf($(this).text())>=0){
$(this).closest('tr').css("display", "none");
}
});

//隱藏名單發文內容
$(".bigusername").each(function( index ){
if(hideIDArray.indexOf($(this).text())>=0){
$(this).closest('.tborder').css("display", "none");
}
});

//隱藏名單發文內容被引用及黑名單標示
$("strong").each(function( index ){
if(hideIDArray.indexOf($(this).text())>=0){
$(this).closest('table').css("display", "none");
}
});

//隱藏列表及發文內容下方方格區塊
$(document).ready(function(){
$("#_popIn_recommend").hide();
$("#_popIn_recommend_word").hide();
});

})();
 
舊 2024-06-11, 09:47 AM #92
回應時引用此文章
michelle-lai529現在在線上