Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google removed the extension from the Chrome webstore #98

Open
eddex opened this issue Sep 19, 2022 · 13 comments
Open

Google removed the extension from the Chrome webstore #98

eddex opened this issue Sep 19, 2022 · 13 comments

Comments

@eddex
Copy link
Owner

eddex commented Sep 19, 2022

The extension can't be found on the Chrome webstore anymore.

https://chrome.google.com/webstore/detail/hslu-simple-mep-results/bkcgbpgefenaapagldnnabfakilmfihp leads to a 404.

RIP

@eddex eddex added bug Something isn't working and removed bug Something isn't working labels Sep 19, 2022
@simonbaumeler
Copy link

Isn't there a chrome webstore account that should have been notified what happened with the extension and how to get it back online?

@Lextum
Copy link
Collaborator

Lextum commented Oct 20, 2022

@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.

@Lextum
Copy link
Collaborator

Lextum commented Oct 20, 2022

@eddex We definitely need to give this project to STAIR or have some maintainers that have access to MyCampus.

@simonbaumeler
Copy link

simonbaumeler commented Oct 20, 2022

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"
}
}
}

WhatsApp Image 2022-10-20 at 19 23 31

@Lextum
Copy link
Collaborator

Lextum commented Oct 20, 2022

I believe you can ignore this error. The extension should still load inside MyCampus.

@simonbaumeler
Copy link

The extension does not load when opening the "Meine Anmeldungen" site.

@Lextum
Copy link
Collaborator

Lextum commented Oct 20, 2022

Can you remove this part from the manifest and try again?

@simonbaumeler
Copy link

I'll try tomorrow 👍🏼

@simonbaumeler
Copy link

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.

Extension error:
image

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
      },

}

Console errors:
image

@simonbaumeler
Copy link

hello @Lextum

I hope you are well. How is the status here?

@Lextum
Copy link
Collaborator

Lextum commented Feb 23, 2023

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.

@simonbaumeler
Copy link

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.

@Lextum
Copy link
Collaborator

Lextum commented Mar 5, 2023

Hi @simonbaumeler

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants