├── .gitignore ├── logo.png ├── logo16.png ├── logo48.png ├── img └── calendar.png ├── README.md ├── manifest.json └── js ├── moneySpent.js ├── examsCalendar.js └── mediacalc.js /.gitignore: -------------------------------------------------------------------------------- 1 | screenshot*.png 2 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCruzDev/paco_ua_extension/HEAD/logo.png -------------------------------------------------------------------------------- /logo16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCruzDev/paco_ua_extension/HEAD/logo16.png -------------------------------------------------------------------------------- /logo48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCruzDev/paco_ua_extension/HEAD/logo48.png -------------------------------------------------------------------------------- /img/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCruzDev/paco_ua_extension/HEAD/img/calendar.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # paco_ua_extension 2 | Extensão que adiciona funcionalidade ao PACO. 3 | 4 | Ainda em fase inicial. 5 | 6 | Features atuais: 7 | * Mostra a média ponderada na página plano curricular 8 | * Adicionar exames ao google calendar com um clique 9 | * Mostra o total gasto em propinas 10 | 11 | Features para adicionar: 12 | * ... 13 | 14 | ## Installation 15 | 16 | Chrome: [Webstore Link](https://chrome.google.com/webstore/detail/paco-ua-extension/lcgdmdafgpgplkiaiifgamdkcnpnnopp) 17 | 18 | Firefox: [Download signed extension](https://github.com/DCruzDev/paco_ua_extension/releases/latest) 19 | 20 | ## Contributors (Big Thanks) 21 | 22 | @RodrigoRosmaninho 23 | @rodrigogonegit 24 | @jtsimoes 25 | 26 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "PACO UA Extension", 4 | "version": "0.29", 5 | 6 | "description": "Adiciona funcionalidade ao antigo PACO da Universidade de Aveiro", 7 | 8 | "icons": { 9 | "16": "logo16.png", 10 | "48": "logo48.png", 11 | "128": "logo.png" }, 12 | 13 | "content_scripts": [ 14 | { 15 | "matches": ["https://paco.ua.pt/secvirtual/c_planocurr.asp"], 16 | "js": ["js/mediacalc.js"] 17 | }, 18 | { 19 | "matches": ["https://paco.ua.pt/secvirtual/c_calendarioDeExames.asp"], 20 | "js": ["js/examsCalendar.js"] 21 | }, 22 | { 23 | "matches": ["https://paco.ua.pt/secvirtual/c_estadoDasProprinas.asp"], 24 | "js": ["js/moneySpent.js"] 25 | } 26 | ], 27 | 28 | "web_accessible_resources": [ 29 | "img/calendar.png" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /js/moneySpent.js: -------------------------------------------------------------------------------- 1 | mainTable = document.querySelector("#template_main > p:nth-child(12) > table:nth-child(1) > tbody:nth-child(1)").children; 2 | stats = parseMainTable(mainTable); 3 | writeStats(stats); 4 | 5 | // Write stats on table at the end of page 6 | function writeStats(stats){ 7 | tableToWrite = document.querySelector("#template_main > p:nth-child(12) > table:nth-child(1) > tbody").children; 8 | tableToWrite = tableToWrite[tableToWrite.length-3]; 9 | tableToWrite = tableToWrite.firstElementChild; 10 | //Create Element to add 11 | var elementToAdd = document.createElement("b"); 12 | 13 | elementToAdd.innerText = "Dinheiro total gasto em propinas: " + stats["totalmoney"].toFixed(2) + "€"; 14 | 15 | //Add elements 16 | tableToWrite.append(elementToAdd); 17 | } 18 | 19 | function parseMainTable (table){ 20 | sum = 0; 21 | // Go Through each row 22 | for(i=2;i