Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

寻找功能 #128

Open
HONE13 opened this issue May 29, 2024 · 47 comments
Open

寻找功能 #128

HONE13 opened this issue May 29, 2024 · 47 comments
Labels
Seek help Seek help for site rule

Comments

@HONE13
Copy link

HONE13 commented May 29, 2024

你好,大佬
请问一下,有无像
网页高亮关键字
https://greasyfork.org/zh-CN/scripts/465200-%E7%BD%91%E9%A1%B5%E9%AB%98%E4%BA%AE%E5%85%B3%E9%94%AE%E5%AD%97
小鱼标签 (UTags) - 为链接添加用户标签
https://greasyfork.org/zh-CN/scripts/460718-utags-add-usertags-to-links
希望能够给词汇高亮并添加备注(别名/标签),或者悬浮备注(别名/标签)

@HONE13 HONE13 added the Seek help Seek help for site rule label May 29, 2024
@hoothin
Copy link
Owner

hoothin commented May 29, 2024

image
这样吗?

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

这是链接注释。
image

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

感谢大佬的回复,能不能像网页高亮关键字那样,
第一栏为网页
第二栏为注释
第三栏为关键字
网页高亮关键字缺点是空格隔开,变成单词

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

不好意思我没用过你提到的脚本,但是搜索酱可以在设置页通过通配符来设定高亮规则生效的网页范围

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

[有没有这样的浏览器插件——自动给自定义列表中的词汇加悬浮触发的备注?]
https://meta.appinn.net/t/topic/34564/14
找到大佬以前写的代码,我看了一下,差不多,就是没有网页限定以及多个关键词同一个注释
不是”text = "c|AA,BB:收藏“
而是text = "c|AA:收藏
|BB:收藏“

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

有的,在设置页,如下
image
预置分组就是多个关键词打包,然后在规则里调用分组名

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

当你点击保存按钮的时候,会自动生成规则,此时你再微调就行了。其中网址可以用通配符,*代表多个字符,?代表一个字符
image
你希望的话,也可以通过搜索词样式来美化高亮样式。

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

"https://github.com/*": {
    "words": [
        "谢谢,希望$t{你好}"
    ]

是这样吗?谢谢,希望是关键词,{你好}是注释
多个关键词同个注释

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

首先添加预置分组,添加完之后形如"@groupName": "jack|rose|谢谢|你好"
然后把关键词改为

    "words": [
        "@groupName$t{你好}",
        "@groupName1$t{你吼不吼}"
    ]

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

"https://github.com/*": {
"words": [
"@groupName":谢谢|希望$t{你好}"
]
长这样的吗?

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

不,你得先点击下面的添加预置分组按钮,添加分组内容。
然后把 谢谢,希望 替换为分组名
image

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

屏幕截图_29-5-2024_8558_search hoothin com

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

这样对吗?

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

@github": "/关键词|注释/"这样。
内容其实是个正则

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

屏幕截图_29-5-2024_85827_search hoothin com
这把好了

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

多个关键词同个注释弄好了
那网址这一行怎么弄两个
https://sleazyfork.org/和https://greasyfork.org/

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

{
"[https://sleazyfork.org/,https://greasyfork.org/": {
"words": [
"@github$t{你好}"
]
},

这样弄的吗

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

可以换用正则/https://sleazyfork\\.org/|https://greasyfork\\.org//i

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

或者这样/https://(sleazyfork|greasyfork)\\.org//i

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

哦,十分感谢
已经没问题了

@HONE13 HONE13 closed this as completed May 29, 2024
@HONE13 HONE13 reopened this May 29, 2024
@HONE13
Copy link
Author

HONE13 commented May 29, 2024

大佬请问一下,关键词里面有空格也有_
例:app_la和app la
怎么弄

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

有万能字符来代替空格和_吗?十分感谢

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

也是用正则,/app.la/ 或者 /app[ _]la/

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

然后就是如果关键词是LO(就是一个词,那么怎么只在一些LOH,LOVE,LO上使LO高光LO,而LOH,LOVE上不高光LO呢

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

/LO\b/

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

赞赞赞

@HONE13 HONE13 closed this as completed May 29, 2024
@HONE13 HONE13 reopened this May 29, 2024
@HONE13
Copy link
Author

HONE13 commented May 29, 2024

     "words": [
        "@irri$s{red}$t{权}"
    ]
},

"@irri": "/nemu\b|nemui neru\b/
为什么设置成这样就不高光了

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

不能弄成/LOH\b|LOVE\b|LO\b/吗?

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

因为你在json里直接写的话,\要替换为\\。在配置页的json里得这样写:
"@irri": "/nemu\\b|nemui neru\\b/"

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

原来如此,十分感谢你的回复
我就不关闭议题了,有问题可以问你
话说不弄什么教程吗?谢谢

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

不会推广,没人用啊。用户人数这么少,教程写了也没人看🥹🥹

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

话说如果有一个词是nemu| koko(本身是一个词,会发生被|隔开的情况吗?

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

可以用转义符nemu\\| koko

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

ExResurrect
https://sleazyfork.org/zh-CN/scripts/411277-exresurrect
大佬你看看能不能添加到该脚本,感觉挺厉害的

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

"@irri": "/nemu\b/"
有一个问题,网站里面有memu和memu memu和memu memu R
我只高光memu,但是也把memu memu和memu memu R高光了(没有添加到规则里,显示的是memu(高光) memu(高光)和memu(高光) memu(高光) R,每个memu都是分别高光的

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

不知道回复后怎么变成\b了

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

用零宽断言就行了 (?<! )\\bmemu\\b(?! )

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

OK

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

用零宽断言就行了 (?<! )\\bmemu\\b(?! )
我高光K和Ten,然后K-Ten被分别高光K和Ten
怎么才能避免被高光

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

也是用零宽断言,但具体情况得具体分析,例如如果单词前后都有空格的话,那么可以用正预测断言。你可以系统学习一下正则,或者问 AI

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

好的

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

请问一下,我试着生效范围弄了,然后生效范围只能在一个网站设置吗?那网址这一行弄两个,共用一个关键字库
怎么在两个网站分别设置两个生效范围,比如在A站设置范围,B站设置范围,两个网址里有相同的关键字,那能在两个范围内高亮吗

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

分开两条规则就行了,或者如果你能确保范围的选择器不重合,那么也可以在 words 数组里添加一条不同范围的

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

怎么写,这两个范围都是在不同网站弄得
$in{#artistname}
$in{#favform > table.itg.glte}

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

比如说,原本这样的

{
    "/https://sleazyfork.org/|https://greasyfork.org//": {
        "words": [
            "@github$t{你好}"
        ]
    }
}

改成这样

{
    "https://sleazyfork.org": {
        "words": [
            "@github$t{你好}"
        ]
    },
    "https://greasyfork.org/": {
        "words": [
            "@github$t{你好}"
        ]
    }
}

@HONE13
Copy link
Author

HONE13 commented May 29, 2024

"https://sleazyfork.org": {
    "words": [
        "@github$t{你好}$in{#artistname}"
    ]
},
"https://greasyfork.org/": {
    "words": [
        "@github$t{你好}$in{#favform > table.itg.glte}"
    ]
}
"@github": "//"

}
是这样的吗?

@hoothin
Copy link
Owner

hoothin commented May 29, 2024

是的,另外预置分组是可以在页面中划词添加内容的,如这篇教程写的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Seek help Seek help for site rule
Projects
None yet
Development

No branches or pull requests

2 participants