-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Imroved Settings page, Updated content.js coupons auto-apply. #106
base: main
Are you sure you want to change the base?
Conversation
Deployment failed with the following error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have a look at the rest later.
fetch( | ||
"https://api.discountdb.ch/api/v1/syrup/coupons?domain=" + | ||
request.domain | ||
) | ||
let database = ""; | ||
try { | ||
if (localStorage.getItem("database") === null) { | ||
database = "https://api.discountdb.ch/api/v1/syrup/coupons"; | ||
} else { | ||
database = localStorage.getItem("database"); | ||
} | ||
} catch (e) { | ||
database = "https://api.discountdb.ch/api/v1/syrup/coupons"; | ||
} | ||
fetch(database + "?domain=" + request.domain) | ||
.then((response) => response.json()) | ||
.then((data) => { | ||
sendResponse({ coupons: data }); | ||
chrome.storage.local.set({ coupons: data }, () => { | ||
if (chrome.runtime.lastError) { | ||
console.error("Error setting coupons:", chrome.runtime.lastError); | ||
sendResponse({ coupons: [] }); | ||
} else { | ||
sendResponse({ coupons: data }); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the types/classes/functions from the sas client. I know you said thats not possible but as of a quick search it should be. Though i didnt try yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot import anything in content.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried manually setting the language to several different options. Previously, I didn't have much time, so I couldn't run detailed tests, but I encountered a error I also tried the same approach with the code from the main branch, but I encountered the same error. EDIT: it's trying to load |
No description provided.