web solved :3
This commit is contained in:
parent
76902192ac
commit
a624e016aa
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bin/*
|
19
manifest.json
Normal file
19
manifest.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "reFilc.hu",
|
||||
"version": "1.0",
|
||||
"description": ":3",
|
||||
"permissions": [
|
||||
"scripting",
|
||||
"activeTab",
|
||||
"tabs",
|
||||
"cookies",
|
||||
"storage"
|
||||
],
|
||||
"host_permissions": [
|
||||
"https://*.e-kreta.hu/*"
|
||||
],
|
||||
"background": {
|
||||
"service_worker": "serviceWorker.js"
|
||||
}
|
||||
}
|
25
serviceWorker.js
Normal file
25
serviceWorker.js
Normal file
@ -0,0 +1,25 @@
|
||||
const getCookies = async (url) => {
|
||||
await new Promise((resolve, reject) => {
|
||||
chrome.cookies.getAll({ url: url }, (cookies) => {
|
||||
if (chrome.runtime.lastError) {
|
||||
return reject(chrome.runtime.lastError)
|
||||
}
|
||||
resolve(cookies)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const sendMimicedRequest = async (
|
||||
url,
|
||||
headers,
|
||||
) => {
|
||||
let returnValue
|
||||
|
||||
if (url) {
|
||||
returnValue = fetch(url, headers)
|
||||
}
|
||||
|
||||
if (returnValue) {
|
||||
return returnValue
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user