From d8935b6aa96ef54263bda439c9ebcc4418b0503f Mon Sep 17 00:00:00 2001 From: siikamiika Date: Wed, 4 Dec 2019 21:49:51 +0200 Subject: fix serialization errors on Chrome --- ext/mixed/js/display.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext') diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index c32852ad..7d5e4e7d 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -354,8 +354,8 @@ class Display { const sequence = ++this.sequence; const params = { definitions, - source: this.context.previous, - next: this.context.next, + source: !!this.context.previous, + next: !!this.context.next, addable: options.anki.enable, grouped: options.general.resultOutputMode === 'group', merged: options.general.resultOutputMode === 'merge', @@ -415,8 +415,8 @@ class Display { const sequence = ++this.sequence; const params = { definitions, - source: this.context.previous, - next: this.context.next, + source: !!this.context.previous, + next: !!this.context.next, addable: options.anki.enable, debug: options.general.debugInfo }; -- cgit v1.2.3 From 248b0f15eb7d0fd10d3678a2e5d2f6ddb631309f Mon Sep 17 00:00:00 2001 From: siikamiika Date: Wed, 4 Dec 2019 23:19:19 +0200 Subject: remove references to /fg/js/util.js It doesn't exist --- ext/bg/search.html | 1 - ext/fg/float.html | 1 - 2 files changed, 2 deletions(-) (limited to 'ext') diff --git a/ext/bg/search.html b/ext/bg/search.html index fef30456..58bb9ba8 100644 --- a/ext/bg/search.html +++ b/ext/bg/search.html @@ -69,7 +69,6 @@ - diff --git a/ext/fg/float.html b/ext/fg/float.html index 8cc5a129..67ee50b4 100644 --- a/ext/fg/float.html +++ b/ext/fg/float.html @@ -35,7 +35,6 @@ - -- cgit v1.2.3 From 14c5857dfe58eb14599438f8cfb8d436d38e2006 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Fri, 6 Dec 2019 00:40:41 +0200 Subject: set title text on search page --- ext/bg/js/search.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ext') diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 00b7ca4b..fe48773f 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -224,6 +224,7 @@ class DisplaySearch extends Display { sentence: {text: query, offset: 0}, url: window.location.href }); + this.setTitleText(query); } else { this.container.textContent = ''; } @@ -356,6 +357,14 @@ class DisplaySearch extends Display { this.search.disabled = this.introVisible && (this.query === null || this.query.value.length === 0); } + setTitleText(text) { + // Chrome limits title to 1024 characters + if (text.length > 1000) { + text = text.slice(0, 1000) + '...'; + } + document.title = `${text} - Yomichan Search`; + } + static getSearchQueryFromLocation(url) { const match = /^[^?#]*\?(?:[^&#]*&)?query=([^&#]*)/.exec(url); return match !== null ? decodeURIComponent(match[1]) : null; -- cgit v1.2.3 From 63f3e94bb18182afff694481899e5961cf505fdb Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Thu, 5 Dec 2019 18:24:54 -0800 Subject: version bump --- ext/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/manifest.json b/ext/manifest.json index 9a9d6639..52bced23 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Yomichan", - "version": "2.0.0", + "version": "2.0.1", "description": "Japanese dictionary with Anki integration", "icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"}, -- cgit v1.2.3