From 1a8cb7839179b9ba328ea81310804f28d07e2887 Mon Sep 17 00:00:00 2001
From: toasted-nutbread
Date: Sat, 28 Sep 2019 13:42:48 -0400
Subject: Add version information
---
ext/bg/js/settings.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'ext/bg/js')
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index a0fe7c70..3f107785 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -240,6 +240,8 @@ async function onFormOptionsChanged(e) {
}
async function onReady() {
+ showExtensionInformation();
+
formSetupEventListeners();
await profileOptionsSetup();
@@ -741,3 +743,16 @@ function storageSpinnerShow(show) {
spinner.hide();
}
}
+
+
+/*
+ * Information
+ */
+
+function showExtensionInformation() {
+ const node = document.getElementById('extension-info');
+ if (node === null) { return; }
+
+ const manifest = chrome.runtime.getManifest();
+ node.textContent = `${manifest.name} v${manifest.version}`;
+}
--
cgit v1.2.3
From e18b8438ae369e84367fbb635a2e11506519a88a Mon Sep 17 00:00:00 2001
From: toasted-nutbread
Date: Sun, 29 Sep 2019 12:33:16 -0400
Subject: Updated button styles
---
ext/bg/js/settings.js | 6 ++++++
ext/bg/settings.html | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
(limited to 'ext/bg/js')
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index 3f107785..c85cc8a4 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -151,6 +151,7 @@ async function formWrite(options) {
function formSetupEventListeners() {
$('#dict-purge-link').click(utilAsync(onDictionaryPurge));
$('#dict-file').change(utilAsync(onDictionaryImport));
+ $('#dict-file-button').click(onDictionaryImportButtonClick);
$('#field-templates-reset').click(utilAsync(onAnkiFieldTemplatesReset));
$('input, select, textarea').not('.anki-model').not('.profile-form *').change(utilAsync(onFormOptionsChanged));
@@ -448,6 +449,11 @@ async function onDictionaryPurge(e) {
}
}
+function onDictionaryImportButtonClick() {
+ const dictFile = document.querySelector('#dict-file');
+ dictFile.click();
+}
+
async function onDictionaryImport(e) {
const dictFile = $('#dict-file');
const dictControls = $('#dict-importer').hide();
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index adac43b1..0bc5e14c 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -368,7 +368,8 @@
download free dictionaries
for use with this extension and to learn about importing proprietary EPWING dictionaries.
-
+
+
@@ -402,7 +403,7 @@
-
+
--
cgit v1.2.3