Comments (13)
@eddex We definitely need to give this project to STAIR or have some maintainers that have access to MyCampus.
from hslu-simple-mep-results.
Hello @Lextum
Thank you for your Feedback, I've reached out to STAIR in order to organise something to keep this nice extension alive and up-to-date. Also if you tell me what to check for i can help you find a solution or we could even have a session on Discord in which i could show you everything you need on mycampus.
from hslu-simple-mep-results.
@simonbaumeler Yes there is. We reason was the permission "webRequest"
we apparently don't use. I migrated to v3 and removed the permission. But I can't test if it still works. Could you check out the branch manifest_v3
and try it out? Please tell me, if you need help installing the extension directly from source.
from hslu-simple-mep-results.
Isn't there a chrome webstore account that should have been notified what happened with the extension and how to get it back online?
from hslu-simple-mep-results.
doesnt work yet:
{
"manifest_version": 3,
"name": "HSLU simple MEP results",
"version": "2.1.1",
"description": "Show the results of your exams in a nice way instead of the crappy default layout.",
"icons": {
"48": "icons/icon-48.png",
"96": "icons/icon-96.png",
"128": "icons/icon-128.png"
},
"action": {
"default_icon": "icons/icon-48.png",
"default_title": "HSLU simple MEP results",
"default_popup": "popup/popup.html",
"browser_style": true
},
"content_scripts": [
{
"matches": [
"://.mycampus.hslu.ch//stud-i/mein-studium/meine-anmeldungen/"
],
"js": [
"components/helpers.js",
"components/i18n.js",
"components/module_parser.js",
"lib/Chart.bundle.min.js",
"main.js"
],
"css": [
"templates/custom_styles.css"
]
}
],
"permissions": [
"storage"
],
"host_permissions": [
"https://mycampus.hslu.ch/"
],
"web_accessible_resources": [
{
"resources": [
"templates/grades_table.html",
"templates/credits_by_module_type_table.html",
"templates/custom_styles.css",
"data/modules_i.json",
"data/modules_ics.json",
"data/modules_wi.json",
"data/modules_ai.json",
"_locales/"
],
"matches": [],
"extension_ids": []
}
],
"default_locale": "de",
"browser_specific_settings": {
"gecko": {
"id": "{64b1a494-88df-447e-b2aa-45d86fcc3c16}",
"update_url": "https://raw.githubusercontent.com/eddex/hslu-simple-mep-results/master/updates.json"
}
}
}
from hslu-simple-mep-results.
I believe you can ignore this error. The extension should still load inside MyCampus.
from hslu-simple-mep-results.
The extension does not load when opening the "Meine Anmeldungen" site.
from hslu-simple-mep-results.
Can you remove this part from the manifest and try again?
from hslu-simple-mep-results.
I'll try tomorrow 👍🏼
from hslu-simple-mep-results.
i removed the part from the manifest and got no error to start with afterwards but when loading the "meine Anmeldungen" page the extension still did not load.
in text:
/**
- Returns the default locale from the manifest
- @returns {string}
*/
function getDefaultLocale() {
if (Helpers.isFirefox()) {
return (browser.runtime.getManifest()).default_locale
}
else {
return (chrome.runtime.getManifest()).default_locale
}
}
/**
- Returns the language of MyCampus
- @returns {string}
*/
async function getLanguage() {
languageLinks = document.getElementsByClassName("languagelink");
if (languageLinks.length > 0) {
for (let i = 0; i < languageLinks.length; i++) {
const languageLink = languageLinks[i];
if (languageLink.classList.contains("active")) {
return languageLink.hreflang;
}
}
}
// needed for the popup
else {
const i18nLanguage = (await Helpers.getItemFromLocalStorage("i18nLanguage")).i18nLanguage
if (i18nLanguage === undefined) {
return getDefaultLocale();
}
return i18nLanguage
}
}
/**
*
- @param {*} language
- @returns a object with all i18n strings for the given language
*/
async function getMessages(language) {
let messsages = await fetch(Helpers.getExtensionInternalFileUrl('_locales/' + language + '/messages.json'))
.then(response => response.json())
if (messsages === undefined) {
messsages = await fetch(Helpers.getExtensionInternalFileUrl('_locales/' + getDefaultLocale() + '/messages.json'))
.then(response => response.json())
}
return messsages;
}
/**
-
Component for localization functions.
*/
const i18n = {messages: "",
/**-
Gets the right language and the corresponding message file
*/
init: async () => {const language = await getLanguage();
i18n.messages = await getMessages(language);
await Helpers.saveObjectInLocalStorage({ i18nLanguage: language })
},
/**
- Returns the localized message
- @param {string} message wo should be localized
*/
getMessage: (message) => {
if (message in i18n.messages) {
return i18n.messages[message].message
}
return undefined
},
-
}
from hslu-simple-mep-results.
hello @Lextum
I hope you are well. How is the status here?
from hslu-simple-mep-results.
Hello @simonbaumeler
Sorry, I completely forget about this issue. I contacted the Google Support and tried to resubmit the extension but they insisted on removing the WebRequest permission. Neither @eddex nor myself have access to MyCampus, so we can't test or try to find a solution for this problem. I you want to help us find a solution or can prove somehow that this permission is needed, I am happy to reupload the extension.
from hslu-simple-mep-results.
Sure, we can try to find a solution together. Just send me a PM on discord at Letum#5528. If you want to start some research, I would say the error you got in an answer above is a good starting point.
from hslu-simple-mep-results.
Related Issues (20)
- Add a way to manually add modules HOT 2
- Add a way to flag modules HOT 1
- Data for ICS and WI students won't load
- Update CONTRIBUTING.md
- Language Courses HOT 1
- Decimal separator enhancement HOT 2
- ICS - WEBTEC&SPRG
- BA_GEST is not recognized as Zusatzmodul HOT 1
- Business IT modules missing and inconsistencies HOT 9
- TA.BA_VWL and I.BA_VWL conflict HOT 1
- Breaking API changes break everything! Grades and Marks have been merged. Everything's broken! HOT 4
- Module I.BA_CG missing HOT 1
- Grade "0" (for not graded) is not shown - average grade calculation is off HOT 4
- No ECTS points available anymore? HOT 6
- UI user manual in README
- firstModule calculation is wrong HOT 2
- Individual Credits from other Univerisities/Organizations do not show up properly HOT 1
- Extension does not consider first two semesters HOT 1
- Add-On is no longer available in Chrome Web Store HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hslu-simple-mep-results.