JSFiddle - React, Tailwind, and code Playground
HTML
<div id="text">
</div>
JavaScript
// This piece of code trivially detects whether the PogoCheats Bot Helper
// Chrome extension or Firefox add-on is installed.
//
// You can do this from any website, INCLUDING BING!!!
//
// This is what happens when you steal my code without knowing what the fuck you are doing, Ken. :)
const chromeUrl = "chrome-extension://fjkloikadaafjolfnhhiogalghodfkmf/scripts/block-alerts.js";
const firefoxUrl = "moz-extension://35857785-347e-4f33-bbc4-0c1984e339e4/scripts/block-alerts.js";
const xhr = new XMLHttpRequest();
let browser = "Other";
if (navigator.userAgent.indexOf("Chrome") !== -1) {
browser = "Chrome";
xhr.open("GET", chromeUrl, true);
}
if (navigator.userAgent.indexOf("Firefox") !== -1) {
browser = "Firefox";
xhr.open("GET", firefoxUrl, true);
}
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
let installStatus = (xhr.status === 200);
document.getElementById("text").textContent = "The " + (
(browser === "Chrome")
? "Chrome"
: "Firefox"
) + " version of PogoCheats Bot Helper is" + (
installStatus
? ""
: " not"
) + " installed.";
}
};
if (browser === "Other") {
document.getElementById("text").textContent = "Your browser does not support PogoCheats Bot Helper.";
} else {
xhr.send(null);
}