Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample instructions for modifying code via content-scripts #15747

Merged
merged 1 commit into from Jun 5, 2018

Conversation

cathyxz
Copy link
Contributor

@cathyxz cathyxz commented Jun 1, 2018

Adds documentation for using content scripts to modify production code for lightweight in-development component testing. When I originally tried using this Chrome extension for QA, I found this non-obvious as a new user of Chrome extensions. Adding some sample code here in hopes of saving future users' time. Slightly modified version of original internal documentation at go/amp-extension-proxy.

## Basic Usage
What this extension does already is to intercept network requests to `https://cdn.ampproject.org/*` and redirect them to localhost. This is done in [background.js](./background.js).

# Locally rewriting production websites
Copy link
Contributor

Choose a reason for hiding this comment

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

very cool. thanks for documenting it.

@cathyxz cathyxz merged commit 5a33883 into ampproject:master Jun 5, 2018
@cathyxz cathyxz deleted the feature/ext-sample branch June 5, 2018 19:58
AmazonPublisherServices pushed a commit to AmazonPublisherServices/amphtml that referenced this pull request Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants