web solved :3

This commit is contained in:
Wrosoly 2025-01-19 19:10:47 +01:00
parent 76902192ac
commit a624e016aa
4 changed files with 46 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
bin/*

19
manifest.json Normal file
View 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"
}
}

View File

@ -1,3 +1,2 @@
# reFilc - web extension
szia kréta kréta vagyok
szia

25
serviceWorker.js Normal file
View 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
}
}