diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-10-08 18:47:24 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-10-08 18:47:24 -0700 |
commit | da0cb81801ac897fa41761af0b0b18fda9d16195 (patch) | |
tree | 992bea48155ab01fee5436be84ab8605634c16c4 /ext/fg | |
parent | 78fad1da18694d2471c0a68399d69b0fe94e2b2d (diff) |
Allow bootstrap in popup templates
Diffstat (limited to 'ext/fg')
-rw-r--r-- | ext/fg/js/driver.js | 8 |
1 files changed, 4 insertions, 4 deletions
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']); |