MovieChat.org - Mobile Companion

A more compact view for MovieChat.org on mobile.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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://greatest.deepsurf.us/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');
    }

 });