Greasy Fork is available in English.

MovieChat.org on IMDb/TMDb - Desktop Companion

Makes MovieChat.org look more streamlined when displayed within a IMDb or TMDb page.

  1. // ==UserScript==
  2. // @name MovieChat.org on IMDb/TMDb - Desktop Companion
  3. // @version 1.37
  4. // @description Makes MovieChat.org look more streamlined when displayed within a IMDb or TMDb page.
  5. // @author RandomUsername404
  6. // @match *://moviechat.org/*
  7. // @require https://code.jquery.com/jquery-3.3.1.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. $(function() {
  15. var width = $(window).width();
  16. var url = window.location.pathname;
  17. url = url.slice(1,7);
  18.  
  19. // If current width <= 824px
  20. if (width <= 824) {
  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. $('.board-collection').css('padding-top', '0px');
  26.  
  27. // Tweaks for the combined view
  28. if (width >= 800 && width <= 824) {
  29. $(".main").css('margin-left', '-5px');
  30. $(".main").css('margin-right', '-60px');
  31. $(".btn-block").css('display', 'inline-block');
  32. }
  33.  
  34. // Hide top-bar
  35. $("nav.navbar.navbar-default").hide();
  36.  
  37. // Hide footer
  38. $(".footer").hide();
  39.  
  40. // Hide bottom scrollbar
  41. $("html").css( {'overflow-x':'hidden','margin-top':'-15px'} );
  42.  
  43. var tree_structure = "#wrap > div.main > div > div > div:nth-child(1) > div";
  44.  
  45. // (Only on threads view)
  46. if ((!url.includes('login') || !url.includes('signup')) || (!url.includes('user') || !url.includes('blog'))) {
  47.  
  48. // Hide the description
  49. $(".movie-overview").hide();
  50.  
  51. // Hide tree structure
  52. $(tree_structure).hide();
  53.  
  54. // Remove the "news, rumors & gossip" tab
  55. //$("ul.nav.nav-tabs").hide();
  56.  
  57. var newDiv = document.createElement("div");
  58. $(newDiv).css({"margin-bottom": "-10px"});
  59.  
  60. // Keep 'add new post' button
  61. $(newDiv).append($('#discover'));
  62.  
  63. // Keep the navbar
  64. $(newDiv).append($('.nav.navbar-nav.navbar-right'));
  65.  
  66. // Show everything but the search button
  67. $(newDiv).insertBefore($('.main'));
  68. $('#discover').css( {'width':'46%','left':'5px'} );
  69. $("#compact-search").css('display','none');
  70. $('.nav.navbar-nav.navbar-right').css('padding-right','10px');
  71.  
  72. // Make author's names visible when possible
  73. if (width >= 450 && width < 770) {
  74. var authorDiv = $(".col-xs-3:last-child");
  75. (authorDiv).removeClass('hidden-xs');
  76. $('.col-xs-3').css('width', '16%');
  77. $(authorDiv).css( {'width':'18%','text-align':'left'} );
  78. //$(authorDiv).css( {'overflow':'hidden','text-overflow':'ellipsis'} );
  79. }
  80.  
  81. }
  82.  
  83. // Within a thread
  84. $(".post").each(function(){
  85.  
  86. // Show tree structure
  87. $(tree_structure).show();
  88.  
  89. /* var threadDiv = document.createElement("div");
  90.  
  91. // Keep the navbar
  92. $(threadDiv).append($('.nav.navbar-nav.navbar-right'));
  93.  
  94. // Show everything but the search button
  95. $(threadDiv).insertBefore($('#wrap'));
  96. $("#compact-search").css('display','none');*/
  97. });
  98.  
  99. // On specific pages
  100. if ((url.includes('login') || url.includes('signup')) || (url.includes('user') || url.includes('blog'))) {
  101. // Show tree structure (which could be a number of things in this case)
  102. $(tree_structure).show();
  103. };
  104. }
  105.  
  106. // Remove grey background
  107. $(".main").css('box-shadow','0px 0px 0px 0px rgba(0,0,0,0)');
  108. $("body").css('background-color','white');
  109. });