Coder Social home page Coder Social logo

Comments (7)

NightWanderer2004 avatar NightWanderer2004 commented on June 11, 2024 1

YES!!!! I made it and now all is alright, thank you!!!!

manifest.json:

"matches": ["*://*/**/mod/quiz/*", "*://*/mod/quiz/*", "file:///*", "http://127.0.0.1:5500/*"],
Screenshot 2024-01-08 at 17 47 02

from moodlegpt.

NightWanderer2004 avatar NightWanderer2004 commented on June 11, 2024

I tried using extention on your test Moodle page*

from moodlegpt.

yoannchb-pro avatar yoannchb-pro commented on June 11, 2024

Could you send the console by pressing f12 and then console. Also active title injection option and check the injection is working because sometimes the extension don’t have access to local files

from moodlegpt.

NightWanderer2004 avatar NightWanderer2004 commented on June 11, 2024

Sure! I running fake page on local server, but still dont see a notification about injection:
Screenshot 2024-01-08 at 12 10 03

from moodlegpt.

yoannchb-pro avatar yoannchb-pro commented on June 11, 2024

Yes it’s because the path is not registered into the manifest. You can add it manually

from moodlegpt.

carloalbertogiordano avatar carloalbertogiordano commented on June 11, 2024

Hy, I'm sorry to have to comment on a closed issue, but I do not understand how to modify the manifest. How do I do it?

Thanks.

from moodlegpt.

NightWanderer2004 avatar NightWanderer2004 commented on June 11, 2024

Hi! It's easy, just open a /extention/manifest.json in your code editor and add this string "http://127.0.0.1:5500/*" in matches array:

{
  ...other things

  "content_scripts": [
    {
      "matches": ["*://*/**/mod/quiz/*", "*://*/mod/quiz/*", "file:///*"], // <<< MAKE CHANGES HERE
      "js": ["MoodleGPT.js"],
      "run_at": "document_end"
    }
  ]
}

So complete file should be like that:

{
  "manifest_version": 3,
  "name": "MoodleGPT",
  "version": "1.0.3",
  "description": "Hidden chat-gpt for your moodle quiz",
  "permissions": ["storage"],
  "action": {
    "default_icon": "icon.png",
    "default_popup": "./popup/index.html"
  },

  "icons": {
    "16": "icon.png",
    "32": "icon.png",
    "48": "icon.png",
    "128": "icon.png"
  },

  "content_scripts": [
    {
      "matches": ["*://*/**/mod/quiz/*", "*://*/mod/quiz/*", "file:///*", "http://127.0.0.1:5500/*"],
      "js": ["MoodleGPT.js"],
      "run_at": "document_end"
    }
  ]
}

And yeah, if you want modify manifest.json just to try an extention, remember to use a correct URL (so I used a LiveServer in Visual Studio Code, URL is http://127.0.0.1:5500)

from moodlegpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.