diff --git a/src/components/Options.tsx b/src/components/Options.tsx index 28bda64b..ec3c0312 100644 --- a/src/components/Options.tsx +++ b/src/components/Options.tsx @@ -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; @@ -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({ diff --git a/src/manifests/chrome.json b/src/manifests/chrome.json index 28adfec2..3d7d131b 100644 --- a/src/manifests/chrome.json +++ b/src/manifests/chrome.json @@ -33,5 +33,5 @@ "page": "options.html" }, "permissions": ["alarms", "tabs", "storage", "idle"], - "version": "3.0.16" + "version": "3.0.17" } diff --git a/src/manifests/firefox.json b/src/manifests/firefox.json index 45002a60..f3170357 100644 --- a/src/manifests/firefox.json +++ b/src/manifests/firefox.json @@ -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": ["", "alarms", "tabs", "storage", "idle"], + "version": "3.0.17" }