Rename vars box, button -> add_tag_textbox, add_tag_button.

This commit is contained in:
voussoir 2020-01-15 18:48:12 -08:00
parent fa7f5b7b17
commit 56e34bd245

View file

@ -212,23 +212,22 @@ h2, h3
<script type="text/javascript"> <script type="text/javascript">
var box = document.getElementById('add_tag_textbox'); var add_tag_textbox = document.getElementById('add_tag_textbox');
var button = document.getElementById('add_tag_button'); var add_tag_button = document.getElementById('add_tag_button');
var message_area = document.getElementById('message_area'); var message_area = document.getElementById('message_area');
box.addEventListener("keyup", common.entry_with_history_hook); add_tag_textbox.addEventListener("keyup", common.entry_with_history_hook);
common.bind_box_to_button(box, button, false); common.bind_box_to_button(add_tag_textbox, add_tag_button, false);
function easybake_form() function easybake_form()
{ {
var box = document.getElementById('add_tag_textbox'); var easybake_string = add_tag_textbox.value;
var easybake_string = box.value;
if (easybake_string === "") if (easybake_string === "")
{ {
box.focus(); add_tag_textbox.focus();
return; return;
} }
api.tags.easybake(easybake_string, tag_action_callback); api.tags.easybake(easybake_string, tag_action_callback);
box.value = ""; add_tag_textbox.value = "";
} }
function tag_action_callback(response) function tag_action_callback(response)