MovieChat.org on IMDb - Companion Script

Remove grey sidebars on MovieChat.org when using drhouse's script.

目前为 2017-05-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name MovieChat.org on IMDb - Companion Script
  3. // @version 1.10
  4. // @description Remove grey sidebars on MovieChat.org when using drhouse's script.
  5. // @author RandomUsername404
  6. // @match https://moviechat.org/*
  7. // @exclude https://moviechat.org/
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  9. // @run-at document-start
  10. // @grant none
  11. // @icon http://moviechat.org/favicons/favicon.ico
  12. // @namespace https://greasyfork.org/users/105361
  13. // ==/UserScript==
  14.  
  15. $(document).ready(function() {
  16. var width = $(window).width();
  17.  
  18. // If current width <= 770px :
  19. if(width <= 770)
  20. {
  21. $('.container').css('padding-right', '0px');
  22. $('.container').css('padding-left', '0px');
  23. $('.container').css('margin-right', '0');
  24. $('.container').css('margin-left', '0');
  25. $('.container').css('width', '100%');
  26. // Move the logo slightly on the right :
  27. $('#logo').css('margin-left', '1em');
  28. // Reduce the top-bar size :
  29. $('.col-md-12').css('height', '4.8em');
  30. $('.navbar').css('height', '4.8em');
  31. $('.container').css('margin-top', '-0.7em');
  32. // Hide the description and add a button to display it when requested :
  33. var descriptionButton = $('<input type="button" value="Overview" id="despBtn" class="btn btn-yellow btn-block" onclick="this.blur();"/>');
  34. descriptionButton.insertBefore($(".movie-overview"));
  35. $(".movie-overview").hide();
  36. $("#despBtn").click(function(){
  37. $(".movie-overview").toggle();
  38. });
  39. // Make the author's name visible :
  40. $(".col-xs-3").removeClass('hidden-xs');
  41. // TO DO : vertically center Title and Replies
  42. }
  43. })();