// ==UserScript== // @name ao3 work block // @namespace https://greasyfork.org/en/users/36620 // @version 0.2.5 // @description permanently hide works // @author scriptfairy // @match http*://archiveofourown.org/*works* // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js // @grant GM_setValue // @grant GM_listValues // @grant GM_deleteValue // @downloadURL none // ==/UserScript== (function($) { function blockThis(work) { var id = $(work).attr('id'); GM_setValue(id, id); } function unblockThis(work) { var id = $(work).attr('id'); GM_deleteValue(id); } function blockAll() { var ids = GM_listValues(); for (j=0;j').text('button.workblock {background-color:inherit; background-image:none; border:none; font-family:inherit; padding:0; text-decoration:underline; margin-left:5px;} button.workblock:hover {text-decoration:none}').appendTo($('head')); // wipe GM_list clean and start over $('ul.primary.navigation.actions li.search').before('
  • Clear blocked list
  • '); $('.block-clear').click(function() { var keys = GM_listValues(); for (k=0;kBlock'); } $('button.workblock.block').click(function() { var work = $(this).parents('li.blurb'); blockThis(work); $(work).hide(); }); }); })(window.jQuery);