mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #512] [MERGED] Support for Google Chrome Extension #2667
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2667
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/512
Author: @AndrewBastin
Created: 1/22/2020
Status: ✅ Merged
Merged: 1/23/2020
Merged by: @liyasthomas
Base:
master← Head:feat/chrome-extension📝 Commits (8)
8ae5dbcFixed proxying through the firefox extensiona235d38Added ChromeStrategy to interact with the Postwoman Chrome Extension2d6d1b2Added Chrome Strategy as a valid network strategy56c7ec3Merge branch 'master' into feat/chrome-extension81654c3Use relative imports52fe647Merge branch 'master' into feat/chrome-extensiondf21ded✏️ Updated extensions link8b7fd23✨ Detech whether extension is already installed or not, if not, shoe install prompt toast📊 Changes
5 files changed (+97 additions, -27 deletions)
View changed files
📝
README.md(+5 -3)📝
functions/network.js(+6 -1)➕
functions/strategies/ChromeStrategy.js(+56 -0)📝
functions/strategies/FirefoxStrategy.js(+1 -1)📝
layouts/default.vue(+29 -22)📄 Description
This PR intends to introduce compatibility with Postwoman Chrome Extension
This adds a new NetworkStrategy to hook with the Chrome Content Script and Background Script to run the query.
NOTE
Do NOT use the extension from the store to test the strategy, because, the extension is configured to only hook into the
postwoman.ioandpostwoman.netlify.comdomains. Other domains won't get hooked and hence won't get access to the extension hooks.So, to test this PR, you have to clone the postwoman-chrome repo.
Then head into the
manifest.jsonfile and edit it to match this snippet belowThen run
npm installand thennpm run build.This will create a folder called dist with the generated code.
Then, open Chrome and navigate to
chrome://extensions, click onLoad Unpackedand then select the generated dist folder.Next, go to your postwoman cloned repo and open the file
functions/strategies/ChromeStrategy.jsand editEXTENSION_IDconstant to match with the extension ID you got while loading our Unpacked Extension in the prior step (to find it, just click on the extension details of our extension).The defined
EXTENSION_IDis for the extension in the Chrome Web Store.After this you can navigate to the Postwoman app in localhost and access it, you can check if the hook was successful or not by opening the console on the Postwoman app and checking for the console log "Connected to the Postwoman Chrome Extension!" after load.
Once that is done, just fire a request anywhere and you will see that CORS restrictions won't be applied.
NOTE: The Chrome extension isn't marked public yet in the Chrome Web Store, it will be marked public as soon as this PR is approved
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.