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

chore: allow custom hosts to send extentions requests #222

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion src/components/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export default function Options(): JSX.Element {
setState({ ...state, loading: true });

const apiKey = state.apiKey;
const apiUrl = state.apiUrl;
const theme = state.theme;
const hostname = state.hostname;
const loggingType = state.loggingType;
Expand All @@ -105,6 +104,11 @@ export default function Options(): JSX.Element {
// Trimming blacklist and whitelist removes blank lines and spaces.
const blacklist = state.blacklist.trim();
const whitelist = state.whitelist.trim();
let apiUrl = state.apiUrl;

if (apiUrl.endsWith('/')) {
apiUrl = apiUrl.slice(0, -1);
}

// Sync options with google storage.
await browser.storage.sync.set({
Expand Down
2 changes: 1 addition & 1 deletion src/manifests/chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"page": "options.html"
},
"permissions": ["alarms", "tabs", "storage", "idle"],
"version": "3.0.16"
"version": "3.0.17"
}
11 changes: 2 additions & 9 deletions src/manifests/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
"chrome_style": false,
"page": "options.html"
},
"permissions": [
"https://api.wakatime.com/*",
"https://wakatime.com/*",
"alarms",
"tabs",
"storage",
"idle"
],
"version": "3.0.16"
"permissions": ["<all_urls>", "alarms", "tabs", "storage", "idle"],
"version": "3.0.17"
}