Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

fix: cannot create context menu item with duplicate id#231

Merged
KattMingMing merged 1 commit intomasterfrom
issue-230
Oct 6, 2018
Merged

fix: cannot create context menu item with duplicate id#231
KattMingMing merged 1 commit intomasterfrom
issue-230

Conversation

@KattMingMing
Copy link

@KattMingMing KattMingMing commented Oct 4, 2018

This PR resolves #230:

Fixes bug where "Enable Sourcegraph on this domain" context menu item would not appear.

Uses a helper lib also used in refined GitHub to add the context menu item, request permissions, display any errors to the user, show alert to refresh page after permissions are granted so the content script is injected.

Testing plan:

  • Install the extension and right click on the Sourcegraph icon in the browser toolbar.
  • Click "Enable Sourcegraph on this domain"
  • Click "Ok" when popup appears asking "Do you want to reload this page to apply Sourcegraph"
  • Notice content script is injected on the page

I have tested on:

  • Chrome
  • Firefox
  • Safari
  • Phabricator Bundle

@KattMingMing KattMingMing requested a review from ijsnow October 4, 2018 16:13
Copy link

@ijsnow ijsnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, after we merge this I'm going to see if we actually need <all_urls> anymore on Firefox since we don't have a popover anymore

@KattMingMing KattMingMing merged commit 8a907b6 into master Oct 6, 2018
@sourcegraph-bot
Copy link

🎉 This PR is included in version 1.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants