forked from rDrama/rDrama
remove the bouncing/horiz picker when awarding to comments since not applicable
parent
85537087cc
commit
b21f3028cf
|
@ -94,6 +94,7 @@ let global_price;
|
||||||
|
|
||||||
const note_section = document.getElementById('note_section')
|
const note_section = document.getElementById('note_section')
|
||||||
const gif_button = note_section.querySelector('[title="Add GIF"]')
|
const gif_button = note_section.querySelector('[title="Add GIF"]')
|
||||||
|
const giveaward_button = document.getElementById('giveaward')
|
||||||
|
|
||||||
function pick(kind, price, coins, marseybux) {
|
function pick(kind, price, coins, marseybux) {
|
||||||
global_price = price;
|
global_price = price;
|
||||||
|
@ -118,6 +119,7 @@ function pick(kind, price, coins, marseybux) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == "emoji") {
|
if (kind == "emoji") {
|
||||||
|
if (giveaward_button.dataset.action.startsWith('/award/post/'))
|
||||||
document.getElementById('emoji_behavior_section').classList.remove("d-none")
|
document.getElementById('emoji_behavior_section').classList.remove("d-none")
|
||||||
document.getElementById('note').setAttribute("style", "min-height:35px;max-height:35px;height:35px;min-width:min(300px,80vw)")
|
document.getElementById('note').setAttribute("style", "min-height:35px;max-height:35px;height:35px;min-width:min(300px,80vw)")
|
||||||
gif_button.classList.add('d-none')
|
gif_button.classList.add('d-none')
|
||||||
|
@ -153,12 +155,12 @@ function pick(kind, price, coins, marseybux) {
|
||||||
|
|
||||||
if (ownednum) {
|
if (ownednum) {
|
||||||
document.getElementById('award_price').textContent = `${ownednum} owned`;
|
document.getElementById('award_price').textContent = `${ownednum} owned`;
|
||||||
document.getElementById('giveaward').classList.remove('d-none');
|
giveaward_button.classList.remove('d-none');
|
||||||
document.getElementById('buyandgiveaward').classList.add('d-none');
|
document.getElementById('buyandgiveaward').classList.add('d-none');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.getElementById('award_price').textContent = `Price: ${price} coins/marseybux`;
|
document.getElementById('award_price').textContent = `Price: ${price} coins/marseybux`;
|
||||||
document.getElementById('giveaward').classList.add('d-none');
|
giveaward_button.classList.add('d-none');
|
||||||
document.getElementById('buyandgiveaward').classList.remove('d-none');
|
document.getElementById('buyandgiveaward').classList.remove('d-none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,6 +191,14 @@ document.addEventListener("click", function (e) {
|
||||||
document.getElementById('giveaward').dataset.action = element.dataset.url
|
document.getElementById('giveaward').dataset.action = element.dataset.url
|
||||||
document.getElementById('buyandgiveaward').dataset.action = element.dataset.url
|
document.getElementById('buyandgiveaward').dataset.action = element.dataset.url
|
||||||
|
|
||||||
|
const currently_picked = document.getElementById("awardModal").getElementsByClassName('picked')[0]
|
||||||
|
if (currently_picked && currently_picked.id == 'emoji') {
|
||||||
|
if (element.dataset.url.startsWith('/award/post/'))
|
||||||
|
document.getElementById('emoji_behavior_section').classList.remove("d-none")
|
||||||
|
else
|
||||||
|
document.getElementById('emoji_behavior_section').classList.add("d-none")
|
||||||
|
}
|
||||||
|
|
||||||
const effect_author_tab = document.getElementById('effect-author-tab')
|
const effect_author_tab = document.getElementById('effect-author-tab')
|
||||||
const effect_content_tab = document.getElementById('effect-content-tab')
|
const effect_content_tab = document.getElementById('effect-content-tab')
|
||||||
const effect_author_section = document.getElementById('effect-author-section')
|
const effect_author_section = document.getElementById('effect-author-section')
|
||||||
|
|
Loading…
Reference in New Issue