TreeBar icon indicating copy to clipboard operation
TreeBar copied to clipboard

请大佬添加对w3school的支持:https://www.w3school.com.cn/

Open knife-blade opened this issue 4 years ago • 1 comments

knife-blade avatar Jul 21 '21 14:07 knife-blade

我试了一下,改改源码就可以了, 很简单 修改如下 加入下面的代码,让插件在w3school生效

// @match       *://www.w3school.com.cn/*

如下图 image

然后再告诉插件, 网页的正文内容是在哪个标签(tag)下的,加入下面的代码,如下图

        w3school: {
			tagName: '#maincontent',
		},

image 如何找正文对应的tag呢? 打开网站,然后在正文部分右键,选择"检查",打开chrome开发者工具,然后在"Elements"里点击各个网页元素,直到找到正文对应的元素,这时文章正文会变暗,如下图,然后根据tag含有的属性来像上面一样加入tagName了,如果属性是id那就#xxx 如果是class属性,那就 .xxx (xxx前面有个点) image

iamqiz avatar Sep 21 '21 13:09 iamqiz