From 4177b6372696d9b424857fedd1be988cc7eb0095 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 8 Dec 2019 22:29:23 -0500 Subject: Remove redundant getUrl handlers --- ext/bg/js/settings/main.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 7456e7a4..0fd9cb23 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -199,14 +199,11 @@ async function onOptionsUpdate({source}) { await formWrite(options); } -function onMessage({action, params}, sender, callback) { +function onMessage({action, params}) { switch (action) { case 'optionsUpdate': onOptionsUpdate(params); break; - case 'getUrl': - callback({url: window.location.href}); - break; } } -- cgit v1.2.3 From 17277a645020bf13bef9aaf1c1292f2b1a7cea02 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 11 Dec 2019 20:20:53 -0500 Subject: Remove getOptionsArray --- ext/bg/js/settings/dictionaries.js | 4 ++-- ext/bg/js/settings/main.js | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js index a7205ae5..381d1ae2 100644 --- a/ext/bg/js/settings/dictionaries.js +++ b/ext/bg/js/settings/dictionaries.js @@ -531,7 +531,7 @@ async function onDictionaryPurge(e) { dictionarySpinnerShow(true); await utilDatabasePurge(); - for (const options of toIterable(await getOptionsArray())) { + for (const {options} of toIterable((await apiOptionsGetFull()).profiles)) { options.dictionaries = utilBackgroundIsolate({}); options.general.mainDictionary = ''; } @@ -593,7 +593,7 @@ async function onDictionaryImport(e) { } const {result, errors} = await utilDatabaseImport(files[i], updateProgress, importDetails); - for (const options of toIterable(await getOptionsArray())) { + for (const {options} of toIterable((await apiOptionsGetFull()).profiles)) { const dictionaryOptions = SettingsDictionaryListUI.createDictionaryOptions(); dictionaryOptions.enabled = true; options.dictionaries[result.title] = dictionaryOptions; diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 0fd9cb23..c5298dd4 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -16,11 +16,6 @@ * along with this program. If not, see . */ -async function getOptionsArray() { - const optionsFull = await apiOptionsGetFull(); - return optionsFull.profiles.map((profile) => profile.options); -} - async function formRead(options) { options.general.enable = $('#enable').prop('checked'); options.general.showGuide = $('#show-usage-guide').prop('checked'); -- cgit v1.2.3 From b1f72905cf70a9ddb94f033cae0cb7cc03468e21 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 11 Dec 2019 21:11:07 -0500 Subject: Add functions for modifying mutable options --- ext/bg/js/settings/anki.js | 2 +- ext/bg/js/settings/audio.js | 2 +- ext/bg/js/settings/dictionaries.js | 16 ++++++++-------- ext/bg/js/settings/main.js | 12 ++++++++++-- ext/bg/js/settings/profiles.js | 16 ++++++++-------- 5 files changed, 28 insertions(+), 20 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/settings/anki.js b/ext/bg/js/settings/anki.js index e1aabbaf..25096531 100644 --- a/ext/bg/js/settings/anki.js +++ b/ext/bg/js/settings/anki.js @@ -154,7 +154,7 @@ async function _onAnkiModelChanged(e) { } const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); options.anki[tabId].fields = utilBackgroundIsolate(fields); await settingsSaveOptions(); diff --git a/ext/bg/js/settings/audio.js b/ext/bg/js/settings/audio.js index b6ad12ba..d36876df 100644 --- a/ext/bg/js/settings/audio.js +++ b/ext/bg/js/settings/audio.js @@ -21,7 +21,7 @@ let audioSourceUI = null; async function audioSettingsInitialize() { const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); audioSourceUI = new AudioSourceUI.Container( options.audio.sources, document.querySelector('.audio-source-list'), diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js index 381d1ae2..69f6d544 100644 --- a/ext/bg/js/settings/dictionaries.js +++ b/ext/bg/js/settings/dictionaries.js @@ -273,7 +273,7 @@ class SettingsDictionaryEntryUI { progress.hidden = true; const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); onDatabaseUpdated(options); } } @@ -360,7 +360,7 @@ async function dictSettingsInitialize() { document.querySelector('#database-enable-prefix-wildcard-searches').addEventListener('change', (e) => onDatabaseEnablePrefixWildcardSearchesChanged(e), false); const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); onDictionaryOptionsChanged(options); onDatabaseUpdated(options); } @@ -425,7 +425,7 @@ async function updateMainDictionarySelect(options, dictionaries) { async function onDictionaryMainChanged(e) { const value = e.target.value; const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); options.general.mainDictionary = value; settingsSaveOptions(); } @@ -531,14 +531,14 @@ async function onDictionaryPurge(e) { dictionarySpinnerShow(true); await utilDatabasePurge(); - for (const {options} of toIterable((await apiOptionsGetFull()).profiles)) { + for (const {options} of toIterable((await getOptionsFullMutable()).profiles)) { options.dictionaries = utilBackgroundIsolate({}); options.general.mainDictionary = ''; } await settingsSaveOptions(); const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); onDatabaseUpdated(options); } catch (err) { dictionaryErrorsShow([err]); @@ -593,7 +593,7 @@ async function onDictionaryImport(e) { } const {result, errors} = await utilDatabaseImport(files[i], updateProgress, importDetails); - for (const {options} of toIterable((await apiOptionsGetFull()).profiles)) { + for (const {options} of toIterable((await getOptionsFullMutable()).profiles)) { const dictionaryOptions = SettingsDictionaryListUI.createDictionaryOptions(); dictionaryOptions.enabled = true; options.dictionaries[result.title] = dictionaryOptions; @@ -611,7 +611,7 @@ async function onDictionaryImport(e) { } const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); onDatabaseUpdated(options); } } catch (err) { @@ -630,7 +630,7 @@ async function onDictionaryImport(e) { async function onDatabaseEnablePrefixWildcardSearchesChanged(e) { - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); const v = !!e.target.checked; if (optionsFull.global.database.prefixWildcardsSupported === v) { return; } optionsFull.global.database.prefixWildcardsSupported = !!e.target.checked; diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index c5298dd4..315766e0 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -16,6 +16,14 @@ * along with this program. If not, see . */ +function getOptionsMutable(optionsContext) { + return utilBackend().getOptions(optionsContext); +} + +function getOptionsFullMutable() { + return utilBackend().getFullOptions(); +} + async function formRead(options) { options.general.enable = $('#enable').prop('checked'); options.general.showGuide = $('#show-usage-guide').prop('checked'); @@ -164,7 +172,7 @@ function formUpdateVisibility(options) { async function onFormOptionsChanged() { const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); await formRead(options); await settingsSaveOptions(); @@ -190,7 +198,7 @@ async function onOptionsUpdate({source}) { if (source === thisSource) { return; } const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); await formWrite(options); } diff --git a/ext/bg/js/settings/profiles.js b/ext/bg/js/settings/profiles.js index 8c218e97..946d6944 100644 --- a/ext/bg/js/settings/profiles.js +++ b/ext/bg/js/settings/profiles.js @@ -27,7 +27,7 @@ function getOptionsContext() { async function profileOptionsSetup() { - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); currentProfileIndex = optionsFull.profileCurrent; profileOptionsSetupEventListeners(); @@ -120,7 +120,7 @@ async function profileOptionsUpdateTarget(optionsFull) { profileFormWrite(optionsFull); const optionsContext = getOptionsContext(); - const options = await apiOptionsGet(optionsContext); + const options = await getOptionsMutable(optionsContext); await formWrite(options); } @@ -164,13 +164,13 @@ async function onProfileOptionsChanged(e) { return; } - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); await profileFormRead(optionsFull); await settingsSaveOptions(); } async function onTargetProfileChanged() { - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); const index = tryGetIntegerValue('#profile-target', 0, optionsFull.profiles.length); if (index === null || currentProfileIndex === index) { return; @@ -182,7 +182,7 @@ async function onTargetProfileChanged() { } async function onProfileAdd() { - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); const profile = utilBackgroundIsolate(optionsFull.profiles[currentProfileIndex]); profile.name = profileOptionsCreateCopyName(profile.name, optionsFull.profiles, 100); optionsFull.profiles.push(profile); @@ -210,7 +210,7 @@ async function onProfileRemove(e) { async function onProfileRemoveConfirm() { $('#profile-remove-modal').modal('hide'); - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); if (optionsFull.profiles.length <= 1) { return; } @@ -234,7 +234,7 @@ function onProfileNameChanged() { } async function onProfileMove(offset) { - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); const index = currentProfileIndex + offset; if (index < 0 || index >= optionsFull.profiles.length) { return; @@ -267,7 +267,7 @@ async function onProfileCopy() { async function onProfileCopyConfirm() { $('#profile-copy-modal').modal('hide'); - const optionsFull = await apiOptionsGetFull(); + const optionsFull = await getOptionsFullMutable(); const index = tryGetIntegerValue('#profile-copy-source', 0, optionsFull.profiles.length); if (index === null || index === currentProfileIndex) { return; -- cgit v1.2.3 From 87ece13647aae3f670f03d7f5667f638bee23bcb Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 13 Dec 2019 23:23:15 -0500 Subject: Isolate arguments passed across window contexts --- ext/bg/js/settings/main.js | 4 +++- ext/bg/js/util.js | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 315766e0..78a5870c 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -17,7 +17,9 @@ */ function getOptionsMutable(optionsContext) { - return utilBackend().getOptions(optionsContext); + return utilBackend().getOptions( + utilBackgroundIsolate(optionsContext) + ); } function getOptionsFullMutable() { diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index 81cb0e71..f7f6e770 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -91,11 +91,16 @@ function utilDatabaseGetDictionaryInfo() { } function utilDatabaseGetDictionaryCounts(dictionaryNames, getTotal) { - return utilBackend().translator.database.getDictionaryCounts(dictionaryNames, getTotal); + return utilBackend().translator.database.getDictionaryCounts( + utilBackgroundIsolate(dictionaryNames), + utilBackgroundIsolate(getTotal) + ); } function utilAnkiGetModelFieldNames(modelName) { - return utilBackend().anki.getModelFieldNames(modelName); + return utilBackend().anki.getModelFieldNames( + utilBackgroundIsolate(modelName) + ); } function utilDatabasePurge() { @@ -103,12 +108,19 @@ function utilDatabasePurge() { } function utilDatabaseDeleteDictionary(dictionaryName, onProgress) { - return utilBackend().translator.database.deleteDictionary(dictionaryName, onProgress); + return utilBackend().translator.database.deleteDictionary( + utilBackgroundIsolate(dictionaryName), + onProgress + ); } async function utilDatabaseImport(data, progress, details) { data = await utilReadFile(data); - return utilBackend().translator.database.importDictionary(data, progress, details); + return utilBackend().translator.database.importDictionary( + utilBackgroundIsolate(data), + progress, + utilBackgroundIsolate(details) + ); } function utilReadFile(file) { -- cgit v1.2.3 From 2a95f1420f08b034ae8e12ecffed86aa6f33e53a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 20 Dec 2019 13:36:54 -0500 Subject: Move optionsUpdate message handler into Yomichan class --- ext/bg/js/settings/main.js | 10 +--------- ext/fg/js/frontend.js | 2 +- ext/mixed/js/core.js | 11 +++++++++-- ext/mixed/js/display.js | 15 +-------------- 4 files changed, 12 insertions(+), 26 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 78a5870c..870769e5 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -204,14 +204,6 @@ async function onOptionsUpdate({source}) { await formWrite(options); } -function onMessage({action, params}) { - switch (action) { - case 'optionsUpdate': - onOptionsUpdate(params); - break; - } -} - function showExtensionInformation() { const node = document.getElementById('extension-info'); @@ -235,7 +227,7 @@ async function onReady() { storageInfoInitialize(); - chrome.runtime.onMessage.addListener(onMessage); + yomichan.on('optionsUpdate', onOptionsUpdate); } $(document).ready(() => onReady()); diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index c8e112a7..1d63d928 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -54,6 +54,7 @@ class Frontend extends TextScanner { try { await this.updateOptions(); + yomichan.on('optionsUpdate', () => this.updateOptions()); chrome.runtime.onMessage.addListener(this.onRuntimeMessage.bind(this)); this.isPreparedPromiseResolve(); } catch (e) { @@ -200,6 +201,5 @@ Frontend._windowMessageHandlers = new Map([ ]); Frontend._runtimeMessageHandlers = new Map([ - ['optionsUpdate', (self) => { self.updateOptions(); }], ['popupSetVisibleOverride', (self, {visible}) => { self.popup.setVisibleOverride(visible); }] ]); diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js index edb1f913..a3c8c0b0 100644 --- a/ext/mixed/js/core.js +++ b/ext/mixed/js/core.js @@ -232,10 +232,13 @@ class EventDispatcher { */ const yomichan = (() => { - class Yomichan { + class Yomichan extends EventDispatcher { constructor() { + super(); + this._messageHandlers = new Map([ - ['getUrl', this._onMessageGetUrl.bind(this)] + ['getUrl', this._onMessageGetUrl.bind(this)], + ['optionsUpdate', this._onMessageOptionsUpdate.bind(this)] ]); chrome.runtime.onMessage.addListener(this._onMessage.bind(this)); @@ -253,6 +256,10 @@ const yomichan = (() => { _onMessageGetUrl() { return {url: window.location.href}; } + + _onMessageOptionsUpdate({source}) { + this.trigger('optionsUpdate', {source}); + } } return new Yomichan(); diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index f3b5dd2a..089941a9 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -225,15 +225,6 @@ class Display { } } - onRuntimeMessage({action, params}, sender, callback) { - const handler = Display._runtimeMessageHandlers.get(action); - if (typeof handler !== 'function') { return false; } - - const result = handler(this, params, sender); - callback(result); - return false; - } - getOptionsContext() { throw new Error('Override me'); } @@ -244,7 +235,7 @@ class Display { async initialize(options=null) { await this.updateOptions(options); - chrome.runtime.onMessage.addListener(this.onRuntimeMessage.bind(this)); + yomichan.on('optionsUpdate', () => this.updateOptions(null)); } async updateOptions(options) { @@ -878,7 +869,3 @@ Display._onKeyDownHandlers = new Map([ return false; }] ]); - -Display._runtimeMessageHandlers = new Map([ - ['optionsUpdate', (self) => self.updateOptions(null)] -]); -- cgit v1.2.3 From 3033fea31e4bc9ba7198d2d31d6f6046813926d1 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 14 Dec 2019 16:59:44 -0500 Subject: Treat null templates as the default value --- ext/bg/js/backend.js | 11 +++++++++-- ext/bg/js/dictionary.js | 8 ++++---- ext/bg/js/options.js | 2 +- ext/bg/js/settings/anki-templates.js | 4 +++- ext/bg/js/settings/main.js | 10 ++++++++-- ext/bg/js/util.js | 2 ++ 6 files changed, 27 insertions(+), 10 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index ca03f94d..1a874dc8 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -321,6 +321,7 @@ class Backend { async _onApiDefinitionAdd({definition, mode, context, optionsContext}) { const options = await this.getOptions(optionsContext); + const templates = Backend._getTemplates(options); if (mode !== 'kanji') { await audioInject( @@ -339,19 +340,20 @@ class Backend { ); } - const note = await dictNoteFormat(definition, mode, options); + const note = await dictNoteFormat(definition, mode, options, templates); return this.anki.addNote(note); } async _onApiDefinitionsAddable({definitions, modes, optionsContext}) { const options = await this.getOptions(optionsContext); + const templates = Backend._getTemplates(options); const states = []; try { const notes = []; for (const definition of definitions) { for (const mode of modes) { - const note = await dictNoteFormat(definition, mode, options); + const note = await dictNoteFormat(definition, mode, options, templates); notes.push(note); } } @@ -672,6 +674,11 @@ class Backend { return 'chrome'; } } + + static _getTemplates(options) { + const templates = options.anki.fieldTemplates; + return typeof templates === 'string' ? templates : profileOptionsGetDefaultFieldTemplates(); + } } Backend._messageHandlers = new Map([ diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js index 0b35e32e..28705513 100644 --- a/ext/bg/js/dictionary.js +++ b/ext/bg/js/dictionary.js @@ -310,7 +310,7 @@ function dictFieldSplit(field) { return field.length === 0 ? [] : field.split(' '); } -async function dictFieldFormat(field, definition, mode, options, exceptions) { +async function dictFieldFormat(field, definition, mode, options, templates, exceptions) { const data = { marker: null, definition, @@ -329,7 +329,7 @@ async function dictFieldFormat(field, definition, mode, options, exceptions) { } data.marker = marker; try { - return await apiTemplateRender(options.anki.fieldTemplates, data, true); + return await apiTemplateRender(templates, data, true); } catch (e) { if (exceptions) { exceptions.push(e); } return `{${marker}-render-error}`; @@ -357,7 +357,7 @@ dictFieldFormat.markers = new Set([ 'url' ]); -async function dictNoteFormat(definition, mode, options) { +async function dictNoteFormat(definition, mode, options, templates) { const note = {fields: {}, tags: options.anki.tags}; let fields = []; @@ -391,7 +391,7 @@ async function dictNoteFormat(definition, mode, options) { } for (const name in fields) { - note.fields[name] = await dictFieldFormat(fields[name], definition, mode, options); + note.fields[name] = await dictFieldFormat(fields[name], definition, mode, options, templates); } return note; diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 2d13f6d9..7f540a70 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -326,7 +326,7 @@ function profileOptionsCreateDefaults() { screenshot: {format: 'png', quality: 92}, terms: {deck: '', model: '', fields: {}}, kanji: {deck: '', model: '', fields: {}}, - fieldTemplates: profileOptionsGetDefaultFieldTemplates() + fieldTemplates: null } }; } diff --git a/ext/bg/js/settings/anki-templates.js b/ext/bg/js/settings/anki-templates.js index 9cdfc134..0e6e3cbd 100644 --- a/ext/bg/js/settings/anki-templates.js +++ b/ext/bg/js/settings/anki-templates.js @@ -73,7 +73,9 @@ async function ankiTemplatesValidate(infoNode, field, mode, showSuccessResult, i const definition = await ankiTemplatesValidateGetDefinition(text, optionsContext); if (definition !== null) { const options = await apiOptionsGet(optionsContext); - result = await dictFieldFormat(field, definition, mode, options, exceptions); + let templates = options.anki.fieldTemplates; + if (typeof templates !== 'string') { templates = profileOptionsGetDefaultFieldTemplates(); } + result = await dictFieldFormat(field, definition, mode, options, templates, exceptions); } } catch (e) { exceptions.push(e); diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 870769e5..c0b2deb6 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -145,7 +145,11 @@ async function formWrite(options) { $('#interface-server').val(options.anki.server); $('#screenshot-format').val(options.anki.screenshot.format); $('#screenshot-quality').val(options.anki.screenshot.quality); - $('#field-templates').val(options.anki.fieldTemplates); + + let templates = options.anki.fieldTemplates; + if (typeof templates !== 'string') { templates = profileOptionsGetDefaultFieldTemplates(); } + + $('#field-templates').val(templates); onAnkiTemplatesValidateCompile(); await onAnkiOptionsChanged(options); @@ -166,7 +170,9 @@ function formUpdateVisibility(options) { if (options.general.debugInfo) { const temp = utilIsolate(options); - temp.anki.fieldTemplates = '...'; + if (typeof temp.anki.fieldTemplates === 'string') { + temp.anki.fieldTemplates = '...'; + } const text = JSON.stringify(temp, null, 4); $('#debug').text(text); } diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index c88c2768..0527dc0b 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -88,6 +88,8 @@ function utilSetDifference(setA, setB) { function utilStringHashCode(string) { let hashCode = 0; + if (typeof string !== 'string') { return hashCode; } + for (let i = 0, charCode = string.charCodeAt(i); i < string.length; charCode = string.charCodeAt(++i)) { hashCode = ((hashCode << 5) - hashCode) + charCode; hashCode |= 0; -- cgit v1.2.3 From d2ae7364bb969afbaa86fed28c8c756c0a19ab02 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 15 Dec 2019 00:02:52 -0500 Subject: Update anki-templates.js to control the value of fieldTemplates Also assigns a value of null when using the default value --- ext/bg/js/settings/anki-templates.js | 32 +++++++++++++++++++++++++++++++- ext/bg/js/settings/main.js | 8 +------- ext/bg/settings.html | 4 +++- 3 files changed, 35 insertions(+), 9 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/ext/bg/js/settings/anki-templates.js b/ext/bg/js/settings/anki-templates.js index 0e6e3cbd..281383a7 100644 --- a/ext/bg/js/settings/anki-templates.js +++ b/ext/bg/js/settings/anki-templates.js @@ -42,10 +42,22 @@ function ankiTemplatesInitialize() { node.addEventListener('click', onAnkiTemplateMarkerClicked, false); } - $('#field-templates').on('change', (e) => onAnkiTemplatesValidateCompile(e)); + $('#field-templates').on('change', (e) => onAnkiFieldTemplatesChanged(e)); $('#field-template-render').on('click', (e) => onAnkiTemplateRender(e)); $('#field-templates-reset').on('click', (e) => onAnkiFieldTemplatesReset(e)); $('#field-templates-reset-confirm').on('click', (e) => onAnkiFieldTemplatesResetConfirm(e)); + + ankiTemplatesUpdateValue(); +} + +async function ankiTemplatesUpdateValue() { + const optionsContext = getOptionsContext(); + const options = await apiOptionsGet(optionsContext); + let templates = options.anki.fieldTemplates; + if (typeof templates !== 'string') { templates = profileOptionsGetDefaultFieldTemplates(); } + $('#field-templates').val(templates); + + onAnkiTemplatesValidateCompile(); } const ankiTemplatesValidateGetDefinition = (() => { @@ -91,6 +103,24 @@ async function ankiTemplatesValidate(infoNode, field, mode, showSuccessResult, i } } +async function onAnkiFieldTemplatesChanged(e) { + // Get value + let templates = e.currentTarget.value; + if (templates === profileOptionsGetDefaultFieldTemplates()) { + // Default + templates = null; + } + + // Overwrite + const optionsContext = getOptionsContext(); + const options = await getOptionsMutable(optionsContext); + options.anki.fieldTemplates = templates; + await settingsSaveOptions(); + + // Compile + onAnkiTemplatesValidateCompile(); +} + function onAnkiTemplatesValidateCompile() { const infoNode = document.querySelector('#field-template-compile-result'); ankiTemplatesValidate(infoNode, '{expression}', 'term-kanji', false, true); diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index c0b2deb6..3c7d6fce 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -80,7 +80,6 @@ async function formRead(options) { options.anki.server = $('#interface-server').val(); options.anki.screenshot.format = $('#screenshot-format').val(); options.anki.screenshot.quality = parseInt($('#screenshot-quality').val(), 10); - options.anki.fieldTemplates = $('#field-templates').val(); if (optionsAnkiEnableOld && !ankiErrorShown()) { options.anki.terms.deck = $('#anki-terms-deck').val(); @@ -146,12 +145,7 @@ async function formWrite(options) { $('#screenshot-format').val(options.anki.screenshot.format); $('#screenshot-quality').val(options.anki.screenshot.quality); - let templates = options.anki.fieldTemplates; - if (typeof templates !== 'string') { templates = profileOptionsGetDefaultFieldTemplates(); } - - $('#field-templates').val(templates); - - onAnkiTemplatesValidateCompile(); + await ankiTemplatesUpdateValue(); await onAnkiOptionsChanged(options); await onDictionaryOptionsChanged(options); diff --git a/ext/bg/settings.html b/ext/bg/settings.html index c924f06f..e0036f57 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -754,7 +754,9 @@ engine. Advanced users can modify these templates for ultimate control of what information gets included in their Anki cards. If you encounter problems with your changes, you can always reset to the default template settings.

- +
+ +
-- cgit v1.2.3 From 899ef167d184fedb072b727e0dc04f2579b08e1f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 1 Jan 2020 12:00:00 -0500 Subject: Update copyright --- LICENSE | 2 +- ext/bg/css/settings.css | 2 +- ext/bg/js/anki.js | 2 +- ext/bg/js/api.js | 2 +- ext/bg/js/audio.js | 2 +- ext/bg/js/backend-api-forwarder.js | 2 +- ext/bg/js/backend.js | 2 +- ext/bg/js/conditions.js | 2 +- ext/bg/js/context.js | 2 +- ext/bg/js/database.js | 2 +- ext/bg/js/deinflector.js | 2 +- ext/bg/js/dictionary.js | 2 +- ext/bg/js/handlebars.js | 2 +- ext/bg/js/json-schema.js | 2 +- ext/bg/js/mecab.js | 2 +- ext/bg/js/options.js | 2 +- ext/bg/js/page-exit-prevention.js | 2 +- ext/bg/js/profile-conditions.js | 2 +- ext/bg/js/request.js | 2 +- ext/bg/js/search-frontend.js | 2 +- ext/bg/js/search-query-parser.js | 2 +- ext/bg/js/search.js | 2 +- ext/bg/js/settings/anki-templates.js | 2 +- ext/bg/js/settings/anki.js | 2 +- ext/bg/js/settings/audio-ui.js | 2 +- ext/bg/js/settings/audio.js | 2 +- ext/bg/js/settings/backup.js | 2 +- ext/bg/js/settings/conditions-ui.js | 2 +- ext/bg/js/settings/dictionaries.js | 2 +- ext/bg/js/settings/main.js | 2 +- ext/bg/js/settings/popup-preview-frame.js | 2 +- ext/bg/js/settings/popup-preview.js | 2 +- ext/bg/js/settings/profiles.js | 2 +- ext/bg/js/settings/storage.js | 2 +- ext/bg/js/translator.js | 2 +- ext/bg/js/util.js | 2 +- ext/bg/legal.html | 2 +- ext/fg/css/client.css | 2 +- ext/fg/js/document.js | 2 +- ext/fg/js/float.js | 2 +- ext/fg/js/frontend-api-receiver.js | 2 +- ext/fg/js/frontend-api-sender.js | 2 +- ext/fg/js/frontend-initialize.js | 2 +- ext/fg/js/frontend.js | 2 +- ext/fg/js/popup-nested.js | 2 +- ext/fg/js/popup-proxy-host.js | 2 +- ext/fg/js/popup-proxy.js | 2 +- ext/fg/js/popup.js | 2 +- ext/fg/js/source.js | 2 +- ext/mixed/css/display-dark.css | 2 +- ext/mixed/css/display-default.css | 2 +- ext/mixed/css/display.css | 2 +- ext/mixed/js/api.js | 2 +- ext/mixed/js/audio.js | 2 +- ext/mixed/js/core.js | 2 +- ext/mixed/js/display-context.js | 2 +- ext/mixed/js/display.js | 2 +- ext/mixed/js/dom.js | 2 +- ext/mixed/js/japanese.js | 2 +- ext/mixed/js/scroll.js | 2 +- ext/mixed/js/text-scanner.js | 2 +- ext/mixed/js/timer.js | 2 +- 62 files changed, 62 insertions(+), 62 deletions(-) (limited to 'ext/bg/js/settings/main.js') diff --git a/LICENSE b/LICENSE index 811a6915..266e6069 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2016-2019 Alex Yatskov +Copyright 2016-2020 Alex Yatskov This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/ext/bg/css/settings.css b/ext/bg/css/settings.css index 8adae47c..ee9d18a1 100644 --- a/ext/bg/css/settings.css +++ b/ext/bg/css/settings.css @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/anki.js b/ext/bg/js/anki.js index 17b93620..48ed66bf 100644 --- a/ext/bg/js/anki.js +++ b/ext/bg/js/anki.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js index 9f37ccd8..8ad8d0bb 100644 --- a/ext/bg/js/api.js +++ b/ext/bg/js/api.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js index b39b6c9d..0fc2148d 100644 --- a/ext/bg/js/audio.js +++ b/ext/bg/js/audio.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alex Yatskov + * Copyright (C) 2017-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/backend-api-forwarder.js b/ext/bg/js/backend-api-forwarder.js index db4d30b9..0a387e08 100644 --- a/ext/bg/js/backend-api-forwarder.js +++ b/ext/bg/js/backend-api-forwarder.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 3c8a068b..2060f414 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/conditions.js b/ext/bg/js/conditions.js index c0f0f301..d3d0b465 100644 --- a/ext/bg/js/conditions.js +++ b/ext/bg/js/conditions.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/context.js b/ext/bg/js/context.js index 0b21f662..84368256 100644 --- a/ext/bg/js/context.js +++ b/ext/bg/js/context.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alex Yatskov + * Copyright (C) 2017-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index 5aee2311..9c44f240 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/deinflector.js b/ext/bg/js/deinflector.js index 51f4723c..752a0959 100644 --- a/ext/bg/js/deinflector.js +++ b/ext/bg/js/deinflector.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js index 28705513..43971f8a 100644 --- a/ext/bg/js/dictionary.js +++ b/ext/bg/js/dictionary.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/handlebars.js b/ext/bg/js/handlebars.js index b57ba738..7e4b7b8d 100644 --- a/ext/bg/js/handlebars.js +++ b/ext/bg/js/handlebars.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/json-schema.js b/ext/bg/js/json-schema.js index 3238bc3e..d56f8ef9 100644 --- a/ext/bg/js/json-schema.js +++ b/ext/bg/js/json-schema.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/mecab.js b/ext/bg/js/mecab.js index 62111f73..33f9949e 100644 --- a/ext/bg/js/mecab.js +++ b/ext/bg/js/mecab.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 84e74bd8..63e7c023 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/page-exit-prevention.js b/ext/bg/js/page-exit-prevention.js index aee4e3c2..4143a835 100644 --- a/ext/bg/js/page-exit-prevention.js +++ b/ext/bg/js/page-exit-prevention.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/profile-conditions.js b/ext/bg/js/profile-conditions.js index ebc6680a..20350f4b 100644 --- a/ext/bg/js/profile-conditions.js +++ b/ext/bg/js/profile-conditions.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/request.js b/ext/bg/js/request.js index 7d73d49b..6d05f66e 100644 --- a/ext/bg/js/request.js +++ b/ext/bg/js/request.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Alex Yatskov + * Copyright (C) 2017-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-frontend.js index fdf7219c..2cf7f5a7 100644 --- a/ext/bg/js/search-frontend.js +++ b/ext/bg/js/search-frontend.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/search-query-parser.js b/ext/bg/js/search-query-parser.js index fc95ddff..fec21d3b 100644 --- a/ext/bg/js/search-query-parser.js +++ b/ext/bg/js/search-query-parser.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index cbfce6a5..439cde40 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/anki-templates.js b/ext/bg/js/settings/anki-templates.js index 281383a7..4644214b 100644 --- a/ext/bg/js/settings/anki-templates.js +++ b/ext/bg/js/settings/anki-templates.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/anki.js b/ext/bg/js/settings/anki.js index 25096531..ccce16fe 100644 --- a/ext/bg/js/settings/anki.js +++ b/ext/bg/js/settings/anki.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/audio-ui.js b/ext/bg/js/settings/audio-ui.js index de3be083..dc968628 100644 --- a/ext/bg/js/settings/audio-ui.js +++ b/ext/bg/js/settings/audio-ui.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/audio.js b/ext/bg/js/settings/audio.js index d36876df..5809375c 100644 --- a/ext/bg/js/settings/audio.js +++ b/ext/bg/js/settings/audio.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/backup.js b/ext/bg/js/settings/backup.js index d278b718..3a4d1fd2 100644 --- a/ext/bg/js/settings/backup.js +++ b/ext/bg/js/settings/backup.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/conditions-ui.js b/ext/bg/js/settings/conditions-ui.js index cc9db087..a186a5be 100644 --- a/ext/bg/js/settings/conditions-ui.js +++ b/ext/bg/js/settings/conditions-ui.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js index 717d02cb..330e935a 100644 --- a/ext/bg/js/settings/dictionaries.js +++ b/ext/bg/js/settings/dictionaries.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 3c7d6fce..70650d8b 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js index 6d017275..7be3466d 100644 --- a/ext/bg/js/settings/popup-preview-frame.js +++ b/ext/bg/js/settings/popup-preview-frame.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/popup-preview.js b/ext/bg/js/settings/popup-preview.js index d8579eb1..ba0c979d 100644 --- a/ext/bg/js/settings/popup-preview.js +++ b/ext/bg/js/settings/popup-preview.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/profiles.js b/ext/bg/js/settings/profiles.js index 946d6944..61fe9bff 100644 --- a/ext/bg/js/settings/profiles.js +++ b/ext/bg/js/settings/profiles.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/settings/storage.js b/ext/bg/js/settings/storage.js index 51ca6855..c040a041 100644 --- a/ext/bg/js/settings/storage.js +++ b/ext/bg/js/settings/storage.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov + * Copyright (C) 2019-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index 0f3d0aa0..d6f62fd8 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index 4c989642..09c45c08 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2017 Alex Yatskov + * Copyright (C) 2016-2020 Alex Yatskov * Author: Alex Yatskov * * This program is free software: you can redistribute it and/or modify diff --git a/ext/bg/legal.html b/ext/bg/legal.html index 082239d7..4c9029a0 100644 --- a/ext/bg/legal.html +++ b/ext/bg/legal.html @@ -17,7 +17,7 @@

Yomichan License

-Copyright (C) 2016-2019  Alex Yatskov
+Copyright (C) 2016-2020  Alex Yatskov
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/ext/fg/css/client.css b/ext/fg/css/client.css
index 633c88ef..6f52b676 100644
--- a/ext/fg/css/client.css
+++ b/ext/fg/css/client.css
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js
index fa7e7cbc..d6ef5f29 100644
--- a/ext/fg/js/document.js
+++ b/ext/fg/js/document.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 7375b68f..302bcda1 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/frontend-api-receiver.js b/ext/fg/js/frontend-api-receiver.js
index 8d5e52ee..72490f2c 100644
--- a/ext/fg/js/frontend-api-receiver.js
+++ b/ext/fg/js/frontend-api-receiver.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/frontend-api-sender.js b/ext/fg/js/frontend-api-sender.js
index b7c2c57c..b90310d6 100644
--- a/ext/fg/js/frontend-api-sender.js
+++ b/ext/fg/js/frontend-api-sender.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index c153b5b6..d819688f 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 6239a057..0ddcecf1 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/popup-nested.js b/ext/fg/js/popup-nested.js
index 3df469fe..df619141 100644
--- a/ext/fg/js/popup-nested.js
+++ b/ext/fg/js/popup-nested.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index e13d6f05..3cc8a132 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index 0e6a88a7..c29e9e55 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 4d00f629..5d445dba 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js
index a84feed4..cea6623d 100644
--- a/ext/fg/js/source.js
+++ b/ext/fg/js/source.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/css/display-dark.css b/ext/mixed/css/display-dark.css
index 681d248c..236f36c4 100644
--- a/ext/mixed/css/display-dark.css
+++ b/ext/mixed/css/display-dark.css
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/css/display-default.css b/ext/mixed/css/display-default.css
index add0a9c8..b563d831 100644
--- a/ext/mixed/css/display-default.css
+++ b/ext/mixed/css/display-default.css
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css
index 70fffdc1..5a7cbf5d 100644
--- a/ext/mixed/css/display.css
+++ b/ext/mixed/css/display.css
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js
index dc901efc..c801baa3 100644
--- a/ext/mixed/js/api.js
+++ b/ext/mixed/js/api.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/audio.js b/ext/mixed/js/audio.js
index 35f283a4..d9a72a12 100644
--- a/ext/mixed/js/audio.js
+++ b/ext/mixed/js/audio.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 5e560a58..9e2b419e 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/display-context.js b/ext/mixed/js/display-context.js
index 4b399881..45c2a823 100644
--- a/ext/mixed/js/display-context.js
+++ b/ext/mixed/js/display-context.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 089941a9..513d2596 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017  Alex Yatskov 
+ * Copyright (C) 2017-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/dom.js b/ext/mixed/js/dom.js
index 4e4d49e3..87448b89 100644
--- a/ext/mixed/js/dom.js
+++ b/ext/mixed/js/dom.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js
index ea1c0065..b046019c 100644
--- a/ext/mixed/js/japanese.js
+++ b/ext/mixed/js/japanese.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016  Alex Yatskov 
+ * Copyright (C) 2016-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/scroll.js b/ext/mixed/js/scroll.js
index 824fd92b..869f0945 100644
--- a/ext/mixed/js/scroll.js
+++ b/ext/mixed/js/scroll.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index 9a739c7e..455c756f 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/ext/mixed/js/timer.js b/ext/mixed/js/timer.js
index 87ab62a7..bfa2e087 100644
--- a/ext/mixed/js/timer.js
+++ b/ext/mixed/js/timer.js
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019  Alex Yatskov 
+ * Copyright (C) 2019-2020  Alex Yatskov 
  * Author: Alex Yatskov 
  *
  * This program is free software: you can redistribute it and/or modify
-- 
cgit v1.2.3


From 0d7ccf25b88abc414358e7cb435a227d43ba548f Mon Sep 17 00:00:00 2001
From: toasted-nutbread 
Date: Wed, 1 Jan 2020 12:00:31 -0500
Subject: Update license info URL

---
 LICENSE                                   | 2 +-
 ext/bg/css/settings.css                   | 2 +-
 ext/bg/js/anki.js                         | 2 +-
 ext/bg/js/api.js                          | 2 +-
 ext/bg/js/audio.js                        | 2 +-
 ext/bg/js/backend-api-forwarder.js        | 2 +-
 ext/bg/js/backend.js                      | 2 +-
 ext/bg/js/conditions.js                   | 2 +-
 ext/bg/js/context.js                      | 2 +-
 ext/bg/js/database.js                     | 2 +-
 ext/bg/js/deinflector.js                  | 2 +-
 ext/bg/js/dictionary.js                   | 2 +-
 ext/bg/js/handlebars.js                   | 2 +-
 ext/bg/js/json-schema.js                  | 2 +-
 ext/bg/js/mecab.js                        | 2 +-
 ext/bg/js/options.js                      | 2 +-
 ext/bg/js/page-exit-prevention.js         | 2 +-
 ext/bg/js/profile-conditions.js           | 2 +-
 ext/bg/js/request.js                      | 2 +-
 ext/bg/js/search-frontend.js              | 2 +-
 ext/bg/js/search-query-parser.js          | 2 +-
 ext/bg/js/search.js                       | 2 +-
 ext/bg/js/settings/anki-templates.js      | 2 +-
 ext/bg/js/settings/anki.js                | 2 +-
 ext/bg/js/settings/audio-ui.js            | 2 +-
 ext/bg/js/settings/audio.js               | 2 +-
 ext/bg/js/settings/backup.js              | 2 +-
 ext/bg/js/settings/conditions-ui.js       | 2 +-
 ext/bg/js/settings/dictionaries.js        | 2 +-
 ext/bg/js/settings/main.js                | 2 +-
 ext/bg/js/settings/popup-preview-frame.js | 2 +-
 ext/bg/js/settings/popup-preview.js       | 2 +-
 ext/bg/js/settings/profiles.js            | 2 +-
 ext/bg/js/settings/storage.js             | 2 +-
 ext/bg/js/translator.js                   | 2 +-
 ext/bg/js/util.js                         | 2 +-
 ext/bg/legal.html                         | 2 +-
 ext/fg/css/client.css                     | 2 +-
 ext/fg/js/document.js                     | 2 +-
 ext/fg/js/float.js                        | 2 +-
 ext/fg/js/frontend-api-receiver.js        | 2 +-
 ext/fg/js/frontend-api-sender.js          | 2 +-
 ext/fg/js/frontend-initialize.js          | 2 +-
 ext/fg/js/frontend.js                     | 2 +-
 ext/fg/js/popup-nested.js                 | 2 +-
 ext/fg/js/popup-proxy-host.js             | 2 +-
 ext/fg/js/popup-proxy.js                  | 2 +-
 ext/fg/js/popup.js                        | 2 +-
 ext/fg/js/source.js                       | 2 +-
 ext/mixed/css/display-dark.css            | 2 +-
 ext/mixed/css/display-default.css         | 2 +-
 ext/mixed/css/display.css                 | 2 +-
 ext/mixed/js/api.js                       | 2 +-
 ext/mixed/js/audio.js                     | 2 +-
 ext/mixed/js/core.js                      | 2 +-
 ext/mixed/js/display-context.js           | 2 +-
 ext/mixed/js/display.js                   | 2 +-
 ext/mixed/js/dom.js                       | 2 +-
 ext/mixed/js/japanese.js                  | 2 +-
 ext/mixed/js/scroll.js                    | 2 +-
 ext/mixed/js/text-scanner.js              | 2 +-
 ext/mixed/js/timer.js                     | 2 +-
 62 files changed, 62 insertions(+), 62 deletions(-)

(limited to 'ext/bg/js/settings/main.js')

diff --git a/LICENSE b/LICENSE
index 266e6069..f8531a9f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -11,4 +11,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program.  If not, see .
+along with this program.  If not, see .
diff --git a/ext/bg/css/settings.css b/ext/bg/css/settings.css
index ee9d18a1..63cead6b 100644
--- a/ext/bg/css/settings.css
+++ b/ext/bg/css/settings.css
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/anki.js b/ext/bg/js/anki.js
index 48ed66bf..10a07061 100644
--- a/ext/bg/js/anki.js
+++ b/ext/bg/js/anki.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 8ad8d0bb..906aaa30 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js
index 0fc2148d..36ac413b 100644
--- a/ext/bg/js/audio.js
+++ b/ext/bg/js/audio.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/backend-api-forwarder.js b/ext/bg/js/backend-api-forwarder.js
index 0a387e08..170a6b32 100644
--- a/ext/bg/js/backend-api-forwarder.js
+++ b/ext/bg/js/backend-api-forwarder.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 2060f414..28b0201e 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/conditions.js b/ext/bg/js/conditions.js
index d3d0b465..d4d1c0e0 100644
--- a/ext/bg/js/conditions.js
+++ b/ext/bg/js/conditions.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/context.js b/ext/bg/js/context.js
index 84368256..834174bf 100644
--- a/ext/bg/js/context.js
+++ b/ext/bg/js/context.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index 9c44f240..42a143f3 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/deinflector.js b/ext/bg/js/deinflector.js
index 752a0959..33b2a8b3 100644
--- a/ext/bg/js/deinflector.js
+++ b/ext/bg/js/deinflector.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js
index 43971f8a..92adc532 100644
--- a/ext/bg/js/dictionary.js
+++ b/ext/bg/js/dictionary.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/handlebars.js b/ext/bg/js/handlebars.js
index 7e4b7b8d..6d1581be 100644
--- a/ext/bg/js/handlebars.js
+++ b/ext/bg/js/handlebars.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/json-schema.js b/ext/bg/js/json-schema.js
index d56f8ef9..5d596a8b 100644
--- a/ext/bg/js/json-schema.js
+++ b/ext/bg/js/json-schema.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/mecab.js b/ext/bg/js/mecab.js
index 33f9949e..8bcbb91c 100644
--- a/ext/bg/js/mecab.js
+++ b/ext/bg/js/mecab.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 63e7c023..8021672b 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/page-exit-prevention.js b/ext/bg/js/page-exit-prevention.js
index 4143a835..3a320db3 100644
--- a/ext/bg/js/page-exit-prevention.js
+++ b/ext/bg/js/page-exit-prevention.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/profile-conditions.js b/ext/bg/js/profile-conditions.js
index 20350f4b..1fd78e5d 100644
--- a/ext/bg/js/profile-conditions.js
+++ b/ext/bg/js/profile-conditions.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/request.js b/ext/bg/js/request.js
index 6d05f66e..b584c9a9 100644
--- a/ext/bg/js/request.js
+++ b/ext/bg/js/request.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-frontend.js
index 2cf7f5a7..2fe50a13 100644
--- a/ext/bg/js/search-frontend.js
+++ b/ext/bg/js/search-frontend.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/search-query-parser.js b/ext/bg/js/search-query-parser.js
index fec21d3b..0b3eccbd 100644
--- a/ext/bg/js/search-query-parser.js
+++ b/ext/bg/js/search-query-parser.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 439cde40..a4103ef2 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 class DisplaySearch extends Display {
diff --git a/ext/bg/js/settings/anki-templates.js b/ext/bg/js/settings/anki-templates.js
index 4644214b..5e74358f 100644
--- a/ext/bg/js/settings/anki-templates.js
+++ b/ext/bg/js/settings/anki-templates.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/anki.js b/ext/bg/js/settings/anki.js
index ccce16fe..5f7989b8 100644
--- a/ext/bg/js/settings/anki.js
+++ b/ext/bg/js/settings/anki.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/audio-ui.js b/ext/bg/js/settings/audio-ui.js
index dc968628..711c2291 100644
--- a/ext/bg/js/settings/audio-ui.js
+++ b/ext/bg/js/settings/audio-ui.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/audio.js b/ext/bg/js/settings/audio.js
index 5809375c..cff3f521 100644
--- a/ext/bg/js/settings/audio.js
+++ b/ext/bg/js/settings/audio.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/backup.js b/ext/bg/js/settings/backup.js
index 3a4d1fd2..becdc568 100644
--- a/ext/bg/js/settings/backup.js
+++ b/ext/bg/js/settings/backup.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/conditions-ui.js b/ext/bg/js/settings/conditions-ui.js
index a186a5be..4d041451 100644
--- a/ext/bg/js/settings/conditions-ui.js
+++ b/ext/bg/js/settings/conditions-ui.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js
index 330e935a..ed171ae9 100644
--- a/ext/bg/js/settings/dictionaries.js
+++ b/ext/bg/js/settings/dictionaries.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index 70650d8b..56828a15 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 function getOptionsMutable(optionsContext) {
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index 7be3466d..2b727cbd 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/popup-preview.js b/ext/bg/js/settings/popup-preview.js
index ba0c979d..0d20471e 100644
--- a/ext/bg/js/settings/popup-preview.js
+++ b/ext/bg/js/settings/popup-preview.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/settings/profiles.js b/ext/bg/js/settings/profiles.js
index 61fe9bff..c4e68b53 100644
--- a/ext/bg/js/settings/profiles.js
+++ b/ext/bg/js/settings/profiles.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 let currentProfileIndex = 0;
diff --git a/ext/bg/js/settings/storage.js b/ext/bg/js/settings/storage.js
index c040a041..6c10f665 100644
--- a/ext/bg/js/settings/storage.js
+++ b/ext/bg/js/settings/storage.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index d6f62fd8..7473c6ad 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 09c45c08..333e814b 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 function utilIsolate(value) {
diff --git a/ext/bg/legal.html b/ext/bg/legal.html
index 4c9029a0..c1e606d7 100644
--- a/ext/bg/legal.html
+++ b/ext/bg/legal.html
@@ -30,7 +30,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+along with this program.  If not, see <https://www.gnu.org/licenses/>.
 

EDRDG License

diff --git a/ext/fg/css/client.css b/ext/fg/css/client.css
index 6f52b676..b9c59da7 100644
--- a/ext/fg/css/client.css
+++ b/ext/fg/css/client.css
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js
index d6ef5f29..e068e3ba 100644
--- a/ext/fg/js/document.js
+++ b/ext/fg/js/document.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 302bcda1..513d246b 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/frontend-api-receiver.js b/ext/fg/js/frontend-api-receiver.js
index 72490f2c..642d96df 100644
--- a/ext/fg/js/frontend-api-receiver.js
+++ b/ext/fg/js/frontend-api-receiver.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/frontend-api-sender.js b/ext/fg/js/frontend-api-sender.js
index b90310d6..93c2e593 100644
--- a/ext/fg/js/frontend-api-sender.js
+++ b/ext/fg/js/frontend-api-sender.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/frontend-initialize.js b/ext/fg/js/frontend-initialize.js
index d819688f..9c923fea 100644
--- a/ext/fg/js/frontend-initialize.js
+++ b/ext/fg/js/frontend-initialize.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 0ddcecf1..034d9075 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/popup-nested.js b/ext/fg/js/popup-nested.js
index df619141..bacf3b93 100644
--- a/ext/fg/js/popup-nested.js
+++ b/ext/fg/js/popup-nested.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index 3cc8a132..c4f0c6ff 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index c29e9e55..ae0cffad 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 5d445dba..7a0c6133 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js
index cea6623d..5cdf47b5 100644
--- a/ext/fg/js/source.js
+++ b/ext/fg/js/source.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 // \u200c (Zero-width non-joiner) appears on Google Docs from Chrome 76 onwards
diff --git a/ext/mixed/css/display-dark.css b/ext/mixed/css/display-dark.css
index 236f36c4..e26c72aa 100644
--- a/ext/mixed/css/display-dark.css
+++ b/ext/mixed/css/display-dark.css
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/css/display-default.css b/ext/mixed/css/display-default.css
index b563d831..ac237e79 100644
--- a/ext/mixed/css/display-default.css
+++ b/ext/mixed/css/display-default.css
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css
index 5a7cbf5d..7a00bccb 100644
--- a/ext/mixed/css/display.css
+++ b/ext/mixed/css/display.css
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js
index c801baa3..8ed1d996 100644
--- a/ext/mixed/js/api.js
+++ b/ext/mixed/js/api.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/audio.js b/ext/mixed/js/audio.js
index d9a72a12..b0c5fa82 100644
--- a/ext/mixed/js/audio.js
+++ b/ext/mixed/js/audio.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 9e2b419e..54e8a9d2 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/display-context.js b/ext/mixed/js/display-context.js
index 45c2a823..c11c2342 100644
--- a/ext/mixed/js/display-context.js
+++ b/ext/mixed/js/display-context.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 513d2596..e756f948 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/dom.js b/ext/mixed/js/dom.js
index 87448b89..807a48e1 100644
--- a/ext/mixed/js/dom.js
+++ b/ext/mixed/js/dom.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js
index b046019c..23b2bd36 100644
--- a/ext/mixed/js/japanese.js
+++ b/ext/mixed/js/japanese.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/scroll.js b/ext/mixed/js/scroll.js
index 869f0945..5829d294 100644
--- a/ext/mixed/js/scroll.js
+++ b/ext/mixed/js/scroll.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index 455c756f..a05dd2ee 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
diff --git a/ext/mixed/js/timer.js b/ext/mixed/js/timer.js
index bfa2e087..1caf7a05 100644
--- a/ext/mixed/js/timer.js
+++ b/ext/mixed/js/timer.js
@@ -13,7 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see .
+ * along with this program.  If not, see .
  */
 
 
-- 
cgit v1.2.3