Skip to content

Commit

Permalink
Fix twemoji, privacy page error, and content security policy
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaisslaying committed Nov 2, 2024
1 parent 6dc503d commit 3f75f08
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/Markdown/privacy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Type of website: Discord bot, server and template advertising service
Effective date: 18th day of March, 2024
Effective date: 2nd day of November, 2024

# Preliminary provisions

Expand Down
2 changes: 1 addition & 1 deletion assets/Markdown/terms.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type of website: Discord bot, server and template advertising service

Effective date: 18th day of March, 2024
Effective date: 2nd day of November, 2024

# Preliminary provisions

Expand Down
1 change: 1 addition & 0 deletions src/Routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ router.get("/privacy", variables, async (req: Request, res: Response) => {
res.render("templates/legal/privacy", {
title: res.__("common.nav.more.privacy"),
subtitle: res.__("common.nav.more.privacy.subtitle"),
req,
privacy: await legalCache.getFile("privacy")
});
});
Expand Down
2 changes: 2 additions & 0 deletions src/Util/Function/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,7 @@ export const variables = async (
req.user.db.preferences.defaultForegroundColour || "#ffffff";
}

res.setHeader("Content-Security-Policy", "default-src 'self' 'unsafe-inline' status.discordextremelist.xyz cdn.jsdelivr.net cdnjs.cloudflare.com js.sentry-cdn.com fonts.googleapis.com fonts.gstatic.com; img-src *;");

next();
};
4 changes: 2 additions & 2 deletions views/partials/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
document.querySelectorAll(".navbar-link").forEach(function(e){e.addEventListener("click",function(){e.nextElementSibling.classList.toggle("is-hidden-touch")})});
console.log(`%cSTOP! DELLYTIME%c\n\nDEBUG INFORMATION:\n%cVersion/Channel: <%= req.del.version %>\nNode: <%= req.del.node %>\nResponse time: <%= Date.now() - requestedAt %>ms\n\nUser-Agent: ${navigator.userAgent}`,"color: red; font-size: xx-large; background-color: #000; padding: 10px; border-radius: 5px;","color: yellow; font-size: medium;","font-size: x-small;");
</script>
<script src="https://unpkg.com/twemoji@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
<script defer>twemoji.parse(document.body, {folder: 'svg', ext: '.svg'});<% if (preferredTheme === "light") { %>helpTranslateFlag=document.getElementById("helpUsSpan").getElementsByTagName("img")[0],helpTranslateFlag.src="https://twemoji.maxcdn.com/v/13.0.0/svg/1f3f4.svg",helpTranslateFlag.alt="🏴";<% } %></script>
<script src="https://cdn.jsdelivr.net/npm/@twemoji/api@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
<script defer>twemoji.parse(document.body, {folder: 'svg', ext: '.svg'});<% if (preferredTheme === "light") { %>helpTranslateFlag=document.getElementById("helpUsSpan").getElementsByTagName("img")[0],helpTranslateFlag.src="https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f3f4.svg",helpTranslateFlag.alt="🏴";<% } %></script>
<script src="/js/status.js" defer></script>
<% if (subtitle === "") { %><script async defer>let seizure=0;function invokeSeizureMode(){seizure+=1;if(seizure===3){seizureMode()}}function seizureMode(){alert("<%= __('page.home.seizureWarning') %>");const body=document.getElementById("siteContent");const hero=document.getElementsByClassName("hero")[0];let audio;if(Math.floor(Math.random()*10)+1>=10){audio=new Audio("/audio/nyan.mp3")}else{audio=new Audio("/audio/rick.mp3")}body.style.fontFamily="Comic Sans MS";document.getElementsByClassName("title")[0].innerText="Discord Seizure List:tm:!";document.getElementsByClassName("subtitle")[0].innerText="Discord's unbiased list, giving people seizures all across the world!";document.getElementById("delLogo").src = "/img/logo-seizuremode.png";audio.play();setInterval(()=>{setTimeout(()=>{body.style.backgroundColor="#ff1493";hero.style.backgroundColor="#ffffff"},0);setTimeout(()=>{body.style.backgroundColor="#ffffff";hero.style.backgroundColor="#ff1493"},20)},100)}</script><% } %>
</body>
Expand Down

0 comments on commit 3f75f08

Please sign in to comment.