Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore GhostText again #229

Merged
merged 2 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix parcel build
  • Loading branch information
fregante committed Jul 20, 2022
commit 8bcfa16f83a01c1e124c7355426ccb6c2b9bc5da
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@
"https://ghosttext.fregante.com/test/"
]
}
},
"@parcel/bundler-default": {
"minBundles": 10000000,
"minBundleSize": 3000,
"maxParallelRequests": 20
}
}
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'));