universe@207: /* universe@207: * Copyright 2021 Mike Becker. All rights reserved. universe@207: * universe@207: * Redistribution and use in source and binary forms, with or without universe@207: * modification, are permitted provided that the following conditions are met: universe@207: * universe@207: * 1. Redistributions of source code must retain the above copyright universe@207: * notice, this list of conditions and the following disclaimer. universe@207: * universe@207: * 2. Redistributions in binary form must reproduce the above copyright universe@207: * notice, this list of conditions and the following disclaimer in the universe@207: * documentation and/or other materials provided with the distribution. universe@207: * universe@207: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" universe@207: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE universe@207: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE universe@207: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE universe@207: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL universe@207: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR universe@207: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER universe@207: * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, universe@207: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE universe@207: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. universe@207: */ universe@207: universe@207: /** universe@207: * Replaces the formatted comment text with an text area. universe@207: * universe@207: * @param {number} id the ID of the comment universe@207: */ universe@207: function showCommentEditor(id) { universe@207: const editor = document.getElementById(`comment-editor-${id}`) universe@207: const view = document.getElementById(`comment-view-${id}`) universe@207: editor.style.display='block' universe@207: view.style.display='none' universe@207: }