Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Inline the source text not the binary encoding for inpage script (Met…
Browse files Browse the repository at this point in the history
  • Loading branch information
danfinlay authored and yqrashawn committed Feb 17, 2020
1 parent 47f3e4a commit 8991a2c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/scripts/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ import PortStream from 'extension-port-stream'
const fs = require('fs')
const path = require('path')

const inpageContent = fs
.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'inpage.js'))
.toString()
const inpageSuffix =
'//# sourceURL=' + extension.runtime.getURL('inpage.js') + '\n'
const inpageContent = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'inpage.js'), 'utf8')
const inpageSuffix = '//# sourceURL=' + extension.runtime.getURL('inpage.js') + '\n'
const inpageBundle = inpageContent + inpageSuffix

// Eventually this streaming injection could be replaced with:
Expand Down

0 comments on commit 8991a2c

Please sign in to comment.