Обсуждения » Разработка

Best way to prevent overwritten custom added code / user settings

When my userscript client detects and update a script (user pressing UPDATE), previous added/edited code are overwritten.
Can you advise on "lightweight" ways (oppose to using git) to structure a script so that end users can tinker with or add code and NOT get them overwritten when the original author update the script?

eg user added js code

https://greasyfork.dpdns.org/en/scripts/692-manga-loader/code
{
name: 'somethingnew',
match: "^https?://www.somethingnew.com/.*",
img: '#img',
next: '.next a',
}

OR

https://greasyfork.dpdns.org/en/scripts/464588-e-itch-io-exclude-tag-may-2023/code
GM_addStyle(`
.genre-action, .tag-action-adventure, .tag-action-rpg
{display:none}
`)

Ответить

Войдите, чтобы ответить.

长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元