例如,是否可以通过在adblock中添加过滤器来永久阻止页面上的 - 不选择属性?

发布于 2025-02-04 13:25:37 字数 228 浏览 1 评论 0原文

我正在学习编程,其中包含代码片段的页面不允许我复制并运行它们,是否有一种方法可以永久禁用此页面上的 - 不选择属性?也许是adblock滤镜? 该属性在课堂上。


    <div class="s1-description-code s1-description-code--no-select">

I'm learning to program and a page that contains pieces of code won't let me copy and run them, is there a way to permanently disable the --no-select attribute on this page? Maybe an adblock filter?
That attribute is in class.


    <div class="s1-description-code s1-description-code--no-select">

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

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

发布评论

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

评论(1

单调的奢华 2025-02-11 13:25:37

我建议您查看用户样式,请参阅: https://superuser.com/questions/560539/560539/how-can-i-force-my-css-css-styles-when-when-i-visit-a-website

you can 更改您的浏览器用户样式表,但最简单的方法是在Chrome或Firefox上安装时尚的扩展名,并添加以下内容:

* {
    user-select: text !IMPORTANT;
}

时尚还可以使您在某些网站上禁用表格,或者具有每场地自定义样式。

这可能会在某些网站上破坏内容,因此我建议您配置时尚以不应用这些网站上的样式表,或者您使用更具体的选择器而不是*

最后的警告,如果网站使用!重要,则可以将其击败,这时您可能需要研究更多涉及的解决方案,例如在页面加载中运行JavaScript以删除有问题的CSS规则。

I recommend you look into user stylesheets, see: https://superuser.com/questions/560539/how-can-i-force-my-css-styles-when-i-visit-a-website

You can change your browsers user stylesheet, but the easiest method is to install the Stylish extension on Chrome or Firefox and add this:

* {
    user-select: text !IMPORTANT;
}

Stylish also allows you to disable the sheet on certain websites, or have per-site custom styles.

This may break things on certain websites, so I recommend you either configure Stylish to not apply the stylesheet on those sites, or you use a more specific selector rather than *.

A final caveat, this can be defeated if the website uses !IMPORTANT, at which point you may need to look into more involved solutions, such as running JavaScript on page load to remove the offending CSS rules.

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