// ==UserScript== // @name HDrezka Cleanup // @name:en HDrezka Cleanup // @namespace http://tampermonkey.net/ // @version 0.28 // @description Cleanup HDrezka: change content width, change player size, remove blocks (telegram, social, support, vk, etc), restyle blocks (cover, status, rating, etc) // @description:en Cleanup HDrezka: change content width, change player size, remove blocks (telegram, social, support, vk, etc), restyle blocks (cover, status, rating, etc) // @author rub4ek // @match https://hdrezka.me/* // @match https://hdrezka.ag/* // @match https://rezka.ag/* // @match https://rezkify.com/* // @match https://kinopub.me/* // @match http://hdrezka.co/* // @icon https://www.google.com/s2/favicons?domain=rezka.ag // @grant GM_addStyle // @run-at document-start // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; /* ------------------------------------------------- */ /* --------------GLOBAL----------------------------- */ /* ------------------------------------------------- */ const arrowImageURL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAABmJLR0QA/wD/AP+gvaeTAAABa0lEQVR4nO3awUrDQBSF4dMuGhc+uF0puK/v4KL4RPoARbLUxTRQi5nMJDPJvcn/gRsp5NyfWgSVAAAAAAAAAAAAAAAAAACYXSPpKOlL0qekp+v3UNBB0rukn7uvD0kPC+5alb7IxC5oKDKxC0iNTOwJciMTe4SxkYmdoZF0VjzkOfE1/OrXI+Wd3L1bc16LG2PCETvTlGDETlQiFLEHlAxE7B41whD7Ts0gxL6aI8TmY88ZYLOxlzh8c7GXPHgzsS0camFDVZYOtLSlKIuHWdw0ieWDLG/L4uEQDxujPB3gaesfHoe72+xu8A03290MjTB/g/mBGczeYnbYBOZuSv2XAI9/7jd126uVIZWkxH6pPWIv6TsywHvkzlDsi6RdzQF7SW3Pw9cSuROL3Sq0qOrtnwevLXKnL/Zpjoc/KsRuFX6EnrXOyJ1G4TP5onDzSaHBbKp+Rhm00/ZuBgAAAAAAAAAAAAAAAODKL8SQFSF3JeZKAAAAAElFTkSuQmCC' /* ------------------------------------------------- */ /* --------------GLOBAL-STYLES---------------------- */ /* ------------------------------------------------- */ function addStyle () { GM_addStyle(` /* Padding for content */ .b-wrapper { padding-left: 30px; padding-right: 30px; } /* Remove extra right padding for content page */ .b-content__columns { padding-right: 0; } /* Remove extra right padding on main content listing */ .b-content__inline_inner_mainprobar { padding-right: 0; } .b-content__inline_inner_mainprobar .b-content__inline_item { margin-left: 16px !important; } /* Active brand fixes */ body.active-brand, body.active-brand.pp { padding-top: 0 !important; } .active-brand #wrapper { width: auto !important; } /* Style status */ .b-post__status_wrapper { width: auto; margin: 0px 10px 0px 13px; } /* Style player */ .b-player { padding-top: 0; } .b-player #cdnplayer-preloader { height: 100%; width: 100%; } .b-player .b-simple_seasons__list { padding: 10px; } .b-player .b-player__holder_cdn { height: auto !important; } .b-player .b-player__container_cdn { resize: vertical; overflow: auto; width: 100% !important; } /* Style and resize rating block */ .b-post__rating_table > tbody > tr > td.label{ display: none !important; } .b-post__rating_table > tbody > tr > td div.b-post__rating { float:right; margin-right: 10px; } /* Hide telegram info block */ .tg__info_block_wrapper { display: none !important; } /* Hide last episode info */ .b-post__lastepisodeout { display: none !important; } /* Hide support block */ .b-post__support_holder { display: none !important; } /* Hide social block */ .b-post__social_holder_wrapper .append { display: none !important; } .b-post__social_holder_wrapper .share-label { display: none !important; } /* Hide mixedtext */ .b-post__mixedtext { text-indent: -9999px; padding: 0; } /* Hide VK */ #vk_groups { display: none !important; } /* Hide some ads containers */ .b-content__main > .b-post__mixedtext + div[style], .b-content__main > .b-post__rating_table + div[style], .b-content__main > div > .b-player > .b-player__network_issues_holder + div[style], .b-content__main > div > .b-player > a[target='_blank'], .b-content__main + div, .b-wrapper .nopadd, .b-seriesupdate__block_list > .b-seriesupdate__block_list_item[data-url=''] { display: none !important; } /* Style content page */ .b-post .b-sidetitle { background: #cfcfcf; //color: #efefef; font-size: 16px; font-weight: bold; line-height: 18px; overflow: hidden; padding: 10px 18px; text-overflow: ellipsis; white-space: nowrap; } .b-post .b-sidetitle a { //color: #efefef; } .b-theme__template__night .b-post .b-sidetitle { background: #192125; } .b-post .b-post__schedule .b-sidetitle { display: none; } .b-post .b-post__partcontent { margin-top: 0; } .b-post .b-post__actions .btn { border: 0; border-radius: 0; } /* Tumbler */ .hc-tumbler { width: 38px; height: 30px; background-color: #000; border: #1d92b2; border-radius: 30px; display: flex; justify-content: space-between; align-items: center; padding: 0 6px; cursor: pointer; position: relative; } .hc-tumbler:before, .hc-tumbler:after { background-size: 15px 15px; background-repeat: no-repeat; border-radius: 50%; content: ''; display: block; top: 50%; margin-top: -7px; height: 15px; width: 15px; position: absolute; } .hc-tumbler:before { background-color: green; left: 6px; } .hc-tumbler:after { background-color: indianred; right: 6px; } .hc-tumbler > .hc-tumbler-dot { position: absolute; height: 20px; width: 20px; border-radius: 50%; background-color: #fff; transition: transform .5s,background-color .5s; will-change: transform; z-index: 2; } body.b-theme__template__night .hc-tumbler { background: #222d33; } `); console.log(`HDrezka Cleanup: styles changed`); } /* ------------------------------------------------- */ /* --------------STYLE-IMPROVEMENTS----------------- */ /* ------------------------------------------------- */ function initStyleImprovements() { function addStyle () { GM_addStyle(` /* Standard theme */ .hc-style .b-content__inline_item .info { background-color: #6f6f6f; color: #fff; } /* Night theme */ .hc-style.b-theme__template__night a { color: #fff; } .hc-style.b-theme__template__night a:visited { color: #fff; } .hc-style.b-theme__template__night .b-post__info a { color: #fff; } .hc-style.b-theme__template__night .persons-list-holder .person-name-item a { color: #fff !important; border-color: #fff; } .hc-style.b-theme__template__night .b-newest_slider__title span { border-color: #fff; color: #fff; } .hc-style.b-theme__template__night .b-content__inline_item .cat { background-color: #060f13 !important; } /* Content items */ .hc-style .b-content__inline_item { width: 166px; margin-right: 10px; } .hc-style .b-content__inline_item .cat { position: relative; } .hc-style .b-content__inline_item .cat .entity { display: inline-block !important; margin-right: -8px; position: absolute; left: 0; right: 0; overflow: hidden; text-overflow: ellipsis; } .hc-style .b-content__inline_item:hover .cat .entity, .hc-style .b-content__inline_item.active .cat .entity { display: none !important; margin-right: -10px; position: absolute; left: 0; right: 0; overflow: hidden; text-overflow: ellipsis; } .hc-style .b-content__inline_item-cover { padding: 0; border: 0; } .hc-style .b-content__inline_item .cat { position: relative; top: unset; bottom: 0; right: 0; border-radius: 0; width: 100%; } .hc-style .b-content__inline_item .info { border-radius: 0 !important; width: 100%; margin-bottom: 26px; } .hc-style .b-content__inline_item .trailer { display: none !important; left: 0; } .hc-style .b-newest_slider__list .b-content__inline_item { width: 92px; margin-right: 8px; } .hc-style .b-sidelist .b-content__inline_item { width: 92px; margin-right: 8px; } /* Misc */ .hc-style .b-newest_slider__title { padding-bottom: 20px; } /* Setting */ .hc-style .hc-tumbler-styles .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } `); } addStyle(); resolveStyleImprovements(); document.addEventListener('DOMContentLoaded', initStyleImprovementsSetting); document.addEventListener('DOMContentLoaded', resolveStyleImprovements); function resolveStyleImprovements() { const bodyElem = document.querySelector('body'); if (!bodyElem) return; if (isStyleImprovementsEnabled()) { bodyElem.classList.add('hc-style'); } else { bodyElem.classList.remove('hc-style'); } } function isStyleImprovementsEnabled() { return localStorage.getItem('hc-style-improvements') == 'true'; } function switchStyleImprovements() { localStorage.setItem('hc-style-improvements', !isStyleImprovementsEnabled()); resolveStyleImprovements(); } function initStyleImprovementsSetting() { const elem = document.createElement('div'); elem.classList.add('hc-content-size-setting'); elem.insertAdjacentHTML('beforeend', `
Визуальные улучшения `); const tumbler = elem.querySelector('.hc-tumbler'); tumbler.addEventListener('click', switchStyleImprovements); addSetting(elem); } } /* ------------------------------------------------- */ /* --------------RESIZE-PLAYER---------------------- */ /* ------------------------------------------------- */ function resizePlayer() { const playerHolderElem = document.querySelector('.b-player__holder_cdn'); if (!playerHolderElem) return; const playerContainerElem = document.querySelector('.b-player__container_cdn'); if (!playerContainerElem) return; const contentMainElem = document.querySelector('.b-content__main'); if (!contentMainElem) return; const initialWidth = playerHolderElem.offsetWidth; const initialHeight = playerHolderElem.offsetHeight; let resizedWidth = contentMainElem.offsetWidth; let windowHeight = window.innerHeight; if (initialHeight > 0 && initialWidth !== resizedWidth) { let ratio = initialWidth / initialHeight; let resizedHeight = resizedWidth / ratio; if (resizedHeight > windowHeight) { resizedHeight = windowHeight; resizedWidth = windowHeight * ratio; } playerHolderElem.style.width = resizedWidth + 'px'; playerContainerElem.style.height = resizedHeight + 'px'; console.log( `HDrezka Cleanup: player resized ` + `from ${initialWidth}x${initialHeight} ` + `to ${resizedWidth}x${resizedHeight}.` ) } } /* ------------------------------------------------- */ /* --------------SIZE-TUMBLER----------------------- */ /* ------------------------------------------------- */ function initContentSizeTumbler() { GM_addStyle(` /* Content Size Setting */ .hc-content-size-setting { line-height: 30px; } /* Content Size Tumbler */ .hc-content-size-tumbler { margin-left: 10px; width: 78px; } .hc-content-size-tumbler:before, .hc-content-size-tumbler:after { display: none; } .hc-content-size-tumbler .hc-content-size-tumbler-point { background-size: 15px 15px; background-repeat: no-repeat; border-radius: 50%; content: ''; display: block; height: 20px; width: 20px; position: absolute; background-color: #999; background-clip: content-box; box-sizing: border-box; border-color: transparent; border-style: solid; } .hc-content-size-tumbler .hc-content-size-tumbler-point:nth-child(1) { border-width: 8px; } .hc-content-size-tumbler .hc-content-size-tumbler-point:nth-child(2) { border-width: 7px; transform: translateX(calc(100% - 2px)); } .hc-content-size-tumbler .hc-content-size-tumbler-point:nth-child(3) { border-width: 6px; transform: translateX(calc(200% - 2px)); } .hc-content-size-tumbler .hc-content-size-tumbler-point:nth-child(4) { border-width: 5px; transform: translateX(calc(300% - 2px)); } .hc-content-size-wide .hc-content-size-tumbler .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } .hc-content-size-ultrawide .hc-content-size-tumbler .hc-tumbler-dot { transform: translateX(calc(200% - 2px)); } .hc-content-size-full .hc-content-size-tumbler .hc-tumbler-dot { transform: translateX(calc(300% - 2px)); } /* Content Sizes */ .hc-content-size-wide .b-wrapper { width: auto; min-width: 960px; max-width: 1150px; } .hc-content-size-ultrawide .b-wrapper { width: auto; min-width: 960px; max-width: 1340px; } .hc-content-size-full .b-wrapper { min-width: 960px; width: auto; } .hc-content-size-full .glory { width: auto; } `); resolveContentSize(); document.addEventListener('DOMContentLoaded', initContentSizeSetting); document.addEventListener('DOMContentLoaded', resolveContentSize); function initContentSizeSetting() { const elem = document.createElement('div'); elem.classList.add('hc-content-size-setting'); elem.insertAdjacentHTML('beforeend', `
Ширина контента `); const tumbler = elem.querySelector('.hc-content-size-tumbler'); tumbler.addEventListener('click', switchContentSize); addSetting(elem); } function getContentSize() { return localStorage.getItem('hc-content-size'); } function setContentSize(value) { return localStorage.setItem('hc-content-size', value); } function switchContentSize() { let size = getContentSize() switch (size) { case 'full': size = 'normal'; break; case 'normal': size = 'wide'; break; case 'wide': size = 'ultrawide'; break; default: size = 'full'; break; } setContentSize(size); resolveContentSize(); } function resolveContentSize() { const bodyElem = document.querySelector('body'); if (!bodyElem) return; bodyElem.classList.remove('hc-content-size-wide') bodyElem.classList.remove('hc-content-size-ultrawide') bodyElem.classList.remove('hc-content-size-full') window.removeEventListener('resize', resizePlayer); switch(getContentSize()) { case 'wide': bodyElem.classList.add('hc-content-size-wide') break; case 'ultrawide': bodyElem.classList.add('hc-content-size-ultrawide') break; case 'full': bodyElem.classList.add('hc-content-size-full') window.addEventListener('resize', resizePlayer); break; } resizePlayer(); } } /* ------------------------------------------------- */ /* --------------HIDE-INFO-------------------------- */ /* ------------------------------------------------- */ function initHideInfoButton() { GM_addStyle(` /* Content hide info (button) */ .hc-hide-info-button { content: ''; width: 25px; height: 25px; margin-right: 5px; background-size: 25px 25px; background-repeat: no-repeat; background-image: url(${arrowImageURL}); cursor: pointer; } .hc-hide-info .hc-hide-info-button { transform: rotate(180deg); } /* Content hide info (hidden styles) */ .hc-hide-info .b-post__infotable, .hc-hide-info .b-post__description { display: none !important; } /* Content hide info (night theme) */ .b-theme__template__night .hc-hide-info-button { filter: invert(100%) sepia(95%) saturate(21%) hue-rotate(280deg) brightness(106%) contrast(106%); } `); resolveHideInfo(); document.addEventListener('DOMContentLoaded', addHideInfoButton); document.addEventListener('DOMContentLoaded', resolveHideInfo); document.addEventListener('DOMContentLoaded', addPlayerCover); function addHideInfoButton() { const postTitleElem = document.querySelector('.b-post__title'); if (!postTitleElem) return; const buttonElem = document.createElement('div'); buttonElem.classList.add('pull-right'); buttonElem.classList.add('hc-hide-info-button'); buttonElem.addEventListener('click', switchHideInfo); postTitleElem.insertBefore(buttonElem, postTitleElem.firstChild); } function addPlayerCover() { const coverElem = document.querySelector('.b-sidecover'); if (!coverElem) return; const imgURL = coverElem.querySelector('img').src; GM_addStyle(` #oframecdnplayer video[style*='position: absolute'] { background-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,.8) 50%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 100%), url('${imgURL}'); background-size: auto 100%; background-position: center; background-repeat: no-repeat; } `); } function resolveHideInfo() { const bodyElem = document.querySelector('body'); if (!bodyElem) return; if (isHideInfoEnabled()) { bodyElem.classList.add('hc-hide-info'); } else { bodyElem.classList.remove('hc-hide-info'); } } function isHideInfoEnabled() { return localStorage.getItem('hc-hide-info') == 'true'; } function switchHideInfo() { localStorage.setItem('hc-hide-info', !isHideInfoEnabled()); resolveHideInfo(); } } /* ------------------------------------------------- */ /* --------------TRANSLATORS------------------------ */ /* ------------------------------------------------- */ function initHideTranslatorsButton() { GM_addStyle(` /* Content hide translators */ .b-translator__item.active { cursor: pointer; } .hc-toggle-translators-button { content: ''; float: left; width: 20px; height: 20px; margin-right: 3px; margin-top: 8px; margin-left: 5px; background-size: 20px 20px; background-repeat: no-repeat; background-image: url(${arrowImageURL}); filter: invert(100%) sepia(95%) saturate(21%) hue-rotate(280deg) brightness(106%) contrast(106%); transform: rotate(90deg); cursor: pointer; } .hc-show-translators .hc-toggle-translators-button { transform: rotate(-90deg); } .b-translator__item:not(.active):not(.hc-toggle-translators-button) { display: none; } .b-translators__title { display: none; } .hc-show-translators .b-translator__item:not(.active):not(.hc-toggle-translators-button) { display: block; } .hc-show-translators .b-translators__title { display: block; } `); document.addEventListener('DOMContentLoaded', addToggleTranslatorsButton); function addToggleTranslatorsButton() { const translatorsElem = document.querySelector('.b-translators__block'); if (!translatorsElem) return; const translatorsListElem = translatorsElem.querySelector('.b-translators__list'); if (!translatorsListElem) return; const buttonElem = document.createElement('li'); buttonElem.classList.add('hc-toggle-translators-button'); buttonElem.addEventListener('click', toggleTranslators); translatorsListElem.appendChild(buttonElem); const activeButtonElems = translatorsListElem.querySelectorAll('.b-translator__item') activeButtonElems.forEach(activeButtonElem => { activeButtonElem.addEventListener('click', function() { if (this.classList.contains('active')) { toggleTranslators() } }); }); } function toggleTranslators() { document.querySelector('.b-translators__block').classList.toggle('hc-show-translators'); } } /* ------------------------------------------------- */ /* --------------SETTINGS--------------------------- */ /* ------------------------------------------------- */ function initSettings() { const settingsImgURL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABmJLR0QA/wD/AP+gvaeTAAAZ7klEQVRogb2bZ5heV3Xvf2uf8pbpfTQalSkajaoty5YtGdywgw3GNh07hBIIOBdI4EkIl0sJkARI8CUPuaGYYMNjAlwMXFzABHCvclGxZElTJFltRtL0d+Ztp+11P8zIyIDKE5JZH8/Za+///+y1115r7X2EeZQVm676Ezs99mYNC+tEpF6Ne9zxMp/Zs+O5O+YLgzNfA63YeOWdyfihT4pxGsT1njA1rS2ExXYblm5YcMFVMrL3hYfnA4fMxyDt7e2ZbLZiwmlc5GXPvfY74rjvADwNisXC03e6Nij0DfTtOWc+sJj5GCSTySwHTaeXX+KI474H8AAkld3ld6y/H5us7enpWTgfWOaFsOu6beKlI6ey/uTHeYElfvvqCSAQkcvmA8u8ENbqlrVOVaMIbAHCuce7E+z1CveYykYkVXnDfGBx52MQmxupkdrWLQprgTGQj4PZadB/RqTDpLNDSS6/dj6wnLWXXrVuwznNPevuaGhsuKaxpvLY2NjY4bPRW79+vRdZvuu1reh0atu+nLjRB4w1NyH6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o7OzPMFgZdTWKSySGi4/uIjw8ijjukQfCR/v7dP2bOCbW3t2cqmhb+ktL06syqKxy3tWcckcXhoZ2m3P8o4qZu79+147THLWf00p2dnTWen7pPbbJJjFPCS6c0LCp+9pMDO7d98VR6vZe/dr0dGvwQ8HZEnFTH+V9NLdvYDlwGPKKwVmApQDI5THHLXSqZGvFblx2INLhxzy9+eMrrR73rN35e85MfxRgHVVWbGFX9+uDg4AcBeyq9syJ8ol1PT8/1bsPiT9lSbqct5r44MDDQdzaKy5Ytu1BENqe6NhRTXRfdg8Fjdv1bZi+tHQ72PiXh0cEF1Rfd+KFnv/Hhb4Cc8WB71boLV1qRv0/yE2PADwcGBh44KyJn0+gPleUrVg241U3TmQ1vOnHQlQVSItyjyprSrgfX2OLk/Xs2P3TVfzeWebkvjZvalsTR9SjbEVaLcLdaxhXeB/jJ1NFjtjR113xAmZcb8RIVH7SFCQ+siOqHVOlG+BCQAgoaFpuNmz1jHPxfIfNCOI7j57GJiQ5u360iXwUuOPHO5scrNSwZosJz84FlXggXi8UdYpy4fHDH22x55iAnfIdNKPc/jqQrh/v6+gbmA8u8/Kg1MzMT1dfXryAO1kXDe+qS3Cjx6IuFcv9jiRamPL97w+dH+rc+Ph9Y5u3PtPq6up+5tS2eLc44tjjRbGfGYmPMVq+l8wMv/McPvj1fOP4/a6dBSkZaMFsAAAAASUVORK5CYII='; GM_addStyle(` /* Settings */ .hc-settings { position: relative; } /* Settings tumbler */ .hc-settings-tumbler { margin-top: 5px; margin-left: 10px; } .hc-settings-tumbler:before { background-image: url('${settingsImgURL}'); background-color: transparent; } .hc-settings-tumbler:after { background-image: url('${settingsImgURL}'); background-color: transparent; } .hc-settings.active .hc-settings-tumbler > .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } .hc-settings ul { width: 250px; display: none; background: #313131; border: 1px solid rgba(0,0,0,.1); border-top: 0; position: absolute; top: 40px; left: 0px; white-space: nowrap; box-shadow: 0 5px 20px 0px rgb(0 0 0 / 70%); } .hc-settings.active ul { display: block; } .hc-settings ul li { white-space: nowrap; color: #777; font-size: 10px; font-weight: bold; margin: 0 !important; padding: 5px 10px; line-height: 18px; } body.b-theme__template__night .hc-settings ul { background: #060f13; } `); document.addEventListener('DOMContentLoaded', initSettingsButton); function initSettingsButton() { const topHeadLeft = document.querySelector('.b-tophead-left'); if (!topHeadLeft) return; const elem = document.createElement('div'); elem.classList.add('hc-settings'); elem.classList.add('pull-left'); elem.insertAdjacentHTML('beforeend', `
`); const tumbler = elem.querySelector('.hc-settings-tumbler'); tumbler.addEventListener('click', toggleSettings); topHeadLeft.appendChild(elem); } function toggleSettings(event) { event.target.closest('.hc-settings').classList.toggle('active'); } } function addSetting(element) { const topHeadLeft = document.querySelector('.b-tophead-left'); if (!topHeadLeft) return; const settingsDropdown = topHeadLeft.querySelector('.hc-settings ul'); if (!settingsDropdown) return; const settingsDropdownItem = document.createElement('li'); settingsDropdownItem.appendChild(element); settingsDropdown.appendChild(settingsDropdownItem); } /* ------------------------------------------------- */ /* --------------DOCUMENT--------------------------- */ /* ------------------------------------------------- */ function onDocumentStart() { addStyle(); initSettings(); initContentSizeTumbler(); initStyleImprovements(); initHideInfoButton(); initHideTranslatorsButton(); } function onDocumentEnd() {} document.addEventListener('DOMContentLoaded', onDocumentEnd); onDocumentStart(); })();