diff --git a/background.js b/background.js index a458513..027107f 100644 --- a/background.js +++ b/background.js @@ -381,7 +381,7 @@ function CallMonitor_connnect(){ GL_PythonListen.stop(); - GL_PythonListen.start(); + GL_PythonListen.start("autostart"); let FBox = GL_Fritz_URL.split("//")[1]; diff --git a/manifest.json b/manifest.json index c4f3def..0fff07f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "description": "__MSG_extensionDescription__", "manifest_version": 2, "name": "__MSG_extensionName__", - "version": "0.2.0", + "version": "0.2.1", "default_locale": "en", "icons": { "48": "icons/telefonliste.svg" diff --git a/tools.js b/tools.js index cd3e1d2..5294724 100644 --- a/tools.js +++ b/tools.js @@ -271,19 +271,29 @@ class PythonListen{ return ok; } - start(){ + start(x){ if(this.connect() == true){ if(this.send("version") == true){ const self = this; //Bezug herstellen + + let sek = 1; + if(x == "autostart"){ + sek = 10; + } + this.#thisTimeout = setTimeout(() => { + //es dauert aufällig lange. evtl noch ne alte Version self.errorEvent({ "state": 0, "code": 0, "message": "\n" + browser.i18n.getMessage("CallMon_alt", [CallMon_Version, self.getCallMonVer()]) }); - }, 2*1000); + + self.stop(); + + }, sek*1000); return true; }