javascript - Hide text from user with jQuery in userscript -


how can block/hide user dbs posts? userscript?

 <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> 

i know if dbs change nick message again..

site https://hack.chat/?lil , lil room..

edit:

my plan this

// ==userscript== // @name        hackchat // @namespace   // @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():  utility function, greasemonkey scripts, detects , handles ajaxed content.  usage example:      waitforkeyelements (         "div.comments"         , commentcallbackfunction     );      //--- page-specific function want when node found.     function commentcallbackfunction (jnode) {         jnode.text ("this comment changed waitforkeyelements().");     }  important: function requires script have loaded jquery. */ var hiddennick = $("article.container............").has ("dbs");  hiddennick.hide (); 

use jquery -> put stuff want hide div id -> either in document load or action (eg. mouseover, click etc...) -> call hide(); on div element.

<script type="text/javascript">      // either action function or on document load...      $( ".hideme" ).hide(); </script>  <div id="hideme"> <!-- content --> </div> 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -