add options link in right click menu
This commit is contained in:
1 parent
595edf4440
commit
906164e190
2 files changed
+24
No files matched your search
@@ -1801,6 +1801,16 @@ async function init_icon()
|
||||
|
||||
init_icon();
|
||||
|
||||
function open_options(info, tab)
|
||||
{
|
||||
try
|
||||
{
|
||||
browser.tabs.create({
|
||||
url:browser.extension.getURL("options.html")
|
||||
});
|
||||
} catch(err) {}
|
||||
}
|
||||
|
||||
function open_reader(info, tab)
|
||||
{
|
||||
try
|
||||
@@ -1846,6 +1856,12 @@ function open_jsonconfig(info, tab)
|
||||
|
||||
if(browser.contextMenus)
|
||||
{
|
||||
browser.contextMenus.create({
|
||||
id: "nazeka-options",
|
||||
title: "Options",
|
||||
contexts: ["browser_action"],
|
||||
onclick: open_options
|
||||
});
|
||||
browser.contextMenus.create({
|
||||
id: "nazeka-reader",
|
||||
title: "Open Reader",
|
||||
|
||||
@@ -7,6 +7,14 @@
|
||||
<title>Nazeka: options</title>
|
||||
<script src="include/browser-polyfill.min.js" charset="UTF-8"></script>
|
||||
<script type="text/javascript" src="options.js"></script>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
max-width: 900px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class=panel>
|
||||
|
||||
Reference in new issue
Block a user