mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
add in some reader mode fun (#303)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"strict_min_version": "58.0a1"
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
|
||||
<div class="panel-section-separator"></div>
|
||||
|
||||
<a href="#" id="tabs-create-reader">Create a tab in reader mode</a><br>
|
||||
|
||||
<div class="panel-section-separator"></div>
|
||||
|
||||
<a href="#" id="tabs-add-zoom">Zoom in</a><br>
|
||||
<a href="#" id="tabs-default-zoom">Reset zoom</a><br>
|
||||
<a href="#" id="tabs-decrease-zoom">Zoom out</a><br>
|
||||
|
||||
@@ -102,6 +102,10 @@ document.addEventListener("click", (e) => {
|
||||
browser.tabs.create({url: "https://developer.mozilla.org/en-US/Add-ons/WebExtensions"});
|
||||
}
|
||||
|
||||
else if (e.target.id === "tabs-create-reader") {
|
||||
browser.tabs.create({url: "https://developer.mozilla.org/en-US/Add-ons/WebExtensions", openInReaderMode: true});
|
||||
}
|
||||
|
||||
else if (e.target.id === "tabs-alertinfo") {
|
||||
callOnActiveTab((tab) => {
|
||||
let props = "";
|
||||
|
||||
Reference in New Issue
Block a user