Greasy Fork

Greasy Fork is available in English.

hdrezka-cleanup

Cleanup hdrezka

当前为 2021-04-24 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         hdrezka-cleanup
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Cleanup hdrezka
// @author       rub4ek
// @match        https://rezka.ag/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Remove ads
    $(".b-content__main > .b-post__mixedtext").next().find("iframe").parent().remove();
    $(".b-player > a[target='_blank'").remove();

    // Remove extra right padding for content page
    var $contentColumns = $(".b-content__columns");
    $contentColumns.css("padding-right", "0");

    // Style for content item cover
    var $contentInlineItemCover = $(".b-content__inline_item-cover");
    $contentInlineItemCover.css("border-color", "transparent");

    // Remove extra right padding on main content listing
    var $contentInlineInnerMainProBar = $(".b-content__inline_inner_mainprobar");
    $contentInlineInnerMainProBar.css("padding-right", "0");

    // Remove last episode info
    var $postLastEpisodeOut = $(".b-post__lastepisodeout");
    $postLastEpisodeOut.remove();

    // Resize playeer
    var width = "960px";
    var height = "720px";
    var $cdnPlayerConteiner = $("#cdnplayer-container");
    $cdnPlayerConteiner.css("width", width);
    $cdnPlayerConteiner.css("height", height);
    var $cdnPlayer = $("#cdnplayer");
    $cdnPlayer.css("width", width);
    $cdnPlayer.css("height", height);

    // Add player margin
    var $player = $(".b-player");
    $player.css("margin-bottom", "20px");

    // Remove telegram info block
    var $tgInfoBlock = $("#tg-info-block-exclusive");
    $tgInfoBlock.remove();

    // Style status
    var $postStatus = $(".b-post__status_wrapper");
    $postStatus.css("width", "auto");
    $postStatus.css("margin", "10px 10px 12px 13px");

    // Remove support block
    var $postSupportHolder = $(".b-post__support_holder");
    $postSupportHolder.remove();

    // Remove social block
    var $postSocialHolder = $(".b-post__social_holder_wrapper");
    $postSocialHolder.remove();

    // Remove rating block
    var $postRatingTable = $(".b-post__rating_table");
    var $postRatingTableAdd = $postRatingTable.next()
    $postRatingTable.remove();
    $postRatingTableAdd.remove();

    // Remove VK block
    var $vkGroups = $("#vk_groups");
    $vkGroups.remove();
})();