rename uri to uriRegex to avoid confusion

This commit is contained in:
mzivil 2024-02-02 15:50:18 -05:00
parent 99e547e6ae
commit db7c4c3d76
1 changed files with 2 additions and 2 deletions

View File

@ -556,9 +556,9 @@ export default {
pathname = pathname.replace(/%/g, '\\%')
pathname = pathname.replace(/_/g, '\\_')
let uri = stripTrailingSlash(hostname + pathname)
let uriRegex = stripTrailingSlash(hostname + pathname)
let similar = `(http(s)?://)?${uri}/?`
let similar = `(http(s)?://)?${uriRegex}/?`
const whitelist = ['news.ycombinator.com/item', 'bitcointalk.org/index.php']
const youtube = ['www.youtube.com', 'youtube.com', 'm.youtube.com', 'youtu.be']