From 8c424ac635c0e1e5deccef9688d0b50aa997e677 Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 21 May 2019 17:39:53 +0200 Subject: [PATCH] Display error message in popup if launch fails. --- browser-plugins/webextension/launch.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/browser-plugins/webextension/launch.js b/browser-plugins/webextension/launch.js index f982f90..606c5c5 100644 --- a/browser-plugins/webextension/launch.js +++ b/browser-plugins/webextension/launch.js @@ -20,6 +20,7 @@ function get_tags() // get tags from text input. function onResponse(response) { console.log("Received: " + response); document.getElementById("status").textContent = ""; + if (response == "Command successful.") { window.close(); @@ -33,6 +34,8 @@ function onResponse(response) { function onError(error) { console.log(`Error: ${error}`); + document.getElementById("error").textContent = "Could not launch remwharead."; + document.getElementById("status").textContent = ""; } function launch() // Launch wrapper and send tags + URL to stdin.