Skip to content

adding context-menu in AOSSIE Scholar Extension

Fixes #61 (closed)

Short description of what this resolves:

When we click the right mouse button on the Google Scholar Website, a menu-like box appears which is called the context menu. In JavaScript, a context menu event runs when a user tries to open a context menu. This can be done by clicking the right mouse button. Adding context menu to the AOSSIE Scholar Extension will help in searching the particular selected text in Google Scholar Website.

Changes proposed in this pull request:

  • Bind context-menu listener on the desired element
  • Prevent the default behaviour and compute the position at which this menu will be displayed
  • Display the menu only on right-click and then close the menu when the user clicks outside

Checklist

  • My branch is up-to-date with the Upstream develop branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Merge request reports