Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Useful-Scripts-Extension/useful-script
/ isSameOrigin
Function
isSameOrigin
scripts/chongLuaDao.js:689–691 ·
view source on GitHub ↗
(url)
Source
from the content-addressed store, hash-verified
687
}
688
689
function
isSameOrigin(url) {
690
return
new
URL(url, window.location.href).origin === window.location.origin;
691
}
692
693
function
matchOneOfPatterns(url, patterns) {
694
if
(!patterns?.length)
return
false;
Callers
1
analyzeWeb
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected