remove/modify js return statements

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-11-07 12:49:49 +02:00
parent f34c70c479
commit c8a613389b
4 changed files with 8 additions and 13 deletions

View File

@ -17,7 +17,7 @@ popClickBadgeTemplateDOM.alt = "badge";
function popclick(e) {
// We let through those methods
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
return true;
return;
e.preventDefault();
if(e.currentTarget.dataset.popInfo === undefined)
@ -59,8 +59,6 @@ function popclick(e) {
popover.getElementsByClassName('pop-coins')[0].innerHTML = author["coins"]
popover.getElementsByClassName('pop-viewmore')[0].href = author["url"]
}, 5);
return false;
}
document.addEventListener("click", function(){
@ -118,4 +116,4 @@ function bet_vote(oid) {
post(`/vote/post/option/${oid}`);
document.getElementById("user-coins-amount").innerText = parseInt(document.getElementById("user-coins-amount").innerText) - 200;
}
}

View File

@ -226,7 +226,7 @@ function formkey() {
function expandDesktopImage(url) {
const e = this.event
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
return true;
return;
e.preventDefault();
if (!url)
{
@ -388,7 +388,6 @@ function sendFormXHR(e, extraActionsOnSuccess) {
let data = JSON.parse(xhr.response);
showToast(true, getMessageFromJsonData(true, data));
if (extraActionsOnSuccess) extraActionsOnSuccess(xhr);
return true
} else {
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
try {
@ -407,8 +406,6 @@ function sendFormXHR(e, extraActionsOnSuccess) {
};
xhr.send(formData);
return false
}
function sendFormXHRSwitch(e) {

View File

@ -521,7 +521,7 @@ function speed_carot_navigate(e)
if (!selecting) return;
let select_items = speed_carot_modal.querySelectorAll(".speed-modal-option");
if (!select_items || !curr_word_is_emoji()) return false;
if (!select_items || !curr_word_is_emoji()) return;
// Up or down arrow or enter
if (e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 13)
{
@ -577,4 +577,4 @@ function loadEmojis(inputTargetIDName)
document.getElementById('emojiModal').addEventListener('shown.bs.modal', function () {
emojiSearchBarDOM.focus();
});
});

View File

@ -10,7 +10,7 @@ function expandText(id) {
function togglevideo(pid) {
const e = this.event
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
return true;
return;
e.preventDefault();
let vid = document.getElementById(`video-${pid}`).classList
vid.toggle('d-none')
@ -22,7 +22,7 @@ function togglevideo(pid) {
function toggleyoutube(pid) {
const e = this.event
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
return true;
return;
e.preventDefault();
document.getElementById(`video-${pid}`).classList.toggle('d-none')
}
}