From e799aa5e5f7dd526214b8e55de86f525cefec3ee Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 4 Mar 2017 19:53:28 -0800 Subject: [PATCH] cleanup --- ext/bg/js/templates.js | 8 ++++---- ext/bg/js/translator.js | 2 +- ext/bg/js/util.js | 4 ++-- ext/bg/js/yomichan.js | 2 +- ext/fg/js/popup.js | 2 +- ext/manifest.json | 8 ++++---- ext/mixed/img/{add_kanji.png => add-kanji.png} | Bin .../img/{add_term_kana.png => add-term-kana.png} | Bin .../img/{add_term_kanji.png => add-term-kanji.png} | Bin ext/mixed/img/{play_audio.png => play-audio.png} | Bin ext/mixed/js/display.js | 2 +- tmpl/terms.html | 6 +++--- 12 files changed, 17 insertions(+), 17 deletions(-) rename ext/mixed/img/{add_kanji.png => add-kanji.png} (100%) rename ext/mixed/img/{add_term_kana.png => add-term-kana.png} (100%) rename ext/mixed/img/{add_term_kanji.png => add-term-kanji.png} (100%) rename ext/mixed/img/{play_audio.png => play-audio.png} (100%) diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index 0fa41b36..8c8f4204 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -457,17 +457,17 @@ templates['terms.html'] = template({"1":function(container,depth0,helpers,partia },"13":function(container,depth0,helpers,partials,data) { var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - return " \n \n \n"; + + "\">\n"; },"15":function(container,depth0,helpers,partials,data) { var helper; return " \n"; + + "\">\n"; },"17":function(container,depth0,helpers,partials,data) { var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", buffer = "
"; diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index 967b8bfe..67430aef 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -31,7 +31,7 @@ class Translator { } const promises = [ - jsonLoadInt('bg/lang/deinflect.json'), + jsonLoadInt('/bg/lang/deinflect.json'), this.database.prepare() ]; diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index d91415f7..814a27f6 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -388,8 +388,8 @@ function dictFieldFormat(field, definition, mode, options) { definition, group: options.general.groupResults, html: options.anki.htmlCards, - modeTermKanji: mode === 'term_kanji', - modeTermKana: mode === 'term_kana', + modeTermKanji: mode === 'term-kanji', + modeTermKana: mode === 'term-kana', modeKanji: mode === 'kanji' }; diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index 82a06146..a61be8be 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -149,7 +149,7 @@ window.yomichan = new class { onInstalled(details) { if (details.reason === 'install') { - chrome.tabs.create({url: chrome.extension.getURL('bg/guide.html')}); + chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')}); } } diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index a9e27f49..12a6df13 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -25,7 +25,7 @@ class Popup { this.container.id = 'yomichan-popup'; this.container.addEventListener('mousedown', e => e.stopPropagation()); this.container.addEventListener('scroll', e => e.stopPropagation()); - this.container.setAttribute('src', chrome.extension.getURL('fg/frame.html')); + this.container.setAttribute('src', chrome.extension.getURL('/fg/frame.html')); document.body.appendChild(this.container); } diff --git a/ext/manifest.json b/ext/manifest.json index 0c62b49d..d7dd5f9d 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -35,10 +35,10 @@ "fg/frame.html", "fg/js/frame.js", "mixed/css/frame.css", - "mixed/img/add_kanji.png", - "mixed/img/add_term_kana.png", - "mixed/img/add_term_kanji.png", - "mixed/img/play_audio.png", + "mixed/img/add-kanji.png", + "mixed/img/add-term-kana.png", + "mixed/img/add-term-kanji.png", + "mixed/img/play-audio.png", "mixed/img/spinner.gif", "mixed/mp3/button.mp3", "mixed/ttf/kanji-stroke-orders.ttf", diff --git a/ext/mixed/img/add_kanji.png b/ext/mixed/img/add-kanji.png similarity index 100% rename from ext/mixed/img/add_kanji.png rename to ext/mixed/img/add-kanji.png diff --git a/ext/mixed/img/add_term_kana.png b/ext/mixed/img/add-term-kana.png similarity index 100% rename from ext/mixed/img/add_term_kana.png rename to ext/mixed/img/add-term-kana.png diff --git a/ext/mixed/img/add_term_kanji.png b/ext/mixed/img/add-term-kanji.png similarity index 100% rename from ext/mixed/img/add_term_kanji.png rename to ext/mixed/img/add-term-kanji.png diff --git a/ext/mixed/img/play_audio.png b/ext/mixed/img/play-audio.png similarity index 100% rename from ext/mixed/img/play_audio.png rename to ext/mixed/img/play-audio.png diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 860a3e43..f9467573 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -76,7 +76,7 @@ class Display { }).catch(this.handleError.bind(this)); }); - return this.adderButtonsUpdate(['term_kanji', 'term_kana'], sequence); + return this.adderButtonsUpdate(['term-kanji', 'term-kana'], sequence); }).catch(this.handleError.bind(this)); } diff --git a/tmpl/terms.html b/tmpl/terms.html index 923eb14f..04ba713d 100644 --- a/tmpl/terms.html +++ b/tmpl/terms.html @@ -21,11 +21,11 @@

{{#if addable}} - - + + {{/if}} {{#if playback}} - + {{/if}}