diff options
author | Rory& <myrainbowdash949@gmail.com> | 2024-02-19 10:09:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 21:09:50 +1100 |
commit | 29df169c81d963742cc973a8835a7c1a126d7220 (patch) | |
tree | 7db8092c20e187ff812f8b9f71b28c5c25641d56 /assets | |
parent | Fix application icons (#1110) (diff) | |
download | server-29df169c81d963742cc973a8835a7c1a126d7220.tar.xz |
Add nix flake to repo (#1111)
Diffstat (limited to 'assets')
-rw-r--r-- | assets/inline-plugins/.gitkeep | 0 | ||||
-rw-r--r-- | assets/plugins/.gitkeep | 0 | ||||
-rw-r--r-- | assets/preload-plugins/.gitkeep | 0 | ||||
-rw-r--r-- | assets/preload-plugins/checkLocale.js | 38 | ||||
-rw-r--r-- | assets/preload-plugins/oauth2.js | 9 | ||||
-rw-r--r-- | assets/public/fosscord-login.css | 68 | ||||
-rw-r--r-- | assets/public/fosscord.css | 92 | ||||
-rw-r--r-- | assets/public/user.css | 1 | ||||
-rw-r--r-- | assets/webrtc.js | 82 |
9 files changed, 0 insertions, 290 deletions
diff --git a/assets/inline-plugins/.gitkeep b/assets/inline-plugins/.gitkeep deleted file mode 100644 index e69de29b..00000000 --- a/assets/inline-plugins/.gitkeep +++ /dev/null diff --git a/assets/plugins/.gitkeep b/assets/plugins/.gitkeep deleted file mode 100644 index e69de29b..00000000 --- a/assets/plugins/.gitkeep +++ /dev/null diff --git a/assets/preload-plugins/.gitkeep b/assets/preload-plugins/.gitkeep deleted file mode 100644 index e69de29b..00000000 --- a/assets/preload-plugins/.gitkeep +++ /dev/null diff --git a/assets/preload-plugins/checkLocale.js b/assets/preload-plugins/checkLocale.js deleted file mode 100644 index 1b5e7b71..00000000 --- a/assets/preload-plugins/checkLocale.js +++ /dev/null @@ -1,38 +0,0 @@ -const supportedLocales = [ - "bg", - "cs", - "da", - "de", - "el", - "en-GB", - "es-ES", - "fi", - "fr", - "hi", - "hr", - "hu", - "it", - "ja", - "ko", - "lt", - "nl", - "no", - "pl", - "pt-BR", - "ro", - "ru", - "sv-SE", - "th", - "tr", - "uk", - "vi", - "zh-CN", - "zh-TW" -]; - -const settings = JSON.parse(window.localStorage.getItem("UserSettingsStore")); -if (settings && !supportedLocales.includes(settings.locale)) { - // fix client locale wrong and client not loading at all - settings.locale = "en-US"; - window.localStorage.setItem("UserSettingsStore", JSON.stringify(settings)); -} \ No newline at end of file diff --git a/assets/preload-plugins/oauth2.js b/assets/preload-plugins/oauth2.js deleted file mode 100644 index 5b78ec83..00000000 --- a/assets/preload-plugins/oauth2.js +++ /dev/null @@ -1,9 +0,0 @@ -// Fixes /oauth2 endpoints not requesting a CSS file - -if (location.pathname.startsWith("/oauth2/")) { - const link = document.createElement("link"); - link.rel = "stylesheet" - link.type = "text/css" - link.href = "/assets/40532.f7b1e10347ef10e790ac.css" - document.head.appendChild(link) -} \ No newline at end of file diff --git a/assets/public/fosscord-login.css b/assets/public/fosscord-login.css deleted file mode 100644 index e66e70a0..00000000 --- a/assets/public/fosscord-login.css +++ /dev/null @@ -1,68 +0,0 @@ -/* replace tos acceptance popup */ -#app-mount > div:nth-child(7) > div > div > div.tooltipContent-bqVLWK { - visibility: hidden; -} -#app-mount > div:nth-child(7) > div > div > div.tooltipContent-bqVLWK::after { - visibility: visible; - display: block; - content: "You need to agree to this instance's rules to continue"; - margin-top: -32px; -} -/* replace login header */ -#app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.mainLoginContainer-1ddwnR > h3 { - visibility: hidden; -} -h3.title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO::after { - margin-top: -32px; - content: "Welcome to Spacebar!"; - visibility: visible; - display: block; -} - -/* Logo in top left when bg removed */ -#app-mount > div.app-1q1i1E > div > a { - /* replace me: original dimensions: 130x36 */ - background: url(https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/branding/svg/Spacebar__Logo-Blue.svg); - width: 130px; - height: 23px; - background-size: contain; -} - -/* replace TOS text */ - -#app-mount - > div.app-1q1i1E - > div - > div - > div - > form - > div - > div - > div.flex-1xMQg5.flex-1O1GKY.horizontal-1ae9ci.horizontal-2EEEnY.flex-1O1GKY.directionRow-3v3tfG.justifyStart-2NDFzi.alignCenter-1dQNNs.noWrap-3jynv6.marginTop20-3TxNs6 - > label - > div.label-cywgfr.labelClickable-11AuB8.labelForward-1wfipV - > * { - visibility: hidden; -} - -#app-mount - > div.app-1q1i1E - > div - > div - > div - > form - > div - > div - > div.flex-1xMQg5.flex-1O1GKY.horizontal-1ae9ci.horizontal-2EEEnY.flex-1O1GKY.directionRow-3v3tfG.justifyStart-2NDFzi.alignCenter-1dQNNs.noWrap-3jynv6.marginTop20-3TxNs6 - > label - > div.label-cywgfr.labelClickable-11AuB8.labelForward-1wfipV::after { - visibility: visible; - content: "I have read and agree with the rules set by this instance."; - display: block; - margin-top: -16px; -} - -/* shrink login box to same size as register */ -.authBoxExpanded-2jqaBe { - width: 480px !important; -} \ No newline at end of file diff --git a/assets/public/fosscord.css b/assets/public/fosscord.css deleted file mode 100644 index 53ffd41b..00000000 --- a/assets/public/fosscord.css +++ /dev/null @@ -1,92 +0,0 @@ -/* loading spinner */ -#app-mount > div.app-1q1i1E > div.container-16j22k.fixClipping-3qAKRb > div.content-1-zrf2 > video { - filter: opacity(1); - background: url("http://www.clipartbest.com/cliparts/7ca/6Rr/7ca6RrLAi.gif"); - background-size: contain; - /* width: 64px; - height: 64px; */ - padding-bottom: 64px; - background-repeat: no-repeat; -} - -/* home button icon */ -#app-mount - > div.app-1q1i1E - > div - > div.layers-3iHuyZ.layers-3q14ss - > div - > div - > nav - > ul - > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih - > div.tutorialContainer-2sGCg9 - > div - > div.listItemWrapper-KhRmzM - > div - > svg - > foreignObject - > div - > div { - background-image: url(https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/branding/svg/Spacebar__Icon-Rounded-Subtract.svg); - background-size: contain; - border-radius: 50%; -} - -#app-mount - > div.app-1q1i1E - > div - > div.layers-3iHuyZ.layers-3q14ss - > div - > div - > nav - > ul - > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih - > div.tutorialContainer-2sGCg9 - > div - > div.listItemWrapper-KhRmzM - > div - > svg - > foreignObject - > div - > div, -#app-mount - > div.app-1q1i1E - > div - > div.layers-3iHuyZ.layers-3q14ss - > div - > div - > nav - > ul - > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih - > div.tutorialContainer-2sGCg9 - > div - > div.listItemWrapper-KhRmzM - > div - > svg - > foreignObject - > div - > div:hover { - background-color: white; -} -/* Login QR */ -#app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.transitionGroup-aR7y1d.qrLogin-1AOZMt, -#app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.verticalSeparator-3huAjp, -/* Remove login bg */ -#app-mount > div.app-1q1i1E > div > svg, -/* Download bar */ -#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > div > div.notice-3bPHh-.colorDefault-22HBa0, -/* Connection problem links */ -#app-mount > div.app-1q1i1E > div.container-16j22k.fixClipping-3qAKRb > div.problems-3mgf6w.slideIn-sCvzGz > div:nth-child(2), -/* Downloads button */ -#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div:nth-child(7) > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div, -#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div:nth-child(6) > div, -/* help button */ -#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > div > div.content-98HsJk > div.chat-3bRxxu > section > div.toolbar-1t6TWx > a, -/* download button start of guild */ -#chat-messages-899316648933185083 > div > div > div:nth-child(5), -/* Thread permissions etc popups */ -#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > div > div.content-98HsJk > div.sidebar-2K8pFh.hasNotice-1XRy4h > nav > div.container-3O_wAf, -/* home button icon */ -#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div.tutorialContainer-2sGCg9 > div > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div > div > svg { - display: none; -} \ No newline at end of file diff --git a/assets/public/user.css b/assets/public/user.css deleted file mode 100644 index a7e5c4f3..00000000 --- a/assets/public/user.css +++ /dev/null @@ -1 +0,0 @@ -/* Your custom CSS goes here, enjoy! */ \ No newline at end of file diff --git a/assets/webrtc.js b/assets/webrtc.js deleted file mode 100644 index b56e41c4..00000000 --- a/assets/webrtc.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - This file is used to patch client version 134842 ( and probably a lot more ) to send additional info when using webrtc. - If you want to use it, throw it into the `preload-plugins` folder. - TODO: Make it so this file is not required for webrtc. - - Do note that webrtc, as of 17/12/2022, is not implemented yet in spacebarchat/server. -*/ - -(this.webpackChunkdiscord_app = this.webpackChunkdiscord_app || []).push([ - [[228974]], - { - 632540: (module, exports, req) => { - window.find = (filter, options = {}) => { - const { cacheOnly = false } = options; - for (let i in req.c) { - if (req.c.hasOwnProperty(i)) { - let m = req.c[i].exports; - if (m && m.__esModule && m.default && filter(m.default)) return m.default; - if (m && filter(m)) return m; - } - } - if (cacheOnly) { - console.warn("Cannot find loaded module in cache"); - return null; - } - console.warn("Cannot find loaded module in cache. Loading all modules may have unexpected side effects"); - for (let i = 0; i < req.m.length; ++i) { - let m = req(i); - if (m && m.__esModule && m.default && filter(m.default)) return m.default; - if (m && filter(m)) return m; - } - console.warn("Cannot find module"); - return null; - }; - window.findByUniqueProperties = (propNames, options) => - find((module) => propNames.every((prop) => module[prop] !== undefined), options); - window.findByDisplayName = (displayName, options) => find((module) => module.displayName === displayName, options); - window.req = req; - - init(); - } - }, - (t) => t(632540) -]); - -function retry(callback) { - return new Promise((resolve) => { - const interval = setInterval(() => { - const mod = callback(); - if (!mod) return; - - clearInterval(interval); - resolve(mod); - }, 50); - }); -} - -async function init() { - const SDP = await retry(() => findByUniqueProperties(["truncateSDP"])); - const StringManipulator = findByUniqueProperties(["uniq"]); - - const truncateSDP = SDP.truncateSDP; - SDP.truncateSDP = (e) => { - const result = truncateSDP(e); - const i = result.codecs.find((x) => x.name === "VP8"); - const a = new RegExp("^a=ice|a=extmap|opus|VP8|fingerprint|" + i?.rtxPayloadType + " rtx", "i"); - return { - sdp: StringManipulator(e) - .split(/\r\n/) - .filter(function (e) { - return a.test(e); - }) - .uniq() - .join("\n"), - codecs: result.codecs - }; - }; - // SDP.generateUnifiedSessionDescription = (e) => { - // console.log(e); - // return new RTCSessionDescription({ sdp: e.baseSDP.replace(/sendonly/g, "recvonly"), type: "answer" }); - // }; -} \ No newline at end of file |