Hack Forums - Fixed Quick Reply

Fixes the quick reply formula to the bottom of the viewport to make it easier to browse the thread while composing a reply.

  1. // ==UserScript==
  2. // @name Hack Forums - Fixed Quick Reply
  3. // @namespace Doctor Blue
  4. // @description Fixes the quick reply formula to the bottom of the viewport to make it easier to browse the thread while composing a reply.
  5. // @include *hackforums.net/showthread.php?tid=*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
  7. // @version 1.0
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. // Prevent conflicts with other userscripts
  12. $j = $.noConflict(true)
  13.  
  14. $j('#quick_reply_form .expcolimage').remove() // Remove the expand/collapse button
  15. $j('#quick_reply_form tbody').hide() // Hide the quick reply field by default
  16. $j('#quick_reply_form textarea').attr('rows', '6') // Reduce textarea height to 6 rows
  17.  
  18. // Make quick reply header clickable
  19. $j('#quick_reply_form thead')
  20. .css('cursor', 'pointer')
  21. .on('click', function() {
  22. $j('#quick_reply_form tbody').toggle()
  23. })
  24.  
  25. // Move the quick reply form to the fixed position
  26. $j('#quick_reply_form')
  27. .css('width', 'calc(95% - 15px)')
  28. .css('position', 'fixed')
  29. .css('bottom', '0')