-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from ufabc-next/chore/replace-gulp
Remover gulp
- Loading branch information
Showing
51 changed files
with
1,800 additions
and
16,963 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ npm-debug.log | |
|
||
dist/ | ||
packages/ | ||
extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.13.2 | ||
v20.10.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import pkg from "../package.json" with { type: "json" }; | ||
|
||
const isDev = process.env.NODE_ENV !== "prod"; | ||
|
||
export async function getManifest() { | ||
// update this file to update this manifest.json | ||
|
||
const manifest = { | ||
manifest_version: 3, | ||
name: pkg.displayName || pkg.name, | ||
version: pkg.version, | ||
description: pkg.description, | ||
icons: { | ||
16: "./assets/icon-16.png", | ||
128: "./assets/icon-128.png", | ||
}, | ||
background: { | ||
service_worker: "background.js", | ||
}, | ||
permissions: ["storage"], | ||
host_permissions: [ | ||
"http://*.ufabc.edu.br/*", | ||
"https://*.ufabc.edu.br/*", | ||
"http://localhost:8000/*", | ||
"http://*.ufabcnext.com/*", | ||
"https://*.ufabcnext.com/*", | ||
], | ||
content_scripts: [ | ||
{ | ||
all_frames: true, | ||
js: ["contentscript.js"], | ||
matches: [ | ||
"http://*.ufabc.edu.br/*", | ||
"https://*.ufabc.edu.br/*", | ||
"http://localhost:8000/*", | ||
"http://*.ufabcnext.com/*", | ||
"https://*.ufabcnext.com/*", | ||
], | ||
run_at: "document_end", | ||
}, | ||
], | ||
key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlg7ae7OuGQW9cQU3/qbuewZ6DdTjc1yDXtiwdwoOwgF/CByfjX+yf4addlXcxnLjXVBWwSvRj78mv03lLBjkeh63ia4t/BIzzzvciZyZAKEasC5rt0M6+MKVbkKQS9JGGVFsBiBQcQ6kUP8R4cpWX1G9uEhnshdF+u4Nrs7gq9uXIPZ4pf9PhI/IsPyAsv0m5uO4EHhIMtAp8pFyJfECWWSLchlBoGlaaCyf+fT6SYDsWaw53AcwT5jOJfxdQsoGRKGI5UW8V9+Mw+EDdpTpi7f8E5k604EMqZwmzhYLiXcuUqxeXbNZkyTsUNHXTQFcpNUdmisfjiT50kcxVZVc9wIDAQAB", | ||
externally_connectable: { | ||
matches: [ | ||
"http://*.ufabc.edu.br/*", | ||
"https://*.ufabc.edu.br/*", | ||
"http://localhost:8000/*", | ||
"http://*.ufabcnext.com/*", | ||
"https://*.ufabcnext.com/*", | ||
], | ||
}, | ||
action: { | ||
default_icon: { | ||
19: "assets/icon-19.png", | ||
38: "assets/icon-38.png", | ||
}, | ||
default_title: "Next Extension", | ||
default_popup: "./views/Popup/index.html", | ||
}, | ||
content_security_policy: { | ||
extension_pages: "script-src 'self'; object-src 'self'", | ||
}, | ||
web_accessible_resources: [ | ||
{ | ||
resources: [ | ||
"components/*", | ||
"assets/*", | ||
"lib/*", | ||
"pages/*", | ||
"scripts/*", | ||
"services/*", | ||
"styles/*", | ||
"utils/*", | ||
"views/*", | ||
"html/*", | ||
], | ||
matches: [ | ||
"http://*.ufabc.edu.br/*", | ||
"https://*.ufabc.edu.br/*", | ||
"http://localhost:8000/*", | ||
"http://*.ufabcnext.com/*", | ||
"https://*.ufabcnext.com/*", | ||
], | ||
}, | ||
], | ||
}; | ||
|
||
if (isDev) { | ||
manifest.content_security_policy = { | ||
extension_pages: `script-src 'self' http://localhost:${5001}; object-src 'self'`, | ||
}; | ||
} | ||
|
||
return manifest; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export const NextStorage = { | ||
setItem(key, value) { | ||
return new Promise((resolve, reject) => { | ||
try { | ||
const date = Date.now(); | ||
const event = new CustomEvent("requestStorage", { | ||
detail: { | ||
method: `setStorage-${key}-${date}`, | ||
date: date, | ||
key: key, | ||
value: value, | ||
}, | ||
}); | ||
document.addEventListener(`setStorage-${key}-${date}`, (evt) => { | ||
resolve(evt.detail.value); | ||
}); | ||
document.dispatchEvent(event); | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}); | ||
}, | ||
getItem(key) { | ||
return new Promise((resolve, reject) => { | ||
try { | ||
const date = Date.now(); | ||
const event = new CustomEvent("requestStorage", { | ||
detail: { | ||
method: `getStorage-${key}-${date}`, | ||
key: key, | ||
date: date, | ||
}, | ||
}); | ||
document.addEventListener(`getStorage-${key}-${date}`, (evt) => { | ||
resolve(evt.detail.value); | ||
}); | ||
document.dispatchEvent(event); | ||
} catch (err) { | ||
console.error(err); | ||
} | ||
}); | ||
}, | ||
}; |
Oops, something went wrong.