jumpy-lion 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fingerprinting/anti-webgpu/background.js +4 -6
- package/dist/fingerprinting/anti-webgpu/data/content_script/inject.js +42 -42
- package/dist/fingerprinting/anti-webgpu/data/content_script/page_context/inject.js +172 -179
- package/dist/fingerprinting/anti-webgpu/data/icons/128.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/16.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/32.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/48.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/64.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.css +88 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.html +58 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.js +96 -95
- package/dist/fingerprinting/anti-webgpu/lib/chrome.js +249 -255
- package/dist/fingerprinting/anti-webgpu/lib/common.js +71 -72
- package/dist/fingerprinting/anti-webgpu/lib/config.js +14 -13
- package/dist/fingerprinting/anti-webgpu/lib/runtime.js +107 -109
- package/dist/fingerprinting/anti-webgpu/manifest.json +58 -0
- package/package.json +2 -2
|
@@ -1,87 +1,86 @@
|
|
|
1
1
|
var core = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"start": function () {
|
|
3
|
+
core.load();
|
|
4
|
+
},
|
|
5
|
+
"install": function () {
|
|
6
|
+
core.load();
|
|
7
|
+
},
|
|
8
|
+
"load": function () {
|
|
9
|
+
app.contextmenu.create({
|
|
10
|
+
"type": "normal",
|
|
11
|
+
"id": "test.page",
|
|
12
|
+
"contexts": ["browser_action"],
|
|
13
|
+
"title": "What is my Fingerprint?"
|
|
14
|
+
}, app.error);
|
|
15
|
+
/* */
|
|
16
|
+
app.contextmenu.create({
|
|
17
|
+
"type": "checkbox",
|
|
18
|
+
"id": "notification.checkbox",
|
|
19
|
+
"contexts": ["browser_action"],
|
|
20
|
+
"checked": config.notification.show,
|
|
21
|
+
"title": "Show Desktop Notifications"
|
|
22
|
+
}, app.error);
|
|
23
|
+
},
|
|
24
|
+
"action": {
|
|
25
|
+
"contextmenu": function (e) {
|
|
26
|
+
if (e.menuItemId === "test.page") {
|
|
27
|
+
app.tab.open(config.test.page);
|
|
28
|
+
} else {
|
|
29
|
+
config.notification.show = !config.notification.show;
|
|
30
|
+
}
|
|
4
31
|
},
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
app.contextmenu.create({
|
|
10
|
-
"type": "normal",
|
|
11
|
-
"id": "test.page",
|
|
12
|
-
"contexts": ["browser_action"],
|
|
13
|
-
"title": "What is my Fingerprint?"
|
|
14
|
-
}, app.error);
|
|
15
|
-
/* */
|
|
16
|
-
app.contextmenu.create({
|
|
17
|
-
"type": "checkbox",
|
|
18
|
-
"id": "notification.checkbox",
|
|
19
|
-
"contexts": ["browser_action"],
|
|
20
|
-
"checked": config.notification.show,
|
|
21
|
-
"title": "Show Desktop Notifications"
|
|
32
|
+
"storage": function (changes, namespace) {
|
|
33
|
+
if ("notification" in changes) {
|
|
34
|
+
app.contextmenu.update("notification.checkbox", {
|
|
35
|
+
"checked": config.notification.show,
|
|
22
36
|
}, app.error);
|
|
37
|
+
}
|
|
23
38
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, app.error);
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"page": {
|
|
41
|
-
"fingerprint": function (e) {
|
|
42
|
-
const message = "\nA fingerprinting attempt is detected!\nYour browser is reporting a fake value.";
|
|
43
|
-
/* */
|
|
44
|
-
if (config.notification.show) {
|
|
45
|
-
if (config.notification.timeout)
|
|
46
|
-
clearTimeout(config.notification.timeout);
|
|
47
|
-
config.notification.timeout = setTimeout(function () {
|
|
48
|
-
app.notifications.create({
|
|
49
|
-
"type": "basic",
|
|
50
|
-
"title": app.name(),
|
|
51
|
-
"message": e.host + message
|
|
52
|
-
});
|
|
53
|
-
}, 1000);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"popup": {
|
|
58
|
-
"fingerprint": function () {
|
|
59
|
-
app.tab.open(config.test.page);
|
|
60
|
-
},
|
|
61
|
-
"load": function () {
|
|
62
|
-
app.popup.send("storage", {
|
|
63
|
-
"notifications": config.notification.show
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
"notifications": function () {
|
|
67
|
-
config.notification.show = !config.notification.show;
|
|
68
|
-
/* */
|
|
69
|
-
app.popup.send("storage", {
|
|
70
|
-
"notifications": config.notification.show
|
|
71
|
-
});
|
|
72
|
-
}
|
|
39
|
+
"page": {
|
|
40
|
+
"fingerprint": function (e) {
|
|
41
|
+
const message = "\nA fingerprinting attempt is detected!\nYour browser is reporting a fake value.";
|
|
42
|
+
/* */
|
|
43
|
+
if (config.notification.show) {
|
|
44
|
+
if (config.notification.timeout) clearTimeout(config.notification.timeout);
|
|
45
|
+
config.notification.timeout = setTimeout(function () {
|
|
46
|
+
app.notifications.create({
|
|
47
|
+
"type": "basic",
|
|
48
|
+
"title": app.name(),
|
|
49
|
+
"message": e.host + message
|
|
50
|
+
});
|
|
51
|
+
}, 1000);
|
|
73
52
|
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"popup": {
|
|
56
|
+
"fingerprint": function () {
|
|
57
|
+
app.tab.open(config.test.page);
|
|
58
|
+
},
|
|
59
|
+
"load": function () {
|
|
60
|
+
app.popup.send("storage", {
|
|
61
|
+
"notifications": config.notification.show
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
"notifications": function () {
|
|
65
|
+
config.notification.show = !config.notification.show;
|
|
66
|
+
/* */
|
|
67
|
+
app.popup.send("storage", {
|
|
68
|
+
"notifications": config.notification.show
|
|
69
|
+
});
|
|
70
|
+
}
|
|
74
71
|
}
|
|
72
|
+
}
|
|
75
73
|
};
|
|
74
|
+
|
|
76
75
|
app.contextmenu.on.clicked(core.action.contextmenu);
|
|
77
76
|
app.page.receive("fingerprint", core.action.page.fingerprint);
|
|
77
|
+
|
|
78
78
|
app.popup.receive("load", core.action.popup.load);
|
|
79
79
|
app.popup.receive("fingerprint", core.action.popup.fingerprint);
|
|
80
80
|
app.popup.receive("notifications", core.action.popup.notifications);
|
|
81
|
-
app.popup.receive("support", function () {
|
|
82
|
-
app.popup.receive("donation", function () {
|
|
81
|
+
app.popup.receive("support", function () {app.tab.open(app.homepage())});
|
|
82
|
+
app.popup.receive("donation", function () {app.tab.open(app.homepage() + "?reason=support")});
|
|
83
|
+
|
|
83
84
|
app.on.startup(core.start);
|
|
84
85
|
app.on.installed(core.install);
|
|
85
86
|
app.on.storage(core.action.storage);
|
|
86
|
-
export {};
|
|
87
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
var config = {};
|
|
2
|
-
|
|
3
|
-
config.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var config = {};
|
|
2
|
+
|
|
3
|
+
config.test = {"page": "https://webbrowsertools.com/webgpu-fingerprint/"};
|
|
4
|
+
|
|
5
|
+
config.welcome = {
|
|
6
|
+
set lastupdate (val) {app.storage.write("lastupdate", val)},
|
|
7
|
+
get lastupdate () {return app.storage.read("lastupdate") !== undefined ? app.storage.read("lastupdate") : 0}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
config.notification = {
|
|
11
|
+
"timeout": null,
|
|
12
|
+
set show (val) {app.storage.write("notification", val)},
|
|
13
|
+
get show () {return app.storage.read("notification") !== undefined ? app.storage.read("notification") : false}
|
|
14
|
+
};
|
|
@@ -1,109 +1,107 @@
|
|
|
1
|
-
app.version = function () {
|
|
2
|
-
app.homepage = function () {
|
|
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
|
-
app.on.connect(function (port) {
|
|
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
|
-
export {};
|
|
109
|
-
//# sourceMappingURL=runtime.js.map
|
|
1
|
+
app.version = function () {return chrome.runtime.getManifest().version};
|
|
2
|
+
app.homepage = function () {return chrome.runtime.getManifest().homepage_url};
|
|
3
|
+
|
|
4
|
+
if (!navigator.webdriver) {
|
|
5
|
+
app.on.uninstalled(app.homepage() + "?v=" + app.version() + "&type=uninstall");
|
|
6
|
+
app.on.installed(function (e) {
|
|
7
|
+
app.on.management(function (result) {
|
|
8
|
+
if (result.installType === "normal") {
|
|
9
|
+
app.tab.query.index(function (index) {
|
|
10
|
+
let previous = e.previousVersion !== undefined && e.previousVersion !== app.version();
|
|
11
|
+
let doupdate = previous && parseInt((Date.now() - config.welcome.lastupdate) / (24 * 3600 * 1000)) > 45;
|
|
12
|
+
if (e.reason === "install" || (e.reason === "update" && doupdate)) {
|
|
13
|
+
let parameter = (e.previousVersion ? "&p=" + e.previousVersion : '') + "&type=" + e.reason;
|
|
14
|
+
let url = app.homepage() + "?v=" + app.version() + parameter;
|
|
15
|
+
app.tab.open(url, index, e.reason === "install");
|
|
16
|
+
config.welcome.lastupdate = Date.now();
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
app.on.message(function (request, sender) {
|
|
25
|
+
if (request) {
|
|
26
|
+
if (request.path === "popup-to-background") {
|
|
27
|
+
for (let id in app.popup.message) {
|
|
28
|
+
if (app.popup.message[id]) {
|
|
29
|
+
if ((typeof app.popup.message[id]) === "function") {
|
|
30
|
+
if (id === request.method) {
|
|
31
|
+
app.popup.message[id](request.data);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/* */
|
|
38
|
+
if (request.path === "page-to-background") {
|
|
39
|
+
for (let id in app.page.message) {
|
|
40
|
+
if (app.page.message[id]) {
|
|
41
|
+
if ((typeof app.page.message[id]) === "function") {
|
|
42
|
+
if (id === request.method) {
|
|
43
|
+
let a = request.data || {};
|
|
44
|
+
if (sender) {
|
|
45
|
+
a.frameId = sender.frameId;
|
|
46
|
+
/* */
|
|
47
|
+
if (sender.tab) {
|
|
48
|
+
if (a.tabId === undefined) a.tabId = sender.tab.id;
|
|
49
|
+
if (a.title === undefined) a.title = sender.tab.title ? sender.tab.title : '';
|
|
50
|
+
if (a.top === undefined) a.top = sender.tab.url ? sender.tab.url : (sender.url ? sender.url : '');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/* */
|
|
54
|
+
app.page.message[id](a);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
app.on.connect(function (port) {
|
|
64
|
+
if (port) {
|
|
65
|
+
if (port.name) {
|
|
66
|
+
if (port.name in app) {
|
|
67
|
+
app[port.name].port = port;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/* */
|
|
71
|
+
port.onDisconnect.addListener(function (e) {
|
|
72
|
+
app.storage.load(function () {
|
|
73
|
+
if (e) {
|
|
74
|
+
if (e.name) {
|
|
75
|
+
if (e.name in app) {
|
|
76
|
+
app[e.name].port = null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
/* */
|
|
83
|
+
port.onMessage.addListener(function (e) {
|
|
84
|
+
app.storage.load(function () {
|
|
85
|
+
if (e) {
|
|
86
|
+
if (e.path) {
|
|
87
|
+
if (e.port) {
|
|
88
|
+
if (e.port in app) {
|
|
89
|
+
if (e.path === (e.port + "-to-background")) {
|
|
90
|
+
for (let id in app[e.port].message) {
|
|
91
|
+
if (app[e.port].message[id]) {
|
|
92
|
+
if ((typeof app[e.port].message[id]) === "function") {
|
|
93
|
+
if (id === e.method) {
|
|
94
|
+
app[e.port].message[id](e.data);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"update_url": "https://clients2.google.com/service/update2/crx",
|
|
3
|
+
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"manifest_version": 3,
|
|
6
|
+
"offline_enabled": true,
|
|
7
|
+
"name": "WebGPU Fingerprint Defender",
|
|
8
|
+
"homepage_url": "https://mybrowseraddon.com/webgpu-defender.html",
|
|
9
|
+
"description": "Defending against WebGPU fingerprinting by reporting a fake value.",
|
|
10
|
+
"commands": {
|
|
11
|
+
"_execute_action": {}
|
|
12
|
+
},
|
|
13
|
+
"background": {
|
|
14
|
+
"service_worker": "background.js"
|
|
15
|
+
},
|
|
16
|
+
"permissions": [
|
|
17
|
+
"storage",
|
|
18
|
+
"contextMenus",
|
|
19
|
+
"notifications"
|
|
20
|
+
],
|
|
21
|
+
"action": {
|
|
22
|
+
"default_popup": "data/popup/popup.html",
|
|
23
|
+
"default_title": "WebGPU Fingerprint Defender",
|
|
24
|
+
"default_icon": {
|
|
25
|
+
"16": "data/icons/16.png",
|
|
26
|
+
"32": "data/icons/32.png",
|
|
27
|
+
"48": "data/icons/48.png",
|
|
28
|
+
"64": "data/icons/64.png"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"content_scripts": [
|
|
32
|
+
{
|
|
33
|
+
"world": "MAIN",
|
|
34
|
+
"all_frames": true,
|
|
35
|
+
"matches": ["*://*/*"],
|
|
36
|
+
"match_about_blank": true,
|
|
37
|
+
"run_at": "document_start",
|
|
38
|
+
"match_origin_as_fallback": true,
|
|
39
|
+
"js": ["data/content_script/page_context/inject.js"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"world": "ISOLATED",
|
|
43
|
+
"all_frames": true,
|
|
44
|
+
"matches": ["*://*/*"],
|
|
45
|
+
"match_about_blank": true,
|
|
46
|
+
"run_at": "document_start",
|
|
47
|
+
"match_origin_as_fallback": true,
|
|
48
|
+
"js": ["data/content_script/inject.js"]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"icons": {
|
|
52
|
+
"16": "data/icons/16.png",
|
|
53
|
+
"32": "data/icons/32.png",
|
|
54
|
+
"48": "data/icons/48.png",
|
|
55
|
+
"64": "data/icons/64.png",
|
|
56
|
+
"128": "data/icons/128.png"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "jumpy-lion",
|
|
3
3
|
"description": "",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.35",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.0.0"
|
|
8
8
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"clean": "rimraf ./dist",
|
|
29
29
|
"prepublishOnly": "npm run build",
|
|
30
30
|
"compile": "tsc -p tsconfig.build.json",
|
|
31
|
-
"copy-extension": "cp -r src/fingerprinting/all-fingerprint-defender dist/fingerprinting/",
|
|
31
|
+
"copy-extension": "cp -r src/fingerprinting/all-fingerprint-defender dist/fingerprinting/ && cp -r src/fingerprinting/anti-webgpu dist/fingerprinting/",
|
|
32
32
|
"build": "npm run clean && npm run compile && npm run copy-extension",
|
|
33
33
|
"ci:build": "turbo run build --cache-dir=\".turbo\"",
|
|
34
34
|
"test:unit": "vitest run unit",
|