MovieChat.org on IMDb - Companion Script

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

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

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