Filter Me

adds a filter me button to the infobar

目前为 2015-07-21 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Filter Me
  3. // @namespace pendevin
  4. // @description adds a filter me button to the infobar
  5. // @include http://boards.endoftheinter.net/showmessages.php*
  6. // @include http://archives.endoftheinter.net/showmessages.php*
  7. // @include https://boards.endoftheinter.net/showmessages.php*
  8. // @include https://archives.endoftheinter.net/showmessages.php*
  9. // @version 1
  10. // @grant none
  11. // @require http://code.jquery.com/jquery-2.1.3.min.js
  12. // ==/UserScript==
  13.  
  14. //ll breaks without noconflict jquery
  15. this.$ = this.jQuery = jQuery.noConflict(true);
  16.  
  17. //get our userid from the profile link
  18. var userid = $('.userbar > a').first().attr('href');
  19. userid = userid.substring(userid.indexOf('user=') + 5);
  20. //we'll stick this on the infobar because that's traditional i guess
  21. var infobar = $('#u0_2');
  22. //add the thing eh
  23. infobar.append('<span class="filter_me"> | <a href="' + location.href + '&u=' + userid + '">Filter Me</a></span>');