MCPcopy Index your code
hub / github.com/hoothin/UserScripts / isSameOriginRequest

Function isSameOriginRequest

Pagetual/pagetual.user.js:4329–4336  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

4327 });
4328 }
4329 function isSameOriginRequest(f) {
4330 if (!f || !f.url || typeof location === "undefined") return false;
4331 try {
4332 return new URL(f.url, location.href).origin === location.origin;
4333 } catch (e) {
4334 return false;
4335 }
4336 }
4337 let nativeGMRequest = null;
4338 if (typeof GM_xmlhttpRequest !== 'undefined') {
4339 nativeGMRequest = GM_xmlhttpRequest;

Callers 1

pagetual.user.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected