chore: allow custom hosts to send extentions requests (#222)
This commit is contained in:
committed by
GitHub
parent
0fba9fdec5
commit
f3c1f10ffe
@@ -95,7 +95,6 @@ export default function Options(): JSX.Element {
|
|||||||
setState({ ...state, loading: true });
|
setState({ ...state, loading: true });
|
||||||
|
|
||||||
const apiKey = state.apiKey;
|
const apiKey = state.apiKey;
|
||||||
const apiUrl = state.apiUrl;
|
|
||||||
const theme = state.theme;
|
const theme = state.theme;
|
||||||
const hostname = state.hostname;
|
const hostname = state.hostname;
|
||||||
const loggingType = state.loggingType;
|
const loggingType = state.loggingType;
|
||||||
@@ -105,6 +104,11 @@ export default function Options(): JSX.Element {
|
|||||||
// Trimming blacklist and whitelist removes blank lines and spaces.
|
// Trimming blacklist and whitelist removes blank lines and spaces.
|
||||||
const blacklist = state.blacklist.trim();
|
const blacklist = state.blacklist.trim();
|
||||||
const whitelist = state.whitelist.trim();
|
const whitelist = state.whitelist.trim();
|
||||||
|
let apiUrl = state.apiUrl;
|
||||||
|
|
||||||
|
if (apiUrl.endsWith('/')) {
|
||||||
|
apiUrl = apiUrl.slice(0, -1);
|
||||||
|
}
|
||||||
|
|
||||||
// Sync options with google storage.
|
// Sync options with google storage.
|
||||||
await browser.storage.sync.set({
|
await browser.storage.sync.set({
|
||||||
|
|||||||
@@ -33,5 +33,5 @@
|
|||||||
"page": "options.html"
|
"page": "options.html"
|
||||||
},
|
},
|
||||||
"permissions": ["alarms", "tabs", "storage", "idle"],
|
"permissions": ["alarms", "tabs", "storage", "idle"],
|
||||||
"version": "3.0.16"
|
"version": "3.0.17"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,13 +38,6 @@
|
|||||||
"chrome_style": false,
|
"chrome_style": false,
|
||||||
"page": "options.html"
|
"page": "options.html"
|
||||||
},
|
},
|
||||||
"permissions": [
|
"permissions": ["<all_urls>", "alarms", "tabs", "storage", "idle"],
|
||||||
"https://api.wakatime.com/*",
|
"version": "3.0.17"
|
||||||
"https://wakatime.com/*",
|
|
||||||
"alarms",
|
|
||||||
"tabs",
|
|
||||||
"storage",
|
|
||||||
"idle"
|
|
||||||
],
|
|
||||||
"version": "3.0.16"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user