Compare commits
2 commits
e626ff5eae
...
4fdf0f99b1
Author | SHA1 | Date | |
---|---|---|---|
4fdf0f99b1 | |||
d2811c55df |
4 changed files with 7 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "aci",
|
||||
"version": "0.2.1",
|
||||
"version": "0.3.0",
|
||||
"description": "auto checkin",
|
||||
"content_scripts":[
|
||||
{
|
||||
|
|
|
@ -51,6 +51,7 @@ function interceptSubmit(details) {
|
|||
method: 'POST',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'user-agent': 'Mozilla/5.0 (compatible) aci-extension/1.0 (+https://git.ashhhleyyy.dev/ash/aci)',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
code: activity.code,
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
this.SERVER_URL = 'https://aci-api.ashhhleyyy.dev';
|
||||
//this.SERVER_URL = 'http://localhost:8000';
|
||||
this.USER_AGENT = 'Mozilla/5.0 (compatible) aci-extension/1.0 (+https://git.ashhhleyyy.dev/ash/aci)'
|
||||
|
|
|
@ -113,7 +113,7 @@ chrome.storage.sync.get([
|
|||
if (window.location.hash.length >= 2) {
|
||||
const query = window.location.hash.substring(1);
|
||||
const queryParams = new URLSearchParams(query);
|
||||
const res = await fetch(SERVER_URL + '/api/codes/query?' + query).catch((e) => {
|
||||
const res = await fetch(SERVER_URL + '/api/codes/query?' + query, { headers: { 'user-agent': USER_AGENT } }).catch((e) => {
|
||||
message(`Something went wrong: ${e}`);
|
||||
console.error(e);
|
||||
});
|
||||
|
@ -125,7 +125,7 @@ chrome.storage.sync.get([
|
|||
const activity = await res.json();
|
||||
|
||||
if (config.enable_reject) {
|
||||
const rejectRes = await fetch(SERVER_URL + '/3p-proxy/reject?' + query).catch((e) => {
|
||||
const rejectRes = await fetch(SERVER_URL + '/3p-proxy/reject?' + query, { headers: { 'user-agent': USER_AGENT } }).catch((e) => {
|
||||
message(`Something went wrong: ${e}`);
|
||||
console.error(e);
|
||||
});
|
||||
|
@ -138,7 +138,7 @@ chrome.storage.sync.get([
|
|||
}
|
||||
|
||||
if (config.enable_shrine) {
|
||||
const shrineRes = await fetch(SERVER_URL + '/3p-proxy/shrine-checkout?' + query).catch((e) => {
|
||||
const shrineRes = await fetch(SERVER_URL + '/3p-proxy/shrine-checkout?' + query, { headers: { 'user-agent': USER_AGENT } }).catch((e) => {
|
||||
message(`Something went wrong: ${e}`);
|
||||
console.error(e);
|
||||
});
|
||||
|
@ -162,7 +162,7 @@ chrome.storage.sync.get([
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const res = await fetch(SERVER_URL + '/api/codes').catch((e) => {
|
||||
const res = await fetch(SERVER_URL + '/api/codes', { headers: { 'user-agent': USER_AGENT } }).catch((e) => {
|
||||
message(`Something went wrong: ${e}`);
|
||||
console.error(e);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue