Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Messages Remover
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  Power of Will vs some silly russian social network
  6. // @author       Commander asdasd
  7. // @match https://*/*
  8. // @match https://*.vk.com/*
  9. // @match https://www.vk.com/*
  10. // @grant        none
  11. // ==/UserScript==
  12. (function() {
  13.     'use strict';
  14.     var pageURLCheckTimer = setInterval(
  15.         function() {
  16.             if (this.lastPathStr !== location.pathname ||
  17.                 this.lastQueryStr !== location.search ||
  18.                 this.lastPathStr === null ||
  19.                 this.lastQueryStr === null
  20.             ) {
  21.                 this.lastPathStr = location.pathname;
  22.                 this.lastQueryStr = location.search;
  23.                 vkMessagesRemover();
  24.             }
  25.         }, 222
  26.     );
  27.  
  28.     function vkMessagesRemover() {
  29.         var messages_count = document.getElementsByClassName('inl_bl left_count');
  30.         if (messages_count) {
  31.             for (i in messages_count) {
  32.                 console.log(messages_count[i].remove());
  33.             }
  34.         }
  35.     }
  36.     // Your code here...
  37. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement