forked from rDrama/rDrama
remove/modify js return statements
parent
f34c70c479
commit
c8a613389b
|
@ -17,7 +17,7 @@ popClickBadgeTemplateDOM.alt = "badge";
|
||||||
function popclick(e) {
|
function popclick(e) {
|
||||||
// We let through those methods
|
// We let through those methods
|
||||||
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
||||||
return true;
|
return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
if(e.currentTarget.dataset.popInfo === undefined)
|
if(e.currentTarget.dataset.popInfo === undefined)
|
||||||
|
@ -59,8 +59,6 @@ function popclick(e) {
|
||||||
popover.getElementsByClassName('pop-coins')[0].innerHTML = author["coins"]
|
popover.getElementsByClassName('pop-coins')[0].innerHTML = author["coins"]
|
||||||
popover.getElementsByClassName('pop-viewmore')[0].href = author["url"]
|
popover.getElementsByClassName('pop-viewmore')[0].href = author["url"]
|
||||||
}, 5);
|
}, 5);
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("click", function(){
|
document.addEventListener("click", function(){
|
||||||
|
|
|
@ -226,7 +226,7 @@ function formkey() {
|
||||||
function expandDesktopImage(url) {
|
function expandDesktopImage(url) {
|
||||||
const e = this.event
|
const e = this.event
|
||||||
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
||||||
return true;
|
return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!url)
|
if (!url)
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,6 @@ function sendFormXHR(e, extraActionsOnSuccess) {
|
||||||
let data = JSON.parse(xhr.response);
|
let data = JSON.parse(xhr.response);
|
||||||
showToast(true, getMessageFromJsonData(true, data));
|
showToast(true, getMessageFromJsonData(true, data));
|
||||||
if (extraActionsOnSuccess) extraActionsOnSuccess(xhr);
|
if (extraActionsOnSuccess) extraActionsOnSuccess(xhr);
|
||||||
return true
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||||
try {
|
try {
|
||||||
|
@ -407,8 +406,6 @@ function sendFormXHR(e, extraActionsOnSuccess) {
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send(formData);
|
xhr.send(formData);
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendFormXHRSwitch(e) {
|
function sendFormXHRSwitch(e) {
|
||||||
|
|
|
@ -521,7 +521,7 @@ function speed_carot_navigate(e)
|
||||||
if (!selecting) return;
|
if (!selecting) return;
|
||||||
|
|
||||||
let select_items = speed_carot_modal.querySelectorAll(".speed-modal-option");
|
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
|
// Up or down arrow or enter
|
||||||
if (e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 13)
|
if (e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 13)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ function expandText(id) {
|
||||||
function togglevideo(pid) {
|
function togglevideo(pid) {
|
||||||
const e = this.event
|
const e = this.event
|
||||||
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
||||||
return true;
|
return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let vid = document.getElementById(`video-${pid}`).classList
|
let vid = document.getElementById(`video-${pid}`).classList
|
||||||
vid.toggle('d-none')
|
vid.toggle('d-none')
|
||||||
|
@ -22,7 +22,7 @@ function togglevideo(pid) {
|
||||||
function toggleyoutube(pid) {
|
function toggleyoutube(pid) {
|
||||||
const e = this.event
|
const e = this.event
|
||||||
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
||||||
return true;
|
return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.getElementById(`video-${pid}`).classList.toggle('d-none')
|
document.getElementById(`video-${pid}`).classList.toggle('d-none')
|
||||||
}
|
}
|
Loading…
Reference in New Issue