MCPcopy
hub / github.com/xcanwin/KeepChatGPT / isTrackingRequest

Function isTrackingRequest

KeepChatGPT.user.js:426–441  ·  view source on GitHub ↗
(requestUrl)

Source from the content-addressed store, hash-verified

424 };
425
426 const isTrackingRequest = function (requestUrl) {
427 if (typeof requestUrl !== "string" || requestUrl.trim() === "") {
428 return false;
429 }
430 if (trackingBlockRegex.test(requestUrl)) {
431 return true;
432 }
433 const parsedUrl = parseRequestUrl(requestUrl);
434 if (!parsedUrl) {
435 return false;
436 }
437 return (
438 trackingHostRegex.test(parsedUrl.hostname) ||
439 trackingPathRegex.test(`${parsedUrl.pathname}${parsedUrl.search}`)
440 );
441 };
442
443 const buildBlockedTrackingResponse = function () {
444 return new Response(null, {

Callers 3

hookFetchFunction · 0.85
hookXHRFunction · 0.85

Calls 1

parseRequestUrlFunction · 0.85

Tested by

no test coverage detected