MCPcopy 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
689function isSameOrigin(url) {
690 return new URL(url, window.location.href).origin === window.location.origin;
691}
692
693function matchOneOfPatterns(url, patterns) {
694 if (!patterns?.length) return false;

Callers 1

analyzeWebFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected