Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name HOL Ignore List
- // @namespace http://www.hardwareonline.dk
- // @version 0.4
- // @description HOL Ignore List functionallity.
- // @match http://www.hardwareonline.dk/*
- // @match https://www.hardwareonline.dk/*
- // @require https://code.jquery.com/jquery-latest.min.js
- // @copyright 2014, John Nielsen <nielsen.john@gmail.com> - Tux
- // ==/UserScript==
- jQuery( document ).ready(function($) {
- var ignoreArray = [], id = '', name = '', item = '';
- ignoreArray.push('Brugernavn1');
- ignoreArray.push('Brugernavn2');
- $('.t47-svar').each(function() {
- var item = $(this);
- id = item.find('.t47-svar-top A:first').attr('name');
- name = item.find('A B').text();
- if(ignoreArray.indexOf(name) > -1)
- {
- var newElem = $('<div/>', {
- text: '#' + id + ': ' + name + ' - User matched ignore list, message hidden. Click to show/hide.',
- style: 'font-weight: bold; font-style: italic; cursor: pointer; color: #15649f;',
- class: 't47-svar'
- }).click(function() { item.toggle(); });
- item.before(newElem);
- item.toggle();
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement