-
Notifications
You must be signed in to change notification settings - Fork 8
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 #290 from fga-eps-mds/feature-RF02_disciplinasCurs…
- Loading branch information
Showing
5 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
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
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,27 +1,36 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "SIGAA+", | ||
"description":"teste SIGAA+", | ||
"name": "Sigaa Plus", | ||
"version": "1.0", | ||
|
||
"description": "A plain text description", | ||
"icons": { | ||
"16": "/assets/16logoSigaaPlus.png", | ||
"48": "/assets/48logoSigaaPlus.png", | ||
"128": "/assets/128logoSigaaPlus.png" | ||
"16":"assets/16logoSigaaPlus.png", | ||
"48":"assets/48logoSigaaPlus.png", | ||
"128":"assets/128logoSigaaPlus.png" | ||
}, | ||
|
||
"permissions": [ | ||
"storage" | ||
], | ||
|
||
"action": { | ||
"default_popup":"/details/popup.html" | ||
"background":{ | ||
"service_worker":"background.js" | ||
}, | ||
|
||
"author": "Grupo 02", | ||
"permissions": ["storage"], | ||
|
||
"content_scripts":[ | ||
{ | ||
"matches": ["https://sig.unb.br/*"], | ||
"js": ["/details/Contentscript.js"] | ||
"js":[ | ||
"materiasCursadas.js", | ||
"Contentscript.js", | ||
"dist/js/app.b8019ffe.js", | ||
"dist/js/chunk-vendors.2c3e9449.js" | ||
], | ||
"css":["dist/css/app.dc179720.css"] | ||
} | ||
] | ||
|
||
], | ||
"action": { | ||
"default_icon": "assets/128logoSigaaPlus.png", | ||
"default_popup": "popup.html" | ||
} | ||
} |
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,25 @@ | ||
console.log("Hello World!") | ||
|
||
if(document.body.contains(document.querySelector(".infoAltRem"))){ | ||
// criando botão para acionar a função | ||
let btn = document.createElement("button"); | ||
btn.innerHTML = "Salvar"; | ||
btn.style.cssText = 'position:absolute;top:105px;left:150px;width:100px;height:24px;background-color: #404E82; color: white;border:0px solid #ddd;'; | ||
// criando função para salvar as matérias ao clicar no botão | ||
btn.onclick = function () { | ||
let doc = document.querySelectorAll("#j_id_jsp_303365748_2 > table > tbody:nth-child(4) > tr > td:nth-child(1)") | ||
const matList = [...doc] | ||
const materias = matList.map(({ innerText }) => ({ | ||
materia: innerText | ||
})) | ||
console.log(materias) | ||
// salvando matérias em um json no localStorage | ||
localStorage.setItem("materias", JSON.stringify(materias)) | ||
console.log('Matérias salvas com sucesso'); | ||
alert("Matérias salvas com sucesso") | ||
}; | ||
document.body.appendChild(btn); | ||
} | ||
// ----Retornando matérias salvas no local storage---- | ||
// const disciplinas = JSON.parse(localStorage.getItem('materias')); | ||
// console.log(disciplinas); |