1
我如何能夠阻止/隱藏用戶dbs所有帖子?用一個userscript?隱藏用戶與jQuery在用戶腳本中的文本
<article class="container">
<div class="messages" id="messages">
<div class="message info">
<span class="nick">
<a title="2016-01-27 16:27:48">
*
</a>
</span>
<pre class="text">Users online: Hej</pre>
</div>
<div class="message info">
<span class="nick">
<a title="2016-01-27 16:27:58">
*
</a>
</span>
<pre class="text">dbs joined</pre>
</div>
<div class="message">
<span class="nick">
<a title="2016-01-27 16:24:55">
dbs
</a>
</span>
<pre class="text">Hej</pre>
</div>
</div>
</article>
我知道,如果DBS更改暱稱,我再次得到的消息..
網站https://hack.chat/?lil和律是房間..
編輯:
我的計劃是像這樣的東西
// ==UserScript==
// @name HackChat
// @namespace some
// @description Hide unwanted user.
// @include https://hack.chat/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
// @version 1.0
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_addStyle
// ==/UserScript==
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (jNode) {
jNode.text ("This comment changed by waitForKeyElements().");
}
IMPORTANT: This function requires your script to have loaded jQuery.
*/
var hiddenNick = $("article.container............").has ("dbs");
hiddenNick.hide();
沒有人對此有任何答案? –