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,95 +1,96 @@
|
|
|
1
|
-
var background = {
|
|
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
|
-
|
|
1
|
+
var background = {
|
|
2
|
+
"port": null,
|
|
3
|
+
"message": {},
|
|
4
|
+
"receive": function (id, callback) {
|
|
5
|
+
if (id) {
|
|
6
|
+
background.message[id] = callback;
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"send": function (id, data) {
|
|
10
|
+
if (id) {
|
|
11
|
+
chrome.runtime.sendMessage({
|
|
12
|
+
"method": id,
|
|
13
|
+
"data": data,
|
|
14
|
+
"path": "popup-to-background"
|
|
15
|
+
}, function () {
|
|
16
|
+
return chrome.runtime.lastError;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"connect": function (port) {
|
|
21
|
+
chrome.runtime.onMessage.addListener(background.listener);
|
|
22
|
+
/* */
|
|
23
|
+
if (port) {
|
|
24
|
+
background.port = port;
|
|
25
|
+
background.port.onMessage.addListener(background.listener);
|
|
26
|
+
background.port.onDisconnect.addListener(function () {
|
|
27
|
+
background.port = null;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"post": function (id, data) {
|
|
32
|
+
if (id) {
|
|
33
|
+
if (background.port) {
|
|
34
|
+
background.port.postMessage({
|
|
35
|
+
"method": id,
|
|
36
|
+
"data": data,
|
|
37
|
+
"path": "popup-to-background",
|
|
38
|
+
"port": background.port.name
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"listener": function (e) {
|
|
44
|
+
if (e) {
|
|
45
|
+
for (let id in background.message) {
|
|
46
|
+
if (background.message[id]) {
|
|
47
|
+
if ((typeof background.message[id]) === "function") {
|
|
48
|
+
if (e.path === "background-to-popup") {
|
|
49
|
+
if (e.method === id) {
|
|
50
|
+
background.message[id](e.data);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var config = {
|
|
61
|
+
"ids": [
|
|
62
|
+
"support",
|
|
63
|
+
"donation",
|
|
64
|
+
"fingerprint",
|
|
65
|
+
"notifications"
|
|
66
|
+
],
|
|
67
|
+
"render": function (e) {
|
|
68
|
+
const name = document.querySelector(".name");
|
|
69
|
+
const notifications = document.querySelector(".notifications");
|
|
70
|
+
/* */
|
|
71
|
+
name.textContent = chrome.runtime.getManifest().name;
|
|
72
|
+
notifications.textContent = e.notifications ? '☑' : '☐';
|
|
73
|
+
},
|
|
74
|
+
"load": function () {
|
|
75
|
+
for (let i = 0; i < config.ids.length; i++) {
|
|
76
|
+
const icon = document.querySelector("." + config.ids[i]);
|
|
77
|
+
const button = document.querySelector("#" + config.ids[i]);
|
|
78
|
+
/* */
|
|
79
|
+
button.addEventListener("click", function (e) {
|
|
80
|
+
background.send(e.target.id);
|
|
81
|
+
});
|
|
82
|
+
/* */
|
|
83
|
+
icon.addEventListener("click", function (e) {
|
|
84
|
+
background.send(e.target.className.replace("icon ", ''));
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/* */
|
|
88
|
+
background.send("load");
|
|
89
|
+
window.removeEventListener("load", config.load, false);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
background.receive("storage", config.render);
|
|
94
|
+
background.connect(chrome.runtime.connect({"name": "popup"}));
|
|
95
|
+
|
|
96
|
+
window.addEventListener("load", config.load, false);
|