Posted By

mountainash on 05/28/14


Tagged

jquery blacklist whitelist ClickDesk


Versions (?)

Die ClickDesk Die!


 / Published in: JavaScript
 

URL: http://clickdesk.com

ClickDesk's website chat JavaScript API is very basic, it only allows for a few customisations, but no event control. And with a last of whitelist/blacklist URL restriction functionality on a large site their code is often in the template. I created the attached code to "hide" ClickDesk on a single URL.

  1. $(function() {
  2. function diedesk() {
  3.  
  4. if ($('.clickdesk-ultra').length > 0) {
  5. $('.clickdesk-ultra').remove();
  6. window.clearInterval(intervalID);
  7. }
  8.  
  9. }
  10.  
  11. var intervalID = window.setInterval(diedesk, 100);
  12. }
  13. });

Report this snippet  

You need to login to post a comment.