JavaScript代码使YouTube进度栏回来

发布于 2025-01-27 02:12:05 字数 652 浏览 3 评论 0原文

我发现此代码在某些网站上,我可以将其设置为书签,以使YouTube上的进度栏消失。

该代码的反面是什么,以便我也可以将其设置为书签,以便我可以使进度栏回来?除了重新加载页面。

谢谢!

javascript:(function(){var goaway=".ytp-chrome-top,.ytp-chrome-bottom{display:none;}";if("\v"=="v"){document.createStyleSheet().cssText=goaway}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=goaway}})();

I found this code on some website, which I can set as a bookmark to make the progress bar on YouTube go away.

What would the reverse of this code be so I can set that as a bookmark too, so I can make the progress bar come back? Other than reloading the page.

Thanks!

javascript:(function(){var goaway=".ytp-chrome-top,.ytp-chrome-bottom{display:none;}";if("\v"=="v"){document.createStyleSheet().cssText=goaway}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=goaway}})();

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

写给空气的情书 2025-02-03 02:12:05

这将显示/隐藏进度栏

javascript:document.querySelectorAll(".ytp-chrome-top,.ytp-chrome-bottom").forEach(i=>i.style.display=i.style.display=="inherit"?"none":"inherit");

以使代码较短,首先,您需要单击两次才能隐藏,然后一次显示/隐藏

this will show/hide the progress bar

javascript:document.querySelectorAll(".ytp-chrome-top,.ytp-chrome-bottom").forEach(i=>i.style.display=i.style.display=="inherit"?"none":"inherit");

to make the code shorter, at first you need to click it twice to hide, then once to show/hide

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文