filtered_queue_link_swap

Swap 'filter out subreddits' link for the link to the unmod queue. On non-filtered page, it goes to the filtered unmod. On the filtered page, it goes back to the unfiltered unmod queue.

  1. // ==UserScript==
  2. // @author /u/noeatnosleep
  3. // @name filtered_queue_link_swap
  4. // @version 1.3
  5. // @namespace filtered_queue_link_swap
  6. // @description Swap 'filter out subreddits' link for the link to the unmod queue. On non-filtered page, it goes to the filtered unmod. On the filtered page, it goes back to the unfiltered unmod queue.
  7. // @include http://*reddit.com/*
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
  9. // ==/UserScript==
  10.  
  11. document.addEventListener("DOMContentLoaded", replaceLinks, false );
  12.  
  13. if( document.readyState === "complete" ) {
  14. replaceLinks();
  15. }
  16.  
  17. function replaceLinks() {
  18. Array.forEach( document.links, function(a) {
  19. a.href = a.href.replace( "/mod", "mod/about/unmoderated/" );
  20. });
  21. }