Warning: fopen(/www/sites/update.greasyfork.icu/index/store/temp/422a7a81dfd1ee6f029696d0eb1854bc.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript==
// @name douyin.com - 2023/3/6 12:45:08
// @namespace github.com/openstyles/stylus
// @version 1.0.0
// @description A new userstyle
// @author Me
// @license 无
// @grant GM_addStyle
// @run-at document-start
// @match *://*.douyin.com/*
// @match https://www.douyin.com/
// @match https://www.douyin.com/user*
// @match https://www.douyin.com/search/*
// @downloadURL https://update.greasyfork.icu/scripts/461301/douyincom%20-%20202336%2012%3A45%3A08.user.js
// @updateURL https://update.greasyfork.icu/scripts/461301/douyincom%20-%20202336%2012%3A45%3A08.meta.js
// ==/UserScript==
(function() {
let css = "";
if ((location.hostname === "douyin.com" || location.hostname.endsWith(".douyin.com"))) {
css += `
/*整个抖音域名都生效*/
#douyin-sidebar, /*右下角的意见反馈*/
.QUUswvJ3 /*客户端推荐*/
{
display: none;
}
.N_HNXA04.KYtgzo9m{ /*抖音大大的左边栏*/
transition: all 0.5s ; /*过渡效果2023.1.31*/
max-width: 10px;
}
.HQwsRJFy, /*左上 抖音 logo */
[data-e2e="douyin-navigation"]{ /*抖音的左边栏内容*/
display: none;
}
/*移动到左边就弹出来*/
.N_HNXA04.KYtgzo9m:hover .HQwsRJFy,
.N_HNXA04.KYtgzo9m:hover [data-e2e="douyin-navigation"],
.N_HNXA04.KYtgzo9m:hover{
max-width:172px;
display: block;
}
`;
}
if (location.href.startsWith("https://www.douyin.com/user")) {
css += `
/*个人主页生效-----------------------------*/
[class="N_HNXA04 KYtgzo9m"], /*抖音大大的左边栏-*/
[class="iwzpXgQ3 lXuWkeYW dSNgkU25 K4TZD9ct wJgU15d1"], /*滚动还显示搜索栏*/
[class="gX8AKvzT gthle0Gj"], /*滚动还显示作品栏*/
.DsdpRAYf, /*主页的下载电脑客户端*/
[class="JTui1eE0"]:nth-child(3), /*收藏网页*/
[class="JTui1eE0"]:nth-child(4) { /*合作*/
display: none;
}
/*背景全黑----------------------------------*/
[class="gX8AKvzT"], /*作品栏*/
[class="UKp0VfC1"], /*下面的视频背景*/
html[dark] ._LDrC7Wb.Smb5gBZJ:before{ /*名片*/
background-image: linear-gradient(to bottom, #000, #000);
}
/*使用!important:使用!important可以覆盖所有其他样式规则,但不建议过度使用。例如:
.N_HNXA04 {
background-color: red !important;
}
但是,使用!important可能会导致样式难以维护和调试,因此应该尽量避免使用它。*/
`;
}
if (location.href === "https://www.douyin.com/" || location.href.startsWith("https://www.douyin.com/search/")) {
css += `
/*刷视频 搜索视频 页面生效 */
[class="N_HNXA04 WcK6IrkT JVPLvXh3"], /*搜索页生效--抖音大大的左边栏*/
[class="JTui1eE0"]:nth-child(2), /*收藏网页*/
[class="JTui1eE0"]:nth-child(3) { /*合作*/
display: none;
}
`;
}
if (typeof GM_addStyle !== "undefined") {
GM_addStyle(css);
} else {
const styleNode = document.createElement("style");
styleNode.appendChild(document.createTextNode(css));
(document.querySelector("head") || document.documentElement).appendChild(styleNode);
}
})();