thingsinjars/devtools-extension
소개
Basic example of a Chrome Devtools extension with communication between the inspected page and the panel
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalDevTools Extension Example
This is a small boilerplate project to be used as a starting point for developing a Chrome DevTools Extension.
Installation
- Open chrome://extensions
- Enable 'Developer Mode' checkbox
- Click 'Load unpacked extensions...'
- Select the
devtools-extensionfolder
Usage
While on any page, launch the devtools, you should see a new tab called 'DemoPanel' which contains 3 buttons.
Execute script in inspected page
Uses chrome.tabs.executeScript to execute an inline script in the context of the page you're inspecting (via background.html).
Insert script into inspected page
Uses chrome.tabs.executeScript to append an external file (included in the extension folder) to the inspected page (via background.html).
Insert button to send a message
With the grace of a gorilla, replaces the entire DOM of the inspected page with a button which has an onclick attached. Clicking the button will send a message from the inspected page to the background.html. It is then relayed back to the DemoPanel where it changes the text on the button.
Background
While working on a feature for GhostStory, I found myself trying to figure out how Chrome DevTools Extensions worked. Seeing as it took the best part of a day to actually get the basics in place (even using the docs and samples), I figure it might help to have a working example.
관련 프로젝트 살펴보기
불러오는 중…