1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-27 15:26:25 -07:00

refactor: replace template strings with regular string literals

Template literals are useful when you need:  1. [Interpolated strings](https://en.wikipedia.org/wiki/String_interpolation).
This commit is contained in:
deepsource-autofix[bot] 2023-05-14 07:10:46 +00:00 committed by GitHub
parent 1603a2eb7e
commit 8860f3dbec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 11 deletions

View file

@ -228,8 +228,8 @@ export function addPostDropdown($post: JQuery<HTMLElement>) {
let showHide = isPostVisible(idNum)?"Hide":"Show";
$ddownMenu.append(
`<option>${showHide} ${threadPost}</option>`,
`<option>Edit post</option>`,
`<option>Report post</option>`,
"<option>Edit post</option>",
"<option>Report post</option>",
`<option>Delete ${threadPost}</option>`,
).insertAfter($postInfo)
.on("change", _e => {
@ -237,7 +237,7 @@ export function addPostDropdown($post: JQuery<HTMLElement>) {
$ddownMenu.val("Actions");
});
if(hasUpload)
$ddownMenu.append(`<option>Delete file</option>`);
$ddownMenu.append("<option>Delete file</option>");
$post.trigger("postDropdownAdded", {
post: $post,
dropdown: $ddownMenu

View file

@ -23,12 +23,12 @@ let threadCooldown = 0;
let replyCooldown = 0;
const qrButtonHTML =
`<input type="file" id="imagefile" name="imagefile" accept="image/jpeg,image/png,image/gif,video/webm,video/mp4"/>` +
`<input type="submit" value="Post" style="float:right;min-width:50px"/>`;
'<input type="file" id="imagefile" name="imagefile" accept="image/jpeg,image/png,image/gif,video/webm,video/mp4"/>' +
'<input type="submit" value="Post" style="float:right;min-width:50px"/>';
const qrTitleBar =
`<div id="qr-title">` +
`<span id="qr-message"></span>` +
'<div id="qr-title">' +
'<span id="qr-message"></span>' +
`<span id="qr-buttons"><a href="javascript:toBottom();">${downArrow}</a>` +
`<a href="javascript:toTop();">${upArrow}</a><a href="javascript:closeQR();">X</a></span></div>`;