This commit is contained in:
Alex Yatskov 2017-03-04 19:42:30 -08:00
parent 158818713a
commit 7269583547
5 changed files with 6 additions and 16 deletions

View File

@ -234,6 +234,7 @@ function onDictionaryUpdateUrl() {
$('#dict-import').prop('disabled', $(this).val().length === 0);
}
/*
* Anki
*/

View File

@ -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'));

View File

@ -43,7 +43,7 @@ window.displayFrame = new class extends Display {
if (window.orphaned) {
this.showOrphaned();
} else {
errorShow(error);
window.alert(`Error: ${error}`);
}
}

View File

@ -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();
};

View File

@ -206,12 +206,3 @@ function docSentenceExtract(source, extent) {
return content.substring(startPos, endPos).trim();
}
/*
* Error
*/
function errorShow(error) {
window.alert(`Error: ${error}`);
}