From da0cb81801ac897fa41761af0b0b18fda9d16195 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 8 Oct 2016 18:47:24 -0700 Subject: Allow bootstrap in popup templates --- ext/fg/js/driver.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/fg') diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js index 1e817c1c..79a3eb9f 100644 --- a/ext/fg/js/driver.js +++ b/ext/fg/js/driver.js @@ -29,7 +29,7 @@ class Driver { this.options = null; this.definitions = null; this.sequence = 0; - this.fgRoot = chrome.extension.getURL('fg'); + this.extRoot = chrome.extension.getURL('.'); chrome.runtime.onMessage.addListener(this.onBgMessage.bind(this)); window.addEventListener('message', this.onFrameMessage.bind(this)); @@ -139,7 +139,7 @@ class Driver { }); const sequence = ++this.sequence; - return renderText({definitions, sequence, root: this.fgRoot, options: this.options}, 'term-list.html').then(content => { + return renderText({definitions, sequence, root: this.extRoot, options: this.options}, 'term-list.html').then(content => { this.definitions = definitions; this.pendingLookup = false; this.showPopup(textSource, content); @@ -167,7 +167,7 @@ class Driver { definitions.forEach(definition => definition.url = window.location.href); const sequence = ++this.sequence; - return renderText({definitions, sequence, root: this.fgRoot, options: this.options}, 'kanji-list.html').then(content => { + return renderText({definitions, sequence, root: this.extRoot, options: this.options}, 'kanji-list.html').then(content => { this.definitions = definitions; this.pendingLookup = false; this.showPopup(textSource, content); @@ -278,7 +278,7 @@ class Driver { definitions.forEach(definition => definition.url = window.location.href); const sequence = ++this.sequence; - return renderText({definitions, sequence, root: this.fgRoot, options: this.options}, 'kanji-list.html').then(content => { + return renderText({definitions, sequence, root: this.extRoot, options: this.options}, 'kanji-list.html').then(content => { this.definitions = definitions; this.popup.setContent(content, definitions); return canAddDefinitions(definitions, ['kanji']); -- cgit v1.2.3