MovieChat.org - Mobile Companion

A more compact view for MovieChat.org on mobile.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         MovieChat.org - Mobile Companion
// @version      1.21
// @description  A more compact view for MovieChat.org on mobile.
// @author       RandomUsername404
// @match        https://moviechat.org/*
// @require      https://code.jquery.com/jquery-3.3.1.min.js
// @run-at       document-start
// @grant        none
// @icon         http://moviechat.org/favicons/favicon.ico

// @namespace https://greasyfork.org/users/105361
// ==/UserScript==

$(document).ready(function() {
    var width = $(window).width();

    // If current width <= 770px :
    if(width <= 770)
    {
        // Enlarge view and hide scrollbars
        $('.container').css( {'padding-right':'0px','padding-left':'0px','margin-right':'0','margin-left':'0','width':'100%'} );
        $('html').css('overflow', 'hidden');

        // Move the logo slightly on the right
        $('#logo').css('margin-left', '1em');

        // Slightly move the navbar
        $('.navbar-right').css('margin-right', '0px');

        // Reduce the top-bar size
        $('.col-md-12').css('height', '4.8em');
        $('.navbar').css('height', '4.8em');
        $('.container').css('margin-top', '-0.7em');

        // Hide the description and add a button to display it when requested
        $(".movie-overview").hide();
        var descriptionButton = $('<a class="btn btn-yellow btn-block" id="despBtn" href="#">Overview</a>');
        descriptionButton.insertBefore($("#discover"));
        $("#despBtn").css("margin-top","5px");

        $("#despBtn").click(function(event){
            event.preventDefault();
            $(".movie-overview").toggle();
        });

        // Make the author's name visible when possible
        if(width >= 450)
            {
                var authorDiv = $(".col-xs-3:last-child");
                (authorDiv).removeClass('hidden-xs');
                $('.col-xs-3').css('width', '16%');
                $(authorDiv).css( {'width':'18%','text-align':'left','overflow':'hidden','text-overflow':'ellipsis'} );
            }

        // Remove the huge ads at the bottom of the screen
        //$("#rcjsload_358172").hide();

        // Remove footer
        $(".footer").hide();
        $('body').css('background', 'white');
    }

 });