Skip to content

Commit

Permalink
Create chromeify.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzocaputo authored Dec 8, 2024
1 parent 262cc45 commit 037259b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/chromeify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# Replace API namespace
find src -name "*.js" -exec sed -i 's/browser\./chrome./g' {} \;

# Add imports to service workers
sed -i "1s|^|importScripts('./utils/jsonLoader.js');\nimportScripts('./utils/storage.js');\nimportScripts('./utils/indicatorparser.js');\nimportScripts('./utils/graph.js');\n\n|" src/background.js

# Replace browserAction
find src/ -name "*.js" -exec sed -i 's/chrome\.browserAction\./chrome.action./g' {} \;

0 comments on commit 037259b

Please sign in to comment.