Skip to content

Commit

Permalink
Restore GhostText again (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Jul 20, 2022
1 parent 6dc438d commit a3ac72d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"build": "parcel build source/manifest.json --dist-dir distribution --no-cache --no-content-hash --no-source-maps --detailed-report 0",
"build": "parcel build source/manifest.json --dist-dir distribution --no-cache",
"lint": "xo",
"pack:safari": "xcodebuild -project 'safari/GhostText.xcodeproj'",
"prepare:safari": "bash safari/prepare-release.sh",
Expand Down Expand Up @@ -48,5 +48,9 @@
"https://ghosttext.fregante.com/test/"
]
}
},
"@parcel/bundler-default-bug": "https://github.com/parcel-bundler/parcel/issues/8071",
"@parcel/bundler-default": {
"minBundles": 10000000
}
}
8 changes: 1 addition & 7 deletions source/background.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import browser from 'webextension-polyfill';
import oneEvent from 'one-event';
import OptionsSync from 'webext-options-sync';

const optionsStorage = new OptionsSync({
defaults: {
serverPort: 4001,
},
});
import optionsStorage from './options-storage.js';

function inCurrentTab(callback) {
chrome.tabs.query({
Expand Down
9 changes: 9 additions & 0 deletions source/options-storage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import OptionsSync from 'webext-options-sync';

const optionsStorage = new OptionsSync({
defaults: {
serverPort: 4001,
},
});

export default optionsStorage;
4 changes: 2 additions & 2 deletions source/options.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import OptionsSync from 'webext-options-sync';
import optionsStorage from './options-storage.js';

new OptionsSync().syncForm(document.querySelector('form'));
optionsStorage.syncForm(document.querySelector('form'));

0 comments on commit a3ac72d

Please sign in to comment.