From 1207dba0865c211eec6572d388a3531c47817918 Mon Sep 17 00:00:00 2001 From: didierfred <didierfred@gmail.com> Date: Sun, 25 Nov 2018 22:07:18 +0100 Subject: [PATCH] refactor for testing --- popup/config.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/popup/config.js b/popup/config.js index b2023ab..09f14db 100644 --- a/popup/config.js +++ b/popup/config.js @@ -374,7 +374,7 @@ function loadConfiguration(configuration) { config = {format_version:"1.2",target_page:"",headers:headers,debug_mode:false,show_comments:true,use_url_contains:false}; } else { - alert("invalid file format"); + alert("Invalid file format"); return; } } @@ -387,11 +387,16 @@ function loadConfiguration(configuration) { // store the conf in the local storage localStorage.setItem("config",JSON.stringify(config)); - // load the new conf + + // load the new conf + reloadConfigPage(); +} + + +function reloadConfigPage() { chrome.runtime.sendMessage("reload"); - // reload the configuration page with the new conf document.location.href="config.html"; -} + } /** -- GitLab