Skip to content

Commit

Permalink
Fix build-popup.js
Browse files Browse the repository at this point in the history
Change npm build to run grunt build.
  • Loading branch information
fwextensions committed Mar 28, 2021
1 parent 41e18c6 commit e6efa20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions build/scripts/build-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ if (!match) {
return "error";
}

// create a fake navigator global, which init and shortcut-manager can check
// create a fake navigator global, which init, shortcut-manager and constants
// can check
navigator = {
platform: "windows"
platform: "windows",
languages: ["en-US"],
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
};

// we have to wrap the bare object in parens to eval it
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"build:popup": "node build/scripts/build-popup.js",
"build:pinyin": "webpack",
"build": "npm run build:popup && npm run build:pinyin"
"build": "grunt build"
},
"devDependencies": {
"@babel/core": "^7.4.3",
Expand Down

0 comments on commit e6efa20

Please sign in to comment.