Skip to content

Commit

Permalink
Fix URLs and host permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaScorpion committed Jun 18, 2024
1 parent 36e2c5b commit fae02c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"webRequest"
],
"host_permissions": [
"*://app.timechimp.com/*"
"*://*.timechimp.com/*"
],
"content_scripts": [
{
Expand Down Expand Up @@ -35,4 +35,3 @@
}
}
}

2 changes: 1 addition & 1 deletion src/TimeChimpApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export class TimeChimpApi {
private async doFetch<T>(path: string): Promise<T> {
const url = `https://app.timechimp.com${path}`;
const url = `https://web.timechimp.com${path}`;
const response = await fetch(url);
const body = await response.text();

Expand Down
8 changes: 4 additions & 4 deletions src/background/timechimp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ chrome.webRequest.onCompleted.addListener(
},
{
// Limit to requests that indicate a week change
urls: ['https://app.timechimp.com/api/time/week/*'],
urls: ['https://web.timechimp.com/api/time/week/*'],
},
);

Expand All @@ -31,9 +31,9 @@ chrome.webRequest.onCompleted.addListener(
(request) => sendMessage(request.tabId, { type: 'refresh' }),
{
urls: [
'https://app.timechimp.com/api/time',
'https://app.timechimp.com/api/time/put',
'https://app.timechimp.com/api/time/delete?*',
'https://web.timechimp.com/api/time',
'https://web.timechimp.com/api/time/put',
'https://web.timechimp.com/api/time/delete?*',
],
},
);
Expand Down

0 comments on commit fae02c6

Please sign in to comment.