forked from cloudacademy/static-website-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugins.html
39 lines (36 loc) · 914 Bytes
/
plugins.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Detecting Plugins</title>
</head>
<body>
<h1>Check out the console</h1>
<script>
function test_selenium_ide() {
fetch("chrome-extension://mooikfkahbdckldjjndioackbalphokd/indicator.html", {
"referrer": "",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "omit"
})
.then(response => response.text())
.then(data => {
if (data.includes("Selenium")) {
fetch("/robots.txt?extensions=selenium_ide");
console.log("Selenium IDE: Found");
} else {
console.log("Selenium IDE: Missing")
}
});
}
async function get_installed_plugins() {
//TODO allow for selective testing of abusive plugins
await test_selenium_ide();
}
get_installed_plugins()
</script>
</body>
</html>