Selbi

Hide Comments on Story Pages

Dec 5th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. // ==UserScript==
  2. // @name FIMFiction Hide Comments
  3. // @namespace Selbi
  4. // @include http*://www.fimfiction.net/story/*/*/*
  5. // @exclude http*://www.fimfiction.net/story/*/*comment/*
  6. // @include http*://www.fimfiction.net/chapter/*
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
  8. // @version 1
  9. // ==/UserScript==
  10.  
  11. $("#story_comments").hide();
  12. $("#add_comment_box").hide();
  13.  
  14. unsafeWindow.toggleComments = function() {
  15. if ($("#story_comments").css('display') == 'none') {
  16. $("#story_comments").show();
  17. $("#add_comment_box").show();
  18. } else {
  19. $("#story_comments").hide();
  20. $("#add_comment_box").hide();
  21. }
  22. }
  23.  
  24. $("#story_comments").before('<div class="message" style="margin-top:30px;text-align:center;"><a href="#" id="showComments" onclick="toggleComments();return false;"><i>Toggle Comments</i></a></div>');
Advertisement
Add Comment
Please, Sign In to add comment