* @param {VMScript} script * @param {string} [home] * @returns {string | undefined}
(script, home = getScriptHome(script))
| 232 | * @returns {string | undefined} |
| 233 | */ |
| 234 | function inferScriptSupportUrl(script, home = getScriptHome(script)) { |
| 235 | let u = home && home.match(re`/ |
| 236 | ^https:\/\/(?: |
| 237 | (?: |
| 238 | (greas|sleaz)yfork\.(?:org|cc)(?:\/(?!scripts)[^/]+)? | |
| 239 | openuserjs\.org |
| 240 | )(?=\/scripts\/) | |
| 241 | github\.com |
| 242 | )\/[^/]+\/[^/]+/x`); |
| 243 | if (u) { |
| 244 | return `${u[0]}/${u[1] ? 'feedback' : 'issues'}`; |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | /** @param {VMScript} script */ |
| 249 | export function inferScriptProps(script) { |
no test coverage detected