[Improvement] Adding Context-Menu option for Generating Quiz #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR associated with issue #17 introduces a context-menu option to facilitate quiz generation for selected text, enhancing user experience.
Implementation:
The addition begins with incorporating the background script, also known as the Service Worker file (
service_worker.js
), into the extension directory, and mapping it within themanifest.json
file. This script defines the context menu option metadata and installs it during runtime, specifying the behavior of the extension. The highlighted text is stored in the browser's local storage.Subsequently, the
text_input.js
file retrieves this stored variable and sets it as the value within the input box, displayed within the extension's popup window after the context menu operation.Current Output:
Screencast.from.2024-03-19.13-19-01.webm
Reviewers:
@prarabdhshukla
@MiHarsh