1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
(() => {
"use strict";
var __webpack_modules__ = ({});
// The module cache
var __webpack_module_cache__ = {};
// The require function
function __webpack_require__(moduleId) {
// Check if module is in cache
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== undefined) {
return cachedModule.exports;
}
// Create a new module (and put it into the cache)
var module = (__webpack_module_cache__[moduleId] = {
exports: {}
});
// Execute the module function
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
// Return the exports of the module
return module.exports;
}
// webpack/runtime/rspack_version
(() => {
__webpack_require__.rv = () => ("1.6.6")
})();
// webpack/runtime/rspack_unique_id
(() => {
__webpack_require__.ruid = "bundler=rspack@1.6.6";
})();
;// CONCATENATED MODULE: ./node_modules/.pnpm/@adguard+tswebextension@5.0.3_@adguard+re2-wasm@1.2.0_typescript@5.6.3/node_modules/@adguard/tswebextension/dist/common/stealth-helper.js
// Disable vi coverage for this file, because it will insert
// line comments, and code to count lines covered by tests, for example:
// /* istanbul ignore next */
// cov_uqm40oh03().f[0]++;
// cov_uqm40oh03().s[2]++;
// And we cannot test these strings correctly, because the names of these
// functions with counters are generated at runtime
/* istanbul ignore file */
/**
* This module applies stealth actions in page context.
*/
class StealthHelper {
/**
* Sends a Global Privacy Control DOM signal.
*/
static setDomSignal() {
try {
if ('globalPrivacyControl' in Navigator.prototype) {
return;
}
Object.defineProperty(Navigator.prototype, 'globalPrivacyControl', {
get: () => true,
configurable: true,
enumerable: true,
});
}
catch (ex) {
// Ignore
}
}
/**
* Hides document referrer by returning the current document's origin.
*/
static hideDocumentReferrer() {
const origDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'referrer');
if (!origDescriptor || !origDescriptor.get || !origDescriptor.configurable) {
return;
}
const returnCurrentOriginFunc = () => {
// Return the origin with trailing slash to match real referrer format
return `${document.location.origin}/`;
};
// Protect getter from native code check (important!)
// Use the original getter's toString for this protection.
returnCurrentOriginFunc.toString = origDescriptor.get.toString.bind(origDescriptor.get);
Object.defineProperty(Document.prototype, 'referrer', {
get: returnCurrentOriginFunc,
});
}
}
;// CONCATENATED MODULE: ./node_modules/.pnpm/@adguard+tswebextension@5.0.3_@adguard+re2-wasm@1.2.0_typescript@5.6.3/node_modules/@adguard/tswebextension/dist/gpc.mv3.js
/**
* @typedef {import('../background/services/stealth-service').StealthService} StealthService
*/
/**
* @file
* IMPORTANT: This file should be listed inside 'sideEffects' field
* in the package.json, because it has side effects: we do not export anything
* from it outside, just evaluate the code (via injection).
*
* We will inject this script dynamically via `scripting.registerContentScripts`
* inside {@link StealthService.setContentScript}.
*/
StealthHelper.setDomSignal();
;// CONCATENATED MODULE: ./Extension/pages/gpc/index.ts
/**
* Copyright (c) 2015-2026 Adguard Software Ltd.
*
* @file
* This file is part of AdGuard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* AdGuard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AdGuard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AdGuard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/ /**
* We do not inject this scripts manually from extension, because it will be
* dynamically registered and unregistered by the tswebextension when the
* stealth option is enabled/disabled.
*/
})()
;
|