This commit is contained in:
idk
2023-06-20 15:38:33 -04:00
parent 054348bfb0
commit 00353f5d7a
4 changed files with 11 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ function hide(elementsToHide) {
? elementsToHide
: [elementsToHide];
elements.forEach((element) => {
console.log("(consoleinfo) hiding")
console.log("(consoleinfo) hiding");
el.classList.add("hidden");
});
}
@@ -39,7 +39,7 @@ function unhide(elementsToShow) {
: [elementsToShow];
elements.forEach((element) => {
if (element.style) {
console.log("(consoleinfo) unhiding")
console.log("(consoleinfo) unhiding");
el.classList.remove("hidden");
}
});

View File

@@ -1,5 +1,10 @@
function isProxyHost(requestDetails) {
if (requestDetails.url.includes(control_host()+":"+control_port()+"/jsonrpc")) return false;
if (
requestDetails.url.includes(
control_host() + ":" + control_port() + "/jsonrpc"
)
)
return false;
const originUrl = requestDetails.originUrl;
const isWindowOrHomeUrl =
originUrl !== browser.runtime.getURL("window.html") &&
@@ -168,7 +173,7 @@ function isRouterHost(url) {
path = url.replace(protocol + hostname + "/", "");
} else if (identifyProtocolHandler(url)) {
const newUrl = identifyProtocolHandler(url);
console.log("(host) testing router host protocol handler identified")
console.log("(host) testing router host protocol handler identified");
return isRouterHost(newUrl);
} else {
hostname = url.split("/")[0];

View File

@@ -31,7 +31,7 @@ function hide(elements) {
const elems = Array.isArray(elements) ? elements : [elements];
elems.forEach((elem) => {
if (elem.style) {
console.log("(proxyinfo) hiding")
console.log("(proxyinfo) hiding");
elem.classList.add("hidden");
}
});
@@ -42,7 +42,7 @@ function unhide(elements) {
const elems = Array.isArray(elements) ? elements : [elements];
elems.forEach((elem) => {
if (elem.style) {
console.log("(proxyinfo) unhiding")
console.log("(proxyinfo) unhiding");
elem.classList.remove("hidden");
}
});
@@ -76,4 +76,3 @@ fetch("http://127.0.0.1:7657/jsonrpc/")
var toopieIDLinks = document.querySelectorAll(".window-visit-toopie");
hide(toopieIDLinks);
});