n/haoduoshuiu/guguan123 · 10 个月前
注册 登录
n/haoduoshui · 10 个月前 · 已编辑 · 469 次浏览
u/guguan123铂金

关闭NodeLoc顶栏的高斯模糊

不知道各位有没有感觉James整的这个顶栏高斯模糊有点丑陋了?

反正我是觉得挺糟糕的,不仅不搭调,而且更雪上加霜的是Firefox会使用CPU来计算高斯模糊..

所以就写了一个油猴脚本关闭这个模糊效果,点击添加:Nodeloc d-header fix

// ==UserScript==
// @name         Nodeloc d-header fix
// @namespace    https://www.nodeloc.com/t/topic/75176
// @version      1.3
// @description  移除模糊效果并恢复不透明背景色
// @author       GuGuan123
// @updateURL    https://foo.gv.uy/tampermonkey/nodeloc-header-fix.user.js
// @downloadURL  https://foo.gv.uy/tampermonkey/nodeloc-header-fix.user.js
// @match        *://www.nodeloc.com/*
// @grant        GM_addStyle
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
	'use strict';

	const css = `
			header.d-header {
				/* 关掉毛玻璃模糊 */
				backdrop-filter: none !important;
				-webkit-backdrop-filter: none !important;
				-moz-backdrop-filter: none !important;

				/* 恢复背景颜色 */
				background: var(--header_background) !important;
				
				/* 恢复底边线 */
				border-bottom: none !important;
				box-shadow: var(--shadow-header) !important;
			}
		`;

	if (typeof GM_addStyle !== 'undefined') {
		GM_addStyle(css);
	} else {
		// 兼容性兜底
		const style = document.createElement('style');
		style.textContent = css;
		(document.head || document.documentElement).appendChild(style);
	}
})();

挺好,这样就恢复成之前的样式了

5
19
登录后参与讨论。

19 条回复

排序
  1. Foxx 🌴 10 个月前

    啊这,我觉得---不如你写成透明的

    1
  2. guguan123 铂金 楼主 10 个月前

    其实你也可以自己改,我就单纯改回之前的样式...

    0
  3. sdcfre 钻石 3 YEARS 10 个月前

    不注意 看看

    0
  4. arimyke 青铜 10 个月前

    emmm……你不说我还没注意到顶栏是高斯模糊的

    0
  5. hakd 钻石 2 YEARS 10 个月前

    我也觉得要关闭,是真的挺丑的,还有点为适应。

    0
  6. sky59998 黄金 10 个月前

    这个模糊加的很不符合直觉,和站内其他的UI设计也是毫不相干

    0
  7. nekozilla 黄金 10 个月前

    好,用上了,感谢分享

    0
  8. user12 青铜 10 个月前

    NL网站感觉好杂好乱啊,好多东西都太多余了。

    0
  9. linying23333 😇 钻石 2 YEARS 10 个月前

    这叫深度集成

    0
  10. azhaoyihao 钻石 水王 10 个月前

    感谢大佬分享插件

    0
  11. kaylie 黄金 10 个月前

    哈哈,也不错,但是我还没用上

    0
  12. FrankWkd 黄金 10 个月前

    超级卡,但是个人觉得颜值还行

    0
  13. Str 荣誉会员 王者 10 个月前

    这在我老电脑上简直是灾难
    一个nodeloc占用快和网页discord一样了

    0
  14. guguan123 铂金 楼主 10 个月前

    在一些浏览器模糊效果是靠CPU硬算的,当然卡...

    0
  15. qwe999 黄金 10 个月前

    牛逼!

    0
  16. eee 黄金 10 个月前

    谢谢,用上了

    0
  17. Anaheim 黄金 10 个月前

    感谢大佬分享插件

    0
  18. user68 💬 铂金 3 YEARS 10 个月前

    用上了,感谢分享!

    0
  19. nikanchik 黄金 10 个月前

    感谢分享

    0