Skip to content

Commit

Permalink
moved code
Browse files Browse the repository at this point in the history
  • Loading branch information
syxanash committed Jan 1, 2025
1 parent 48ab28c commit ceeddc6
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions assets/js/bluerain.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,17 +334,6 @@ function displayFilteredWords() {
});
}

toggleNSFWButton.innerText = nsfwDisplayed ? "Hide NSFW Posts" : "Display NSFW Posts";
toggleActiveButton(toggleNSFWButton, nsfwDisplayed);

toggleTextShadowButton.innerText = showTextShadow ? "Disable Text Shadow" : "Enable Text Shadow";
toggleActiveButton(toggleTextShadowButton, showTextShadow);

if (urlFilteredWords !== undefined) displayFilteredWords();
if (showEmojis) showEmojisButton.classList.add("active");
if (Util.isMobile()) fullscreenButtonContainer.style.display = "none";
if (Util.isFirefox()) firefoxShadowWarning.style.display = "inline";

ws.addEventListener("message", async (event) => {
if (animationPaused) return;

Expand Down Expand Up @@ -437,7 +426,6 @@ toggleNSFWButton.addEventListener("click", () => {
toggleActiveButton(toggleNSFWButton, nsfwDisplayed);
});


toggleFullscreenButton.addEventListener("click", () => {
playActionSound(changeSound);

Expand Down Expand Up @@ -468,7 +456,6 @@ document.querySelectorAll("button[id^='speedBtn']").forEach((speedButton) => {
});
});


document.querySelectorAll("button[id^='fontSizeBtn']").forEach((fontSizeButton) => {
fontSizeButton.addEventListener("click", (event) => {
const buttonNumber = event.target.id.match(/\d+$/)?.[0];
Expand Down Expand Up @@ -605,6 +592,17 @@ skeetCloseButton.addEventListener("click", () => {
skeetDialog.close();
});

toggleNSFWButton.innerText = nsfwDisplayed ? "Hide NSFW Posts" : "Display NSFW Posts";
toggleActiveButton(toggleNSFWButton, nsfwDisplayed);

toggleTextShadowButton.innerText = showTextShadow ? "Disable Text Shadow" : "Enable Text Shadow";
toggleActiveButton(toggleTextShadowButton, showTextShadow);

if (urlFilteredWords !== undefined) displayFilteredWords();
if (showEmojis) showEmojisButton.classList.add("active");
if (Util.isMobile()) fullscreenButtonContainer.style.display = "none";
if (Util.isFirefox()) firefoxShadowWarning.style.display = "inline";

console.log("%chttps://github.com/syxanash/bluerain", "font-size: medium");

requestAnimationFrame(loop);

0 comments on commit ceeddc6

Please sign in to comment.