Reload after importing options

This commit is contained in:
Ajay Ramachandran
2020-07-02 20:50:06 -04:00
parent 5ac6dd1a7f
commit 5c4f0c960c

View File

@@ -460,9 +460,6 @@ function activatePrivateTextChange(element: HTMLElement) {
}
Config.convertJSON();
// Reload options on page
init();
if (newConfig.supportInvidious) {
let checkbox = <HTMLInputElement> document.querySelector("#support-invidious > label > label > input");
@@ -470,6 +467,8 @@ function activatePrivateTextChange(element: HTMLElement) {
invidiousOnClick(checkbox, "supportInvidious");
}
window.location.reload();
} catch (e) {
alert(chrome.i18n.getMessage("incorrectlyFormattedOptions"));
}