talichan

script

Jan 18th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. // ==UserScript==
  2. // Displayable Name of your script
  3. // @name FoolX
  4.  
  5. // Brief description
  6. // @description Enhances functionality of FoolFuuka boards
  7.  
  8. // Your name, copyright
  9. // @author aBox
  10. // @copyright 2013+, aBox
  11.  
  12. // Version Number
  13. // @version 0.7
  14.  
  15. // Urls process this user script on
  16. // You can add board name between / * to limit script to certain boards.
  17. // Change include to match to make it work even on 4chan archive (not much tested)
  18. // @include http://*loveisover.me/*
  19. // @include http://*imcute.yt/*
  20. // @include http://nsfw.foolz.us/*
  21. // @include http://archive.foolz.us/*
  22. // @include https://nsfw.foolz.us/*
  23. // @include https://archive.foolz.us/*
  24.  
  25.  
  26. // Add any library dependencies here, so they are loaded before your script is loaded.
  27. // @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js
  28.  
  29. // ==/UserScript==
  30.  
  31. Posts = $('.post').length
  32. PostIcon = "http://i.imgur.com/bSofxjz.jpg"
  33. DocumentTitle = document.title
  34. NewPostCount = 0
  35. RulesBox = $(".rules_box").html();
  36.  
  37. function ThreadUpdate() {
  38.  
  39. $(function(){
  40. $('.pull-left').removeClass('stub')
  41. });
  42.  
  43. $(".rules_box").html("<h6>Posts: " + Posts + "/400</h6>" + RulesBox)
  44.  
  45. if ($('.post').length > Posts)
  46. {
  47.  
  48. NewPostCount = $('.post').length - Posts -1
  49. if (NewPostCount % 2 !== 0) NewPostCount = NewPostCount - 1
  50. document.title = '(' + NewPostCount + ') ' + DocumentTitle
  51.  
  52. }
  53.  
  54. if (focus == true)
  55. {
  56. document.title = DocumentTitle
  57. NewPostCount = 0
  58. Posts = $('.post').length
  59. }
  60.  
  61.  
  62. }
  63.  
  64. $(document).ready(function(){
  65. focus = true;
  66.  
  67. $(window).focus(function(){
  68. focus = true;
  69. });
  70.  
  71. $(window).blur(function(){
  72. focus = false;
  73. });
  74.  
  75. });
  76.  
  77. ThreadUpdate();
  78. window.setInterval( function(){ ThreadUpdate(); }, 1000 );
Advertisement
Add Comment
Please, Sign In to add comment