您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Cleanup HDrezka: change content width, change player size, remove blocks (telegram, social, support, vk, etc), restyle blocks (cover, status, rating, etc)
当前为
// ==UserScript== // @name HDrezka Cleanup // @name:en HDrezka Cleanup // @namespace http://tampermonkey.net/ // @version 0.29 // @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 // ==/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---------------------- */ /* ------------------------------------------------- */ 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; font-size: 16px; font-weight: bold; line-height: 18px; overflow: hidden; padding: 10px 18px; text-overflow: ellipsis; white-space: nowrap; } .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; } `); /* ------------------------------------------------- */ /* --------------STYLE-IMPROVEMENTS----------------- */ /* ------------------------------------------------- */ function initStyleImprovements() { GM_addStyle(` /* Standard theme */ body.hc-style .b-content__inline_item .info { background-color: #6f6f6f; color: #fff; } /* Night theme */ body.hc-style.b-theme__template__night a { color: #fff; } body.hc-style.b-theme__template__night a:visited { color: #fff; } body.hc-style.b-theme__template__night .b-post__info a { color: #fff; } body.hc-style.b-theme__template__night .persons-list-holder .person-name-item a { color: #fff !important; border-color: #fff; } body.hc-style.b-theme__template__night .b-newest_slider__title span { border-color: #fff; color: #fff; } body.hc-style.b-theme__template__night .b-content__inline_item .cat { background-color: #060f13 !important; } /* Content items */ body.hc-style .b-content__inline_item { width: 166px; margin-right: 10px; } body.hc-style .b-content__inline_item .cat { position: relative; } body.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; } body.hc-style .b-content__inline_item:hover .cat .entity, body.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; } body.hc-style .b-content__inline_item-cover { padding: 0; border: 0; } body.hc-style .b-content__inline_item .cat { position: relative; top: unset; bottom: 0; right: 0; border-radius: 0; width: 100%; } body.hc-style .b-content__inline_item .info { border-radius: 0 !important; width: 100%; margin-bottom: 26px; } body.hc-style .b-content__inline_item .trailer { display: none !important; left: 0; } body.hc-style .b-newest_slider__list .b-content__inline_item { width: 92px; margin-right: 8px; } body.hc-style .b-sidelist .b-content__inline_item { width: 92px; margin-right: 8px; } /* Misc */ body.hc-style .b-newest_slider__title { padding-bottom: 20px; } /* Setting */ body.hc-style .hc-tumbler-styles .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } `); resolve(); document.addEventListener('DOMContentLoaded', resolve); document.addEventListener('DOMContentLoaded', settings); function resolve() { if (!document.body) return; if (enabled()) { document.body.classList.add('hc-style'); } else { document.body.classList.remove('hc-style'); } } function enabled() { return localStorage.getItem('hc-style-improvements') == 'true'; } function toggle() { localStorage.setItem('hc-style-improvements', !enabled()); resolve(); } function settings() { const elem = document.createElement('div'); elem.classList.add('hc-content-size-setting'); elem.insertAdjacentHTML('beforeend', ` <div class='hc-tumbler hc-tumbler-styles pull-right'> <div class='hc-tumbler-dot'></div> </div> <span>Визуальные улучшения</span> `); const tumbler = elem.querySelector('.hc-tumbler'); tumbler.addEventListener('click', toggle); 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 Tumbler */ .hc-content-size-tumbler { width: 78px !important; } .hc-content-size-tumbler:before, .hc-content-size-tumbler:after { display: none !important; } .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)); } body.hc-content-size-wide .hc-content-size-tumbler .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } body.hc-content-size-ultrawide .hc-content-size-tumbler .hc-tumbler-dot { transform: translateX(calc(200% - 2px)); } body.hc-content-size-full .hc-content-size-tumbler .hc-tumbler-dot { transform: translateX(calc(300% - 2px)); } /* Content Sizes */ body.hc-content-size-wide .b-wrapper { width: auto; min-width: 960px; max-width: 1150px; } body.hc-content-size-ultrawide .b-wrapper { width: auto; min-width: 960px; max-width: 1340px; } body.hc-content-size-full .b-wrapper { min-width: 960px; width: auto; } body.hc-content-size-full .glory { width: auto; } `); resolve(); document.addEventListener('DOMContentLoaded', settings); document.addEventListener('DOMContentLoaded', resolve); function settings() { const elem = document.createElement('div'); elem.classList.add('hc-content-size-setting'); elem.insertAdjacentHTML('beforeend', ` <div class='hc-tumbler hc-content-size-tumbler pull-right'> <div class='hc-content-size-tumbler-point'></div> <div class='hc-content-size-tumbler-point'></div> <div class='hc-content-size-tumbler-point'></div> <div class='hc-content-size-tumbler-point'></div> <div class='hc-tumbler-dot'></div> </div> <span>Ширина контента</span> `); const tumbler = elem.querySelector('.hc-content-size-tumbler'); tumbler.addEventListener('click', rotate); addSetting(elem); } function getSize() { return localStorage.getItem('hc-content-size'); } function setSize(value) { return localStorage.setItem('hc-content-size', value); } function rotate() { let size = getSize() switch (size) { case 'full': size = 'normal'; break; case 'normal': size = 'wide'; break; case 'wide': size = 'ultrawide'; break; default: size = 'full'; break; } setSize(size); resolve(); } function resolve() { if (!document.body) return; document.body.classList.remove('hc-content-size-wide') document.body.classList.remove('hc-content-size-ultrawide') document.body.classList.remove('hc-content-size-full') window.removeEventListener('resize', resizePlayer); switch(getSize()) { case 'wide': document.body.classList.add('hc-content-size-wide') window.addEventListener('resize', resizePlayer); break; case 'ultrawide': document.body.classList.add('hc-content-size-ultrawide') window.addEventListener('resize', resizePlayer); break; case 'full': document.body.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; } body.hc-hide-info .hc-hide-info-button { transform: rotate(180deg); } /* Content hide info (hidden styles) */ body.hc-hide-info .b-post__infotable, body.hc-hide-info .b-post__description { display: none !important; } /* Content hide info (night theme) */ body.b-theme__template__night .hc-hide-info-button { filter: invert(100%) sepia(95%) saturate(21%) hue-rotate(280deg) brightness(106%) contrast(106%); } `); resolve(); document.addEventListener('DOMContentLoaded', setup); document.addEventListener('DOMContentLoaded', resolve); function setup() { const title = document.querySelector('.b-post__title'); if (!title) return; const button = document.createElement('div'); button.classList.add('pull-right'); button.classList.add('hc-hide-info-button'); button.addEventListener('click', toggle); title.insertBefore(button, title.firstChild); initCover(); } function initCover() { const cover = document.querySelector('.b-sidecover'); if (!cover) return; const imgURL = cover.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 resolve() { if (!document.body) return; if (enabled()) { document.body.classList.add('hc-hide-info'); } else { document.body.classList.remove('hc-hide-info'); } } function enabled() { return localStorage.getItem('hc-hide-info') == 'true'; } function toggle() { localStorage.setItem('hc-hide-info', !enabled()); resolve(); } } /* ------------------------------------------------- */ /* --------------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', setup); function setup() { const translators = document.querySelector('.b-translators__block'); if (!translators) return; const translatorsList = translators.querySelector('.b-translators__list'); if (!translatorsList) return; const toggler = document.createElement('li'); toggler.classList.add('hc-toggle-translators-button'); toggler.addEventListener('click', toggle); translatorsList.appendChild(toggler); translatorsList.querySelectorAll('.b-translator__item').forEach(button => { button.addEventListener('click', function() { if (this.classList.contains('active')) { toggle() } }); }); } function toggle() { document.querySelector('.b-translators__block').classList.toggle('hc-show-translators'); } } /* ------------------------------------------------- */ /* --------------HIDE-RUSSIAN----------------------- */ /* ------------------------------------------------- */ function initHideRussian() { GM_addStyle(` /* Main */ .hc-hide-russian .hc-russian { display: none; } /* Setting */ body.hc-hide-russian .hc-tumbler-hide-russian .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } `); setup(); document.addEventListener('DOMContentLoaded', setup); document.addEventListener('DOMContentLoaded', settings); document.addEventListener('DOMContentLoaded', resolve); function setup() { document.querySelectorAll(".b-content__inline_item").forEach(elem => { if (elem.textContent.includes("Россия,") && !elem.classList.contains("hc-russian")) { elem.classList.add("hc-russian"); const info = elem.querySelector(".b-content__inline_item-link").textContent.replace(/(\r\n|\n|\r)/gm, "").trim(); console.debug(`HDrezka Cleanup: mark russian ${info}`) } }); } function resolve() { if (!document.body) return; if (enabled()) { document.body.classList.add('hc-hide-russian'); } else { document.body.classList.remove('hc-hide-russian'); } } function enabled() { return localStorage.getItem('hc-hide-russian') == 'true'; } function toggle() { localStorage.setItem('hc-hide-russian', !enabled()); resolve(); } function settings() { const elem = document.createElement('div'); elem.classList.add('hc-hide-russian-setting'); elem.insertAdjacentHTML('beforeend', ` <div class='hc-tumbler hc-tumbler-hide-russian pull-right'> <div class='hc-tumbler-dot'></div> </div> <span>Скрыть контент из страны-агрессора</span> `); const tumbler = elem.querySelector('.hc-tumbler'); tumbler.addEventListener('click', toggle); addSetting(elem); } } /* ------------------------------------------------- */ /* --------------SETTINGS--------------------------- */ /* ------------------------------------------------- */ function initSettings() { const settingsOpenImgURL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAHl0lEQVRoge2ZbWydZRnHf//ntD1th0EYGa0b48UQJtMRI6LQntEomnQ9HSwyiYnKmx9QE4MgJgiRKXwhIjMhcUHHgEgihsiAtSUmS5xbtwXQiMgEg3EMSk8LbGR2fTnrOfffD6ej571PkeOnXV9Ozv3c9/+6/s993dd9XdcDJ+WknJR6okYBZ67qOYfZ3DUlg81Nv+t8atfrjdDX1AhQAHK5PqR7wAUdJkc+NwH8shHqokaAzsl52Il5TY4IOrdRyhpGxHgdKnJdKwLWNUpfQ4iMp7svEqyseKBwzti6tZ9qhM5FEcms796USaf+9mb60uW15hgU0BahZBV1SeQtrhNkRvu7V2b6Ui9l1ndvWoxtsaNWpr/rpwTdgkiCpxRFPzicPPLo6icOHAcY2XDJ0sRs8gbjG2VWIJbUUDlpPCL0UL45u23F9ucPA7zW25s8pfnYDQTfK2izyRL5/s4de3/8oRHJ9Hf9hKBbi40TTLjwu9ORxwn6poVk2uJgGqYFlvgNZpnFl+YenFI0aZIE93U+M7zg7sQjku5+WXCBa4VrOcwd5sVLnbWCnK1XOgf3rFkIJpbykIh6DdM1J9QwxDAt6aiko9RaX+cFGE/llOuNY2PsMzKaTt0k/DMo2vrqMoE9a/GspH0E3pnTtExwmaGXws5+ZCEcJXxLx9N7t8axLzaRAxtXt5w+c9rhEh8ulSnBe8C3z7x4eFCbCNUmeRPR+AtdaUtbJH/UVnsNvIkjbe+dcSKYLCSLyrXG0t1PGjZUGAdTQttybbkfnvXE/touWCRvbry0rWkqcZ/FdYJKMuLJzh3DX4lr26JyrSDekR2gyK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ug6kBml1B4pdDV/4lGFTvzxzvOJZ3eYXhuX3fuvqTcmvIxdGV+YyY4vEJ1arWLli7f153b9377bMoXq/1djxQQh2seSIebIQKa+A1RZgdlvZmlGNH2ZvlrmpAoHwLNdL+ySwEfapa/pn1nTwW2x5LPEQoAxjGkqDnZncEZnMH/B/8BEF4sAc9T0RMAAAAASUVORK5CYII='; 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('${settingsOpenImgURL}'); background-color: transparent !important; } .hc-settings-tumbler:after { background-image: url('${settingsCloseImgURL}'); background-color: transparent !important; } .hc-settings.active .hc-settings-tumbler > .hc-tumbler-dot { transform: translateX(calc(100% - 2px)); } .hc-settings ul { width: 320px; 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: 30px; } body.b-theme__template__night .hc-settings ul { background: #060f13; } `); document.addEventListener('DOMContentLoaded', setup); function setup() { const tophead = document.querySelector('.b-tophead-left'); if (!tophead) return; const elem = document.createElement('div'); elem.classList.add('hc-settings'); elem.classList.add('pull-left'); elem.insertAdjacentHTML('beforeend', ` <div class='hc-tumbler hc-settings-tumbler'> <div class='hc-tumbler-dot'></div> </div> <ul></ul> `); const tumbler = elem.querySelector('.hc-settings-tumbler'); tumbler.addEventListener('click', toggle); document.addEventListener('click', close); tophead.appendChild(elem); } function toggle(event) { event.target.closest('.hc-settings').classList.toggle('active'); event.stopPropagation(); } function close(event) { if (!event.target.closest('.hc-settings')) { document.querySelector('.hc-settings').classList.remove('active'); } } } function addSetting(element) { const tophead = document.querySelector('.b-tophead-left'); if (!tophead) return; const dropdown = tophead.querySelector('.hc-settings ul'); if (!dropdown) return; const item = document.createElement('li'); item.appendChild(element); dropdown.appendChild(item); } /* ------------------------------------------------- */ /* --------------DOCUMENT--------------------------- */ /* ------------------------------------------------- */ function onDocumentStart() { initSettings(); initContentSizeTumbler(); initStyleImprovements(); initHideInfoButton(); initHideTranslatorsButton(); initHideRussian(); } function onDocumentEnd() {} document.addEventListener('DOMContentLoaded', onDocumentEnd); onDocumentStart(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址