Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Ignore Goodjers
- // @namespace gwj
- // @description Increases the number of potential Tannhauserings
- // @include http://www.gamerswithjobs.com/node/*
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
- // ==/UserScript==
- // Add/remove users in this list to ignore/unignore them
- var usersToIgnore = [
- "Floomi",
- "Bonus_Eruptus"
- ];
- // Strip out newlines from class names. Seems to screw up jQuery's selectors
- function FixClassNames() {
- $("*").each(function(){
- var node = $(this).get(0);
- node.className = node.className.replace(/\s+/, ' ').replace(/(^\s+|\s+$)/, '');
- });
- }
- $(document).ready(function() {
- FixClassNames();
- $(".gwj_unignore").live('click', function(){
- var linksDiv = $(this).closest("div.links");
- linksDiv.next("div.comment").show();
- linksDiv.remove();
- });
- $.each(usersToIgnore, function(i, val){
- $("div.author-name:contains('" + val + "')").closest("div.comment").each(function(){
- var comment = $(this);
- comment.hide();
- comment.before('<div class="links"><ul class="links"><li><a class="gwj_unignore"><strong>Did ' + val + ' Tannhauser me?</strong></a></li></ul></div>');
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement