mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-20 16:22:52 +02:00
19 lines
552 B
Markdown
19 lines
552 B
Markdown
# apply-css
|
|
|
|
## What it does
|
|
|
|
This extension includes:
|
|
|
|
* a background script, "background.js"
|
|
* a page action
|
|
|
|
It adds the page action to every tab the user opens. Clicking the page action
|
|
for a tab applies some CSS using [tabs.insertCSS](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/tabs/insertCSS).
|
|
|
|
Clicking again removes the CSS using [tabs.removeCSS](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/tabs/removeCSS).
|
|
|
|
## What it shows
|
|
|
|
* some basic page action functions
|
|
* how to apply and remove CSS.
|