NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @author Paranoya // @name Remove Dead Friends // @namespace Remove Dead Friends // @description Check your friends list and remove the dead and banned accounts // @version 1.0.9 // @match http://www.erepublik.com/*/citizen/profile/* // @match https://www.erepublik.com/*/citizen/profile/* // @include http://www.erepublik.com/*/citizen/profile/* // @include https://www.erepublik.com/*/citizen/profile/* // @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js // @downloadURL https://openuserjs.org/install/nwolf/Remove_Dead_Friends.user.js // @updateURL https://openuserjs.org/install/nwolf/Remove_Dead_Friends.user.js // ==/UserScript== var friends_timeout; var friends_remove_timeout; var friends_config = { remove: true, list: [], citizen: null, amount: 0, html: null, friend: null, friend_object: null, scroll_wrapper: 300, scroll_content: 300, scroll_active: false, scroll_margin:0, scroll_step:300 }; var friends_image_loading = "data:image/gif;base64,R0lGODlhNgA2AKUAAIzC1Mzy/Kzi9JzS5Oz6/Lzy/Nz2/Lzm/Kza9JzK5Mz6/KTa7JTK3LTq/LTi9KTS5Nz+/Lzu/JTC3Pz+/MT6/MTm9NT6/NT2/PT+/MTy/OT6/LTe9KTO5LTm/KTW7IzC3Mz2/Kzi/JzS7Oz+/Nz6/Lzq/Kze9JzO5Mz+/KTa9JTK5LTi/KTS7OT+/JTG3MTq/NT+/MT2/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQAyACwAAAAANgA2AAAG/kCZcEgsEicYQ+Vg8rg8LaN0Sq3KJoQM4qRiuL6uj0tgLZuFE9JGlDgxEgwvGCCBne/GiUYgOvm5by5yHxIAJ3iIMhglHiwDfSdtDCpgYS50iWcTLU0eIg8DA35vcHOFLJllExcIHq4iLJCjcWBiAFGpVQEpCymurgMsfwkqCbUAJblUEyAmCAsLrx6PolxtAw8cDsrLFiYmKQjP0Y0PfQsVJAQT3FYtK9/gC8/SJ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ZMGGlyg2oGgAggLLIy5ebii5cwP+tptERjDYMHTohgf7gMooQIKB06cqlBZpSqJqVQYSpBJ58IBBV68PXGgdwrXAA7NcxY5dWqCt2wIG1sqAcaHAhbp3s651gbcADBgFRiQFGuOvYRgTJhjUSmAC4sQTDEwIKVVEYsSSDYxwMZilBReSR2geQXqx1BgTSKvevGCtiNWkXWw2rXRB7M0ucrce+1p27t9P1i74DdzFAto3RRBfwLw5cpYxdBtvHiPG84wWmE9nHmNBdQKdI4poTv07AQLXD47nXv17jPMiwvMj4N27efgi8ssvJ6L9ffToWSAgUP39JwJ68cWnlAXnvYeffgNWdh6A+sW3n3gH5mdhhGsOWaChhxzKJYSAIYoYURAAOw=="; function friends_loading() { if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(friends_loading, 100); return false; } else { friends_init(); } return true; } friends_loading(); function friends_init() { if (typeof unsafeWindow == 'undefined') {unsafeWindow = window;} friends_init_styles(); friends_init_blocks(); friends_init_events(); } function friends_get_list() { friends_config.list = []; friends_config.citizen = parseFloat(unsafeWindow.flc.getVariable("citizen_id")); friends_config.amount = parseFloat($('.citizen_activity h4.friends_title a').text() .replace('Friends (', "").replace(')', "") // English version .replace('????????? (', "").replace(')', "") // Macedonian version .replace('???????? (', "").replace(')', "") // Bulgarian version .replace('Amigos (', "").replace(')', "") // Brazilian, Spanish, Portuguese version .replace('Freunde (', "").replace(')', "") // German version .replace('Amis (', "").replace(')', "") // French version .replace('F???? (', "").replace(')', "") // Greek version .replace('Prijatelji (', "").replace(')', "") // Croatian, Slovenian version .replace('Barátok (', "").replace(')', "") // Hungarian version .replace('Teman (', "").replace(')', "") // Indonesian version .replace('Amici (', "").replace(')', "") // Italian version .replace('Znajomi (', "").replace(')', "") // Polish version .replace('Prieteni (', "").replace(')', "") // Romanian version .replace('?????? (', "").replace(')', "") // Russian version .replace('Shokët (', "").replace(')', "") // Albanian version .replace('????????? (', "").replace(')', "") // Serbian version .replace('Arkadaslar (', "").replace(')', "") // Turkish version .replace('?? (', "").replace(')', "") // Taiwanian version .replace('????? (', "").replace(')', "") // Ukranian version .replace('??? (', "").replace(')', "") // Chinese version .replace('???????? (', "").replace(')', "") // Arabic version .replace('?????? (', "").replace(')', "") // Iranian version ); if (isNaN(friends_config.amount)) { $('#friends_popup .overlay').hide(); $('#friends_popup .message').css('height', 'auto'); $('#friends_popup .text').css('height', 'auto').css('position', 'relative') .html('Error: You have 0 friends or you use unsupported erepublik language version.'); return false; } $('#friends_popup .overlay').show(); $('#friends_popup .overlay #total_friends_checked').text('0'); $('#friends_popup .message').css('height', '300px'); $('#friends_popup .text').css('height', '300px').css('position', 'absolute').html('<ul id="friedns_dead_list"></ul>'); friends_config.scroll_margin = 0; $('#friends_popup .action').css('display', 'none').removeClass('confirm').find('span').text('Delete all'); $('#friends_popup .inner .more_details').css('display', 'none'); window.clearTimeout(friends_timeout); friends_parse_responce(1, Math.ceil(friends_config.amount/20)); return true; } function friends_parse_responce(current, total) { if (current <= total) { GM_xmlhttpRequest({ method : 'Get', url : 'http://www.erepublik.com/en/main/citizen-friends/' + friends_config.citizen + '/'+ current, headers:{ "Content-Type":"application/x-www-form-urlencoded" }, onload:function(data) { if (data.responseText) { friends_config.html = $('.friends_area #friends_list table.lister tbody tr', data.responseText); if (friends_config.html.length > 0) { $('#friends_popup .text').css('height', '300px').css('opacity', '0.2'); friends_config.html.each(function() { friends_config.friend_object = $(this); friends_config.friend = { }; friends_config.friend.id = friends_config.friend_object.attr('id').replace("friend_", ""); friends_config.friend.title = friends_config.friend_object.find('td.friend_info a').attr('title'); friends_config.friend.profile = friends_config.friend_object.find('td.friend_info a').attr('href'); friends_config.friend.image = friends_config.friend_object.find('td.friend_info a img').attr('src'); friends_config.friend.remove = friends_config.friend_object.find('td.actions a#' + friends_config.friend.id + '.remove').attr('href'); friends_config.friend.dead = false; if (friends_config.friend_object.hasClass('dead')) { friends_config.friend.dead = true; friends_config.list.push(friends_config.friend); friends_list_item('friedns_dead_list', friends_config.friend); } }); var checked_friends = parseFloat($('#friends_popup .overlay #total_friends_checked').text()); $('#friends_popup .overlay #total_friends_checked').text(parseFloat(checked_friends + friends_config.html.length)); window.clearTimeout(friends_timeout); friends_timeout = window.setTimeout(function() {friends_parse_responce(current+1, total)}, 1000); } else { $('#friends_popup .overlay').hide(); $('#friends_popup .message').css('height', 'auto'); $('#friends_popup .text').css('height', 'auto').css('position', 'relative') .html('Error: There was an error while checking your friends list.<br/>Please try again or try few minutes later.'); window.clearTimeout(friends_timeout); } } }, onerror:function(data) { $('#friends_popup_close').click(); } }); } else if (current > total) { window.clearTimeout(friends_timeout); friends_event_remove(); $('#friends_popup .overlay').hide(); $('#friends_popup .text').css('position', 'relative').css('opacity', '1'); if (friends_config.list.length == 0) { $('#friends_popup .message').css('height', 'auto'); $('#friends_popup .text').css('height', 'auto').css('position', 'relative') .html('You dont have dead friends in your list.'); } else { $('#friends_popup .action').css('display', 'block'); $('#friends_popup .action span').append(' (' + friends_config.list.length + ')') $('#friends_popup .inner .more_details').css('display', 'block'); } } } function friends_list_item(element, item) { if (typeof item !== 'undefined') { $('#' + element).find('li#friend_dead_item_' + item.id).html('').remove(); $('#' + element).append('<li id="friend_dead_item_' + item.id + '"><div class="clear clearfix"></div></li>'); $('#friend_dead_item_' + item.id).prepend('<a id="friens_remove_action" class="friens_upgrade_action" rel="' + friends_config.friend.remove + '" href="javascript:;"></a>'); $('#friend_dead_item_' + item.id).find('a.friens_upgrade_action').append('<span class="upgrade_title" style="">Remove</span>'); $('#friend_dead_item_' + item.id).find('a.friens_upgrade_action').append('<img alt="" src="http://www.erepublik.com/images/modules/manager/check.png" class="upgrade_check">'); $('#friend_dead_item_' + item.id).prepend('<a target="_blank" class="friends_dead_item" title="'+ item.title+'" href="'+ item.profile+'"></a>'); $('#friend_dead_item_' + item.id).find('a.friends_dead_item').append('<img width="40" height="40" src="' + item.image + '"/>'); $('#friend_dead_item_' + item.id).find('a.friends_dead_item').append('<strong>' + item.title + '</strong>'); } } function friends_init_events() { $('#friends_remove_button').click(function() { window.clearTimeout(friends_timeout); window.clearTimeout(friends_remove_timeout); friends_config.remove = true; $('#friends_overlay').show(); $('#friends_popup').show(); friends_get_list(); }); $('#friends_popup_close').click(function() { window.clearTimeout(friends_timeout); window.clearTimeout(friends_remove_timeout); friends_config.remove = false; $('#friends_overlay').hide(); $('#friends_popup').hide(); }); $('#friends_popup .inner .more_details.scroll-up').click(function() { if (friends_config.scroll_active) { return false; } friends_config.scroll_content = parseFloat($('#friends_popup .text').find('ul#friedns_dead_list').height()); if (isNaN(friends_config.scroll_content)) { friends_config.scroll_content = 0; } if (friends_config.scroll_content > friends_config.scroll_wrapper) { friends_config.scroll_margin = friends_config.scroll_margin + friends_config.scroll_step; if (friends_config.scroll_margin >= 0) { friends_config.scroll_margin = 0; } friends_config.scroll_active = true; $('#friends_popup .text').find('ul#friedns_dead_list').animate({ marginTop: friends_config.scroll_margin }, 500, function() { friends_config.scroll_active = false; }); return true; } }); $('#friends_popup .inner .more_details.scroll-down').click(function() { if (friends_config.scroll_active) { return false; } friends_config.scroll_content = parseFloat($('#friends_popup .text').find('ul#friedns_dead_list').height()); if (isNaN(friends_config.scroll_content)) { friends_config.scroll_content = 0; } if (friends_config.scroll_content > friends_config.scroll_wrapper) { friends_config.scroll_margin = friends_config.scroll_margin - friends_config.scroll_step; if (parseFloat(friends_config.scroll_margin - friends_config.scroll_step) <= parseFloat("-" + friends_config.scroll_content)) { friends_config.scroll_margin = parseFloat("-" + ((friends_config.scroll_content+2)-friends_config.scroll_step)); } friends_config.scroll_active = true; $('#friends_popup .text').find('ul#friedns_dead_list').animate({ marginTop: friends_config.scroll_margin }, 500, function() { friends_config.scroll_active = false; }); return true; } }); $('#friends_popup .action').click(function() { if ($(this).hasClass('confirm')) { $(this).hide(); $('#friends_popup .inner .more_details').hide(); $('#friends_popup .message').css('height', 'auto'); $('#friends_popup .text').css('height', 'auto').css('position', 'relative') .html('Removing all friends ... Friends deleted: <span id="friends_auto_deleted_count">0</span>'); friends_event_remove_all(0); } else { $(this).addClass('confirm').find('span').text('Confirm'); } }) } function friends_event_remove() { $("a[id^=friens_remove_action]").click(function() { var element = $(this); GM_xmlhttpRequest({ method : 'POST', url : 'http://www.erepublik.com' + element.attr('rel'), headers:{ "Content-Type":"application/x-www-form-urlencoded" }, onload:function(data) { if (element.hasClass('removed') == false) { var list_item = element.parent(); list_item.slideUp(800, function() { list_item.remove(); }) } element.addClass('removed'); } }); }); } function friends_event_remove_all(current) { if (friends_config.remove == false) { return false; } if (current < friends_config.list.length) { var element = friends_config.list[current]; if (element.remove) { GM_xmlhttpRequest({ method : 'POST', url : 'http://www.erepublik.com' + element.remove, headers:{ "Content-Type":"application/x-www-form-urlencoded" }, onload:function(data) { $('#friends_popup .text #friends_auto_deleted_count').text(current+1); friends_remove_timeout = window.setTimeout(function() { friends_event_remove_all(current+1); }, 1000); } }); } } else { window.clearTimeout(friends_remove_timeout); friends_config.list = []; $('#friends_popup .message').css('height', 'auto'); $('#friends_popup .text').css('height', 'auto').css('position', 'relative') .html('All friends removed. You dont have dead friends in your list.'); } } function friends_init_blocks() { $('ul.citizen_menu').append('<li><a id="friends_remove_button" title="Remove dead friends" href="javascript:;">Remove dead friends</a></li>'); $('body').append('<div id="friends_overlay" class="lb_overlay js_lb_overlay"></div>'); $('body').append('<div id="friends_popup" class="solid_pop stripped"></div>'); $('#friends_popup').append('<a id="friends_popup_close" class="close close_pop_up" href="javascript:;">Close</a>'); $('#friends_popup').append('<div class="content"><div class="fixer"></div></div>'); $('#friends_popup .content .fixer').append('<h1>Remove Dead Friends</h1>'); $('#friends_popup .content .fixer').append('<div class="inner"><div class="message"></div></div>'); $('#friends_popup .inner .message').append('<div class="overlay"></div>'); $('#friends_popup .inner .message .overlay').append('<div class="info-text"></div>'); $('#friends_popup .inner .message .overlay .info-text').append('Loading ... <br/> '); $('#friends_popup .inner .message .overlay .info-text').append('Friends checked: <span id="total_friends_checked">0</span>'); $('#friends_popup .inner .message').append('<div class="text"></div>'); $('#friends_popup .inner').append('<a class="more_details scroll-up" title="Scroll up" href="javascript:;"><span>Up</span></a>'); $('#friends_popup .inner').append('<a class="more_details scroll-down" title="Scroll down" href="javascript:;"><span>Down</span></a>'); $('#friends_popup .content .fixer').append('<div class="clear"></div><a class="action" title="" href="javascript:;"><span>Delete all</span></a>'); $('#friends_popup').append('<div class="bottom"></div>'); } function friends_init_styles() { GM_addStyle("#friends_overlay { display:none; height: 1754px; position: absolute; width: 100%; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 20003; background: none repeat scroll 0% 0% black; opacity: 0.5; }"); GM_addStyle("#friends_popup { display: none; left: 50%; margin-left: -274px; z-index: 20004; position: fixed; top: 30%; margin-top: -150.5px; }"); GM_addStyle("#friends_popup .content .inner { margin-top: 0px; margin-bottom:30px; }"); GM_addStyle("#friends_popup .content .fixer { margin-bottom:0px; }"); GM_addStyle("#friends_popup .content .message { margin: 0px; height:300px; width:459px; }"); GM_addStyle("#friends_popup .content .text { position:absolute; padding:0px; margin:0px; display:block; vertical-align:top; color:white; width:459px; height:300px; max-height:300px; overflow:hidden; }"); GM_addStyle("#friends_popup .content .overlay { cursor:wait; text-align:center; z-index:2; position:absolute; padding:0px; margin:0px; display:block; vertical-align:top; color:white; width:459px; height:300px; max-height:300px; overflow:hidden; }"); GM_addStyle("#friends_popup .content .overlay .info-text { font-weight:normal; text-shadow:1px 1px 1px #000; margin-top:130px; }"); GM_addStyle("#friends_popup .content .script-author { color:#CCC; width:480px; text-align:center; font-size:11px; text-shadow:1px 1px 1px #000; margin:-10px 0px 0px 31px; float: left; }"); GM_addStyle("#friends_popup .content .script-author a { color:#FFF; }"); GM_addStyle("#friends_popup { float: left; width: 548px; }"); GM_addStyle("#friends_popup .close { background-image: url('/images/modules/manager/close_pop.png?1337588804'); background-position: center top; background-repeat: no-repeat; float: left; height: 22px; position: absolute; right: 13px; text-indent: -9999px; top: 13px; width: 22px; }"); GM_addStyle("#friends_popup .close:hover { background-position: center bottom; }"); GM_addStyle("#friends_popup .bottom { height:20px; }"); GM_addStyle("#friends_popup .action { display:none; margin-top:20px; }"); GM_addStyle("#friends_popup .action.confirm { display:none; margin-top:20px; }"); GM_addStyle("#friends_popup .action.confirm span { border-bottom:3px solid #8C1716; background-color: #9F2A29; background-image: -webkit-gradient(linear, left bottom, left top, color-stop(1, #CD5756), color-stop(0, #9F2A29)); background-image: -webkit-linear-gradient(center bottom, #CD5756 0%, #9F2A29 100%); background-image: -moz-linear-gradient(top, #CD5756 0%, #9F2A29 100%); background-image: -o-linear-gradient(top, #CD5756 0%, #9F2A29 100%); background-image: -ms-linear-gradient(top, #CD5756 0%, #9F2A29 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CD5756', endColorstr='#9F2A29',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#CD5756', endColorstr='#9F2A29')'; background-image: linear-gradient(top, #CD5756 0%,#9F2A29 100%); -webkit-transition: background 0.1s; -moz-transition: background 0.1s; -o-transition: background 0.1s; -ms-transition: background 0.1s; transition: background 0.1s; }"); GM_addStyle("#friends_popup .action.confirm:hover span { background-color: #B32F2E; background-image: -webkit-gradient(linear, left bottom, left top, color-stop(1, #D36B6A), color-stop(0, #B32F2E)); background-image: -webkit-linear-gradient(center bottom, #D36B6A 0%, #B32F2E 100%); background-image: -moz-linear-gradient(top, #D36B6A 0%, #B32F2E 100%); background-image: -o-linear-gradient(top, #D36B6A 0%, #B32F2E 100%); background-image: -ms-linear-gradient(top, #D36B6A 0%, #B32F2E 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#D36B6A', endColorstr='#B32F2E',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#D36B6A', endColorstr='#B32F2E')'; background-image: linear-gradient(top, #D36B6A 0%,#B32F2E 100%); }"); GM_addStyle("#friends_popup .more_details { display:none; margin:0px 2px -33px auto; width:50px }"); GM_addStyle("#friends_popup .more_details.scroll-up { margin:0px 65px -33px auto; }"); GM_addStyle("#friends_popup .more_details span { padding:5px 0px; }"); GM_addStyle("#friedns_dead_list > li { width:458px; margin-left: 1px; margin-bottom:2px; width: 458px; height: 58px; float:none; display:block; background-color: #848B9E; background-image: url('/images/modules/manager/noiz.png?1333974834'); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-gradient(linear, left bottom, left top, color-stop(1, #9AA3B2), color-stop(0, #848B9E)); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-linear-gradient(center bottom, #9AA3B2 0%, #848B9E 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-moz-linear-gradient(top, #9AA3B2 0%, #848B9E 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-o-linear-gradient(top, #9AA3B2 0%, #848B9E 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-ms-linear-gradient(top, #9AA3B2 0%, #848B9E 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9aa3b2e', endColorstr='#848b9e',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#9aa3b2', endColorstr='#848b9e')'; background-image: url('/images/modules/manager/noiz.png?1333974834'),linear-gradient(top, #9AA3B2 0%,#848B9E 100%); -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0 inset,rgba(0, 0, 0, 0.4) 0 1px 1px,rgba(0, 0, 0, 0.1) 0 0 10px inset; text-align: center; position: relative; float: none; }"); GM_addStyle("#friedns_dead_list > li:hover { background-color: #8D93A5; background-image: url('/images/modules/manager/noiz.png?1333974834'); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-gradient(linear, left bottom, left top, color-stop(1, #A3ABB9), color-stop(0, #8D93A5));background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-linear-gradient(center bottom, #A3ABB9 0%, #8D93A5 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-moz-linear-gradient(top, #A3ABB9 0%, #8D93A5 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-o-linear-gradient(top, #A3ABB9 0%, #8D93A5 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-ms-linear-gradient(top, #A3ABB9 0%, #8D93A5 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a3abb9e', endColorstr='#8d93a5',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#a3abb9', endColorstr='#8d93a5')'; background-image: url('/images/modules/manager/noiz.png?1333974834'),linear-gradient(top, #A3ABB9 0%,#8D93A5 100%); }"); GM_addStyle('#friedns_dead_list > li a.friends_dead_item { margin:5px 0px 0px 10px; white-space:nowrap; line-height:44px; float: left; }'); GM_addStyle('#friedns_dead_list > li a.friends_dead_item strong { color:white; }'); GM_addStyle('#friedns_dead_list > li a.friends_dead_item img { width: 40px; transition: all 0.1s ease 0s; padding: 1px; margin-right: 10px; image-rendering: optimizequality; height: 40px; float: left; box-shadow: 0 0 2px rgba(0, 0, 0, 0.1); border-radius: 3px 3px 3px 3px; border: 1px solid #E4E4E4; background: none repeat scroll 0 0 #FFFFFF; }'); GM_addStyle('#friedns_dead_list > li a.friends_dead_item:hover img { box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); }'); GM_addStyle("#friedns_dead_list > li a.friens_upgrade_action { float:right; width: 100px; display: block; text-align: center; font-size: 11px; color: white; padding: 8px 0px; font-weight: bold; text-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0; margin: 13px 13px 0px auto; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px,rgba(255, 255, 255, 0.3) 0 1px 0 inset; -moz-background-clip: padding-box; -webkit-background-clip: padding-box; background-clip: padding-box; background-color: #9F2A29; background-image: url('/images/modules/manager/noiz.png?1333974834'); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-gradient(linear, left bottom, left top, color-stop(1, #CD5756), color-stop(0, #9F2A29)); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-linear-gradient(center bottom, #CD5756 0%, #9F2A29 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-moz-linear-gradient(top, #CD5756 0%, #9F2A29 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-o-linear-gradient(top, #CD5756 0%, #9F2A29 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-ms-linear-gradient(top, #CD5756 0%, #9F2A29 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cd5756e', endColorstr='#9f2a29',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#cd5756', endColorstr='#9f2a29')'; background-image: url('/images/modules/manager/noiz.png?1333974834'),linear-gradient(top, #CD5756 0%,#9F2A29 100%); border: 1px solid #A53D3B; border-top: 1px solid #C45855; border-bottom: 2px solid #7C2322; }"); GM_addStyle("#friedns_dead_list > li a.friens_upgrade_action:hover { background-color: #B32F2E; background-image: url('/images/modules/manager/noiz.png?1333974834'); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-gradient(linear, left bottom, left top, color-stop(1, #D36B6A), color-stop(0, #B32F2E)); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-linear-gradient(center bottom, #D36B6A 0%, #B32F2E 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-moz-linear-gradient(top, #D36B6A 0%, #B32F2E 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-o-linear-gradient(top, #D36B6A 0%, #B32F2E 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-ms-linear-gradient(top, #D36B6A 0%, #B32F2E 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d36b6ae', endColorstr='#b32f2e',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#d36b6a', endColorstr='#b32f2e')'; background-image: url('/images/modules/manager/noiz.png?1333974834'),linear-gradient(top, #D36B6A 0%,#B32F2E 100%); }"); GM_addStyle('#friedns_dead_list > li a.friens_upgrade_action span { }'); GM_addStyle('#friedns_dead_list > li a.friens_upgrade_action img { display:none }'); GM_addStyle("#friedns_dead_list > li a.friens_upgrade_action.removed { border-width:0px; background-color: #8890A1; background-image: url('/images/modules/manager/noiz.png?1333974834'); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-gradient(linear, left bottom, left top, color-stop(1, #7E8593), color-stop(0, #8890A1)); background-image: url('/images/modules/manager/noiz.png?1333974834'),-webkit-linear-gradient(center bottom, #7E8593 0%, #8890A1 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-moz-linear-gradient(top, #7E8593 0%, #8890A1 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-o-linear-gradient(top, #7E8593 0%, #8890A1 100%); background-image: url('/images/modules/manager/noiz.png?1333974834'),-ms-linear-gradient(top, #7E8593 0%, #8890A1 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7e8593e', endColorstr='#8890a1',GradientType=1 ); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr='#7e8593', endColorstr='#8890a1')'; background-image: url('/images/modules/manager/noiz.png?1333974834'),linear-gradient(top, #7E8593 0%,#8890A1 100%); box-shadow: rgba(0, 0, 0, 0.2) 0 1px 0 inset,rgba(255, 255, 255, 0.2) 0 1px; cursor: default; }"); GM_addStyle('#friedns_dead_list > li a.friens_upgrade_action.removed span { display:none }'); GM_addStyle('#friedns_dead_list > li a.friens_upgrade_action.removed img { display:inline; margin-bottom:-8px; margin-top:-7px; }'); }