Add Help button to Run JavaScript window to open documentation
This commit is contained in:
parent
66bfcf382d
commit
871a275090
3 changed files with 10 additions and 1 deletions
|
@ -6,7 +6,8 @@
|
|||
<body>
|
||||
<nav>
|
||||
<button onclick="run()">Run</button>
|
||||
<span id="run-label"/>
|
||||
<span id="run-label"></span>
|
||||
<button id="help-button" onclick="openHelp()">Help</button>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
|
|
|
@ -32,6 +32,10 @@ async function run() {
|
|||
resultTextbox.textContent = typeof result == 'string' ? result : Zotero.Utilities.varDump(result);
|
||||
}
|
||||
|
||||
function openHelp() {
|
||||
Zotero.launchURL("https://www.zotero.org/support/dev/client_coding/javascript_api");
|
||||
}
|
||||
|
||||
function handleInput() { // eslint-disable-line no-unused-vars
|
||||
var checkbox = document.getElementById('run-as-async');
|
||||
var isAsync = checkbox.checked;
|
||||
|
|
|
@ -13,6 +13,10 @@ button {
|
|||
font-size: 15px;
|
||||
}
|
||||
|
||||
#help-button {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#run-label {
|
||||
margin-left: 2px;
|
||||
font-size: 12px;
|
||||
|
|
Loading…
Reference in a new issue