diff options
| author | Alex Yatskov <alex@foosoft.net> | 2017-03-04 19:42:30 -0800 | 
|---|---|---|
| committer | Alex Yatskov <alex@foosoft.net> | 2017-03-04 19:42:30 -0800 | 
| commit | 7269583547cb379a413496946abce145703b2b8a (patch) | |
| tree | f8cb49b646f6c5faa8008981311e1dd61812d610 | |
| parent | 158818713a59509344b0916e6dcfb44cb5042dbd (diff) | |
polish
| -rw-r--r-- | ext/bg/js/options.js | 1 | ||||
| -rw-r--r-- | ext/bg/js/popup.js | 2 | ||||
| -rw-r--r-- | ext/fg/js/display-frame.js | 2 | ||||
| -rw-r--r-- | ext/fg/js/driver.js | 8 | ||||
| -rw-r--r-- | ext/fg/js/util.js | 9 | 
5 files changed, 6 insertions, 16 deletions
| diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 84ecc6e3..eb8e32d8 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -234,6 +234,7 @@ function onDictionaryUpdateUrl() {      $('#dict-import').prop('disabled', $(this).val().length === 0);  } +  /*   * Anki   */ diff --git a/ext/bg/js/popup.js b/ext/bg/js/popup.js index 37a76832..9f2567df 100644 --- a/ext/bg/js/popup.js +++ b/ext/bg/js/popup.js @@ -18,7 +18,7 @@  $(document).ready(() => { -    $('#open-search').click(() => window.open(chrome.extension.getURL('bg/search.html'))); +    $('#open-search').click(() => window.open(chrome.extension.getURL('/bg/search.html')));      $('#open-options').click(() => chrome.runtime.openOptionsPage());      $('#open-help').click(() => window.open('http://foosoft.net/projects/yomichan')); diff --git a/ext/fg/js/display-frame.js b/ext/fg/js/display-frame.js index aeb4ede5..bd070b63 100644 --- a/ext/fg/js/display-frame.js +++ b/ext/fg/js/display-frame.js @@ -43,7 +43,7 @@ window.displayFrame = new class extends Display {          if (window.orphaned) {              this.showOrphaned();          } else { -            errorShow(error); +            window.alert(`Error: ${error}`);          }      } diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js index 2cbe3e08..a74c1507 100644 --- a/ext/fg/js/driver.js +++ b/ext/fg/js/driver.js @@ -17,7 +17,7 @@   */ -class Driver { +window.driver = new class {      constructor() {          this.popup = new Popup();          this.popupTimer = null; @@ -208,9 +208,7 @@ class Driver {                  this.popup.showOrphaned();              }          } else { -            errorShow(error); +            window.alert(`Error: ${error}`);          }      } -} - -window.driver = new Driver(); +}; diff --git a/ext/fg/js/util.js b/ext/fg/js/util.js index f0760462..ac6ee428 100644 --- a/ext/fg/js/util.js +++ b/ext/fg/js/util.js @@ -206,12 +206,3 @@ function docSentenceExtract(source, extent) {      return content.substring(startPos, endPos).trim();  } - - -/* - * Error - */ - -function errorShow(error) { -    window.alert(`Error: ${error}`); -} |