updating popup url

This commit is contained in:
Tamius Han 2018-09-20 21:30:45 +02:00
parent 0f996f3067
commit e05eb27e6a
3 changed files with 7 additions and 3 deletions

View File

@ -260,7 +260,7 @@ class CommsServer {
const currentUrl = await this.getCurrentTabHostname();
if (message.url === currentUrl) {
this.server.url = message.url;
this.server.currentSite = message.url;
if(Debug.debug) { // we want to get these messages always when debugging
console.log("[Comms::processReceivedMessage] hostname matches currently active tab. active:", currentUrl, "message:", message.url);

View File

@ -175,6 +175,7 @@ class PageInfo {
this.rescan(RescanReason.URL_CHANGE);
this.lastUrl = window.location.href;
this.comms.registerTab();
}
this.scheduleUrlCheck();

View File

@ -361,6 +361,8 @@ function configureVideoTab() {
async function loadConfig(site){
console.log("NEW CONFIG!")
if (Debug.debug) {
console.log("\n\n-------------------------------------\n[popup.js::loadConfig] loading config. conf object:", settings.active);
}
@ -767,7 +769,7 @@ document.addEventListener("click", (e) => {
async function sleep(t) {
return new Promise( (resolve,reject) => {
setTimeout(t, () => resolve());
setTimeout(() => resolve(), t);
});
}
@ -798,7 +800,8 @@ async function popup_init() {
// });
hideWarning("script-not-running-warning");
while (!this.site) {
while (true) {
console.log("GETTING SITE")
getSite();
await sleep(5000);
}