Add Help button to Run JavaScript window to open documentation

This commit is contained in:
Dan Stillman 2019-08-02 07:00:06 -04:00
parent 66bfcf382d
commit 871a275090
3 changed files with 10 additions and 1 deletions

View file

@ -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>

View file

@ -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;

View file

@ -13,6 +13,10 @@ button {
font-size: 15px;
}
#help-button {
margin-left: 15px;
}
#run-label {
margin-left: 2px;
font-size: 12px;