From e799aa5e5f7dd526214b8e55de86f525cefec3ee Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 4 Mar 2017 19:53:28 -0800 Subject: 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 | Bin 0 -> 733 bytes ext/mixed/img/add-term-kana.png | Bin 0 -> 286 bytes ext/mixed/img/add-term-kanji.png | Bin 0 -> 733 bytes ext/mixed/img/add_kanji.png | Bin 733 -> 0 bytes ext/mixed/img/add_term_kana.png | Bin 286 -> 0 bytes ext/mixed/img/add_term_kanji.png | Bin 733 -> 0 bytes ext/mixed/img/play-audio.png | Bin 0 -> 610 bytes ext/mixed/img/play_audio.png | Bin 610 -> 0 bytes ext/mixed/js/display.js | 2 +- tmpl/terms.html | 6 +++--- 16 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 ext/mixed/img/add-kanji.png create mode 100644 ext/mixed/img/add-term-kana.png create mode 100644 ext/mixed/img/add-term-kanji.png delete mode 100644 ext/mixed/img/add_kanji.png delete mode 100644 ext/mixed/img/add_term_kana.png delete mode 100644 ext/mixed/img/add_term_kanji.png create mode 100644 ext/mixed/img/play-audio.png delete mode 100644 ext/mixed/img/play_audio.png 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 new file mode 100644 index 00000000..6332fefe Binary files /dev/null and b/ext/mixed/img/add-kanji.png differ diff --git a/ext/mixed/img/add-term-kana.png b/ext/mixed/img/add-term-kana.png new file mode 100644 index 00000000..41ff8335 Binary files /dev/null and b/ext/mixed/img/add-term-kana.png differ diff --git a/ext/mixed/img/add-term-kanji.png b/ext/mixed/img/add-term-kanji.png new file mode 100644 index 00000000..6332fefe Binary files /dev/null and b/ext/mixed/img/add-term-kanji.png differ diff --git a/ext/mixed/img/add_kanji.png b/ext/mixed/img/add_kanji.png deleted file mode 100644 index 6332fefe..00000000 Binary files a/ext/mixed/img/add_kanji.png and /dev/null differ diff --git a/ext/mixed/img/add_term_kana.png b/ext/mixed/img/add_term_kana.png deleted file mode 100644 index 41ff8335..00000000 Binary files a/ext/mixed/img/add_term_kana.png and /dev/null differ diff --git a/ext/mixed/img/add_term_kanji.png b/ext/mixed/img/add_term_kanji.png deleted file mode 100644 index 6332fefe..00000000 Binary files a/ext/mixed/img/add_term_kanji.png and /dev/null differ diff --git a/ext/mixed/img/play-audio.png b/ext/mixed/img/play-audio.png new file mode 100644 index 00000000..6056d234 Binary files /dev/null and b/ext/mixed/img/play-audio.png differ diff --git a/ext/mixed/img/play_audio.png b/ext/mixed/img/play_audio.png deleted file mode 100644 index 6056d234..00000000 Binary files a/ext/mixed/img/play_audio.png and /dev/null differ 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}}
-- cgit v1.2.3