ao3 add menu items

add link to your skins and drafts to the dropdown menu

当前为 2016-06-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name ao3 add menu items
  3. // @version 0.2.1
  4. // @namespace https://greasyfork.org/users/36620
  5. // @description add link to your skins and drafts to the dropdown menu
  6. // @author scriptfairy
  7. // @match http://archiveofourown.org/*
  8. // @include https://archiveofourown.org/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function($){
  13. $('body').ready(function(){
  14. var name = $('ul.navigation li:first-child a').attr('href');
  15. name = name.slice(name.lastIndexOf('/')+1);
  16. $('#greeting li.dropdown:first-child ul.menu li:first-child').after($('<li><a href="/users/'+name+'/skins">My Skins</a></li>'));
  17. $('#greeting li.dropdown:first-child ul.menu li:contains("My Collections")').after($('<li><a href="/users/'+name+'/works/drafts">My Drafts</a></li>'));
  18. });
  19. })(window.jQuery);