diff --git a/files/assets/css/main.css b/files/assets/css/main.css index e3b65b73df..bedd99d91e 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -5590,12 +5590,12 @@ span > img[src$="/i/talking.webp"]+img[src$="/i/hand.webp"]+img { span > img[src$="/i/love-foreground.webp"]+img[src$="/i/love-background.webp"]+img { position: absolute; z-index: 50; - height: 60%; - width: 60%; + height: 60%; + width: 60%; bottom: -2%; - left: 33%; - transform: scaleX(-1) rotate(-10deg); - -webkit-transform: scaleX(-1) rotate(-10deg); + left: 33%; + transform: scaleX(-1) rotate(-10deg); + -webkit-transform: scaleX(-1) rotate(-10deg); } span > img[src$="/i/love-foreground.webp"] { @@ -6758,13 +6758,13 @@ g { .rainbow-text:not(a) { background-image: repeating-linear-gradient(135deg, violet, rgb(178, 94, 238), lightblue, green, yellow, orange, #ff7f7f 50%) !important; color: transparent !important; + font-weight: 700 !important; background-clip: text !important; -webkit-background-clip: text !important; - font-weight: 700 !important; } -.queen:not(a) { - color: hotpink !important; +.queen:not(a):not(.ectoplasm) { + color: hotpink; font-weight: 700 !important; text-transform: lowercase !important; } @@ -7085,7 +7085,7 @@ div.markdown { } .resizable.yt { display: block; - width: min(100%, 500px); + width: min(100%, 500px); } .resizable > * { height: 95% !important; @@ -7713,17 +7713,17 @@ body { } * { - word-break: break-word !important; + word-break: break-word !important; overflow-wrap: break-word !important; } .table *, .playing-card_large { - word-break: keep-all !important; + word-break: keep-all !important; } .user-card-bio { max-height: 50px; - overflow-y: auto; + overflow-y: auto; } .profile-pic, .profile-pic-20, .pp20, .profile-pic-25, .profile-pic-30, .profile-pic-35, .profile-pic-50, .profile-pic-65, .profile-pic-75, .profile-pic-100, img[src^="/pp/"], img[src^="/uid/"], img[src$="/pic"] { diff --git a/files/assets/css/themes/classic.css b/files/assets/css/themes/classic.css index 51ef1d83cd..80a3dce9d8 100644 --- a/files/assets/css/themes/classic.css +++ b/files/assets/css/themes/classic.css @@ -181,7 +181,7 @@ blockquote a { background-color: #d9d9d9 !important; } *:target { - background: rgba(var(--primary_rgb), 0.2) !important; + background: rgba(var(--primary_rgb), 0.2) !important; } /*userpage*/ diff --git a/files/assets/css/themes/classic_dark.css b/files/assets/css/themes/classic_dark.css index 0b60f988c1..55cfb8264e 100644 --- a/files/assets/css/themes/classic_dark.css +++ b/files/assets/css/themes/classic_dark.css @@ -14,5 +14,5 @@ } .unread { - background-color: #3d3d3d !important; + background-color: #3d3d3d !important; } diff --git a/files/assets/css/themes/dark.css b/files/assets/css/themes/dark.css index c0432476e4..74c90c770d 100644 --- a/files/assets/css/themes/dark.css +++ b/files/assets/css/themes/dark.css @@ -102,5 +102,5 @@ pre { } *:target { - background: rgba(var(--primary_rgb), 0.2) !important; + background: rgba(var(--primary_rgb), 0.2) !important; } diff --git a/files/assets/css/themes/light.css b/files/assets/css/themes/light.css index 3e2a52d002..7de8bf4f5c 100644 --- a/files/assets/css/themes/light.css +++ b/files/assets/css/themes/light.css @@ -80,7 +80,7 @@ blockquote { background: #dddddd !important; } *:target { - background: rgba(var(--primary_rgb), 0.2) !important; + background: rgba(var(--primary_rgb), 0.2) !important; } .visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited { @@ -88,5 +88,5 @@ blockquote { } .award-name { - color: var(--black); + color: var(--black); } diff --git a/files/assets/css/themes/win98.css b/files/assets/css/themes/win98.css index 6c1d5a1c9c..4a418983de 100644 --- a/files/assets/css/themes/win98.css +++ b/files/assets/css/themes/win98.css @@ -179,9 +179,9 @@ blockquote { } .award-name { - color: var(--black); + color: var(--black); } .modal-content { - background-color: var(--gray-500); + background-color: var(--gray-500); } diff --git a/files/assets/events/DKD/js/music.js b/files/assets/events/DKD/js/music.js index 58906f1332..61d342c24f 100644 --- a/files/assets/events/DKD/js/music.js +++ b/files/assets/events/DKD/js/music.js @@ -1,6 +1,6 @@ -const song = document.getElementById('DKD-song').value; +const song = document.getElementById('event-song').value; const audio = new Audio(song); -audio.loop=true; +audio.loop = true; audio.play(); document.addEventListener('click', () => { diff --git a/files/assets/events/fistmas/css/candycane.css b/files/assets/events/fistmas/css/candycane.css index 0907c4a4a4..333c6dc8a0 100644 --- a/files/assets/events/fistmas/css/candycane.css +++ b/files/assets/events/fistmas/css/candycane.css @@ -9,14 +9,18 @@ background-clip: text; color: transparent; -webkit-background-clip: text; - animation: 45s linear 0s infinite candycorn-move; + animation: 45s linear 0s infinite candy-corn-move; } #post-title a { color: transparent !important; } -@keyframes candycorn-move { +#post-title:hover, #post-content p:hover { + animation-duration: 10s; +} + +@keyframes candy-corn-move { from {background-position: 0px;} to {background-position: 1000px;} } diff --git a/files/assets/events/fistmas/css/fistmas.css b/files/assets/events/fistmas/css/fistmas_main.css similarity index 98% rename from files/assets/events/fistmas/css/fistmas.css rename to files/assets/events/fistmas/css/fistmas_main.css index 9410ce5307..01b6d5cefa 100644 --- a/files/assets/events/fistmas/css/fistmas.css +++ b/files/assets/events/fistmas/css/fistmas_main.css @@ -51,7 +51,7 @@ body { border-color: var(--primary) !important; } -.btn { +.btn:not(.award-tab, .shop-tab) { background: var(--primary) !important; border-color: var(--primary) !important; border-width: 2px; @@ -470,7 +470,6 @@ body { } -/* asdf */ blockquote { background-color: var(--gray-300); } @@ -482,3 +481,10 @@ blockquote { #profile--bio { color: white !important; } + +/* Eyes */ +.eye { + position: relative; + width: 26px; + height: 26px; +} diff --git a/files/assets/events/fistmas/images/sidebar/2.webp b/files/assets/events/fistmas/images/sidebar/1.webp similarity index 100% rename from files/assets/events/fistmas/images/sidebar/2.webp rename to files/assets/events/fistmas/images/sidebar/1.webp diff --git a/files/assets/events/homoween/audio/haunted/thunder1.mp3 b/files/assets/events/homoween/audio/haunted/thunder1.mp3 new file mode 100644 index 0000000000..2430c44c1d Binary files /dev/null and b/files/assets/events/homoween/audio/haunted/thunder1.mp3 differ diff --git a/files/assets/events/homoween/audio/haunted/thunder2.mp3 b/files/assets/events/homoween/audio/haunted/thunder2.mp3 new file mode 100644 index 0000000000..fb7a570622 Binary files /dev/null and b/files/assets/events/homoween/audio/haunted/thunder2.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/Ambush jumpscare but animated.mp3 b/files/assets/events/homoween/audio/jumpscares/Ambush jumpscare but animated.mp3 new file mode 100644 index 0000000000..7c264ffffc Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/Ambush jumpscare but animated.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/Doors Rush jumpscare.mp3 b/files/assets/events/homoween/audio/jumpscares/Doors Rush jumpscare.mp3 new file mode 100644 index 0000000000..93dca87b39 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/Doors Rush jumpscare.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/Fnaf 2 jumpscare sound effect.mp3 b/files/assets/events/homoween/audio/jumpscares/Fnaf 2 jumpscare sound effect.mp3 new file mode 100644 index 0000000000..d6415bf601 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/Fnaf 2 jumpscare sound effect.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/dancing rat jumpscare.mp3 b/files/assets/events/homoween/audio/jumpscares/dancing rat jumpscare.mp3 new file mode 100644 index 0000000000..727d42a704 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/dancing rat jumpscare.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/scream_test_1.mp3 b/files/assets/events/homoween/audio/jumpscares/scream_test_1.mp3 new file mode 100644 index 0000000000..32ae5bb594 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/scream_test_1.mp3 differ diff --git a/files/assets/events/homoween/css/awards_poor.css b/files/assets/events/homoween/css/awards_poor.css new file mode 100644 index 0000000000..c7ec9279d5 --- /dev/null +++ b/files/assets/events/homoween/css/awards_poor.css @@ -0,0 +1,26 @@ +.poor { + position: fixed; + background-repeat: no-repeat; + width: 100%; + height: 100%; + pointer-events:none; +} + +#fog-effect-poor { + background-image: url(/assets/events/homoween/images/poor/fog.webp); + background-size: cover; + z-index: 9998; + opacity:0.7; +} + +#stab-effect-poor { + background-image: url(/assets/events/homoween/images/poor/blood.webp); + z-index: 9997; +} + +#flashlight-effect-poor { + background-image: url(/assets/events/homoween/images/poor/flashlight.webp); + z-index: 9995; + background-size: cover; + background-position: center; +} diff --git a/files/assets/events/homoween/css/banner.css b/files/assets/events/homoween/css/banner.css new file mode 100644 index 0000000000..950d149b28 --- /dev/null +++ b/files/assets/events/homoween/css/banner.css @@ -0,0 +1,231 @@ +/* text */ +#banner-homoween-title.life > tspan { + opacity: 1; +} +#banner-homoween-title { + text-shadow: 0 4px 10px #ff000060; +} +#banner-homoween-title.life > #banner-homoween-title { + animation: blinker 0.5s forwards; +} +@media (max-width: 767.98px) { + #banner-homoween-title { + transform: scale(1.4) translate(-90px, -120px); + animation:none !important; + } + #banner-homoween-presenting { + transform: scale(1.4) translate(-90px, -120px); + } + #banner-homoween-bats { + display:none; + } +} + +@keyframes float { + 0% { + transform: translateY(0px); + } + 50% { + transform: translateY(-6px); + } + 100% { + transform: translateY(0px); + } +} +@keyframes blinker { + 10% { + opacity: 0; + } + , + 30% { + opacity: 0.4; + } + , + 60% { + opacity: 0.2; + } + , + 85% { + opacity: 0.5; + } + , + 100% { + opacity: 0.9; + } +} + +/*days*/ +:root { + /*sky*/ + --sky-gradient-day1: radial-gradient(at bottom, #d43a27 25%, #761ab3 100%); + --sky-gradient-day2: radial-gradient(at bottom, #bf055c 25%, #6b007d 70%); + --sky-gradient-day3: radial-gradient(at bottom, #bf0583 5%, #560272 60%); + --sky-gradient-day4: radial-gradient(at bottom, #930184 -15%, #490272 60%); + --sky-gradient-day5: radial-gradient(at bottom, #800073 -55%, #400179 60%); + --sky-gradient-day6: radial-gradient(at bottom, #69017a 25%, #390271 70%); + --sky-gradient-day7: radial-gradient(at bottom, #69017a 25%, #2d005b 70%); + --sky-gradient-day8: radial-gradient(at bottom, #af00a6 -20%, #270146 70%); + --sky-gradient-day9: radial-gradient(at bottom, #69047b -10%, #1e0037 70%); + --sky-gradient-day10: radial-gradient(at bottom, #59047b 10%, #150026 70%); + + /*moon*/ + --moon-fill-day1:gold; + --moon-fill-day2:gold; + --moon-fill-day3:goldenrod; + --moon-fill-day4:none; + --moon-fill-day5:none; + --moon-fill-day6:#e4e4e4; + --moon-fill-day7:#e4e4e4; + --moon-fill-day8:#e4e4e4; + --moon-fill-day9:#e4e4e4; + --moon-fill-day10:#e4e4e4; + + --moon-shadow-day1:drop-shadow(0px 0px 20px yellow); + --moon-shadow-day2:drop-shadow(0px 0px 20px yellow); + --moon-shadow-day3:drop-shadow(0px 0px 20px gold); + --moon-shadow-day4:none; + --moon-shadow-day5:none; + --moon-shadow-day6:drop-shadow(0px 0px 5px #deddcf); + --moon-shadow-day7:drop-shadow(0px 0px 10px #deddcf); + --moon-shadow-day8:drop-shadow(0px 0px 10px #deddcf); + --moon-shadow-day9:drop-shadow(0px 0px 10px #deddcf); + --moon-shadow-day10:drop-shadow(0px 0px 10px #deddcf); + + --moon-position-day1:303px; + --moon-position-day2:308px; + --moon-position-day3:320px; + --moon-position-day4:350px; + --moon-position-day5:350px; + --moon-position-day6:322px; + --moon-position-day7:312px; + --moon-position-day8:308px; + --moon-position-day9:303px; + --moon-position-day10:300px; + + /*ground*/ + --ground-shadow-day1:#5818bd; + --ground-shadow-day2:#5818bd; + --ground-shadow-day3:#5818bd; + --ground-shadow-day4:#5818bd; + --ground-shadow-day5:#5818bd; + --ground-shadow-day6:#5818bd; + --ground-shadow-day7:#4e16a6; + --ground-shadow-day8:#51009a; + --ground-shadow-day9:#4b028c; + --ground-shadow-day10:#41017b; + + --house-shadow-day1:#5818bd; + --house-shadow-day2:#5818bd; + --house-shadow-day3:#5818bd; + --house-shadow-day4:#5818bd; + --house-shadow-day5:#5818bd; + --house-shadow-day6:#5818bd; + --house-shadow-day7:#5818bd; + --house-shadow-day8:#4a149f; + --house-shadow-day9:#431290; + --house-shadow-day10:#3a1476; + + --object-fill-day1:#240441; + --object-fill-day2:#240441; + --object-fill-day3:#240441; + --object-fill-day4:#240441; + --object-fill-day5:#240441; + --object-fill-day6:#240441; + --object-fill-day7:#240441; + --object-fill-day8:#1e0538; + --object-fill-day9:#18042c; + --object-fill-day10:#18042c; + + --star-opacity-day1: 0; + --star-opacity-day2: 0; + --star-opacity-day3: 0; + --star-opacity-day4: 0.2; + --star-opacity-day5: 0.3; + --star-opacity-day6: 0.4; + --star-opacity-day7: 0.5; + --star-opacity-day8: 0.5; + --star-opacity-day9: 0.6; + --star-opacity-day10: 0.7; +} + +/* stars */ +.star { + animation: linear infinite alternate twinkle; +} + +.star1 { + animation-duration: 3s; +} + +.star2 { + animation-duration: 4s; +} + +.star3 { + animation-duration: 3.5s; +} + +.star4 { + animation-duration: 2s; +} + +.star5 { + animation-duration: 4s; +} + +.star1 circle { + r: 0.5px; +} +.star2 circle { + r: 0.75px; +} +.star3 circle { + r: 1.0px; +} +.star4 circle { + r: 1.2px; +} +.star5 circle { + r: 1.5px; +} + +@media (max-width: 767.98px) { + .star { + animation: none; + fill-opacity: 0.5; + } + .star1 circle { + r: 1px; + } + .star2 circle { + r: 1.5px; + } + .star3 circle { + r: 2px; + } + .star4 circle { + r: 2px; + } + .star5 circle { + r: 2.5px; + } +} + +@keyframes twinkle { + 0% { + opacity: 1; + } + 50% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +#banner-homoween-title { + animation: float infinite 8s ease-in-out; +} +#banner-homoween-title > tspan { + opacity: 0; +} diff --git a/files/assets/events/homoween/css/ectoplasm.css b/files/assets/events/homoween/css/ectoplasm.css new file mode 100644 index 0000000000..d87586d685 --- /dev/null +++ b/files/assets/events/homoween/css/ectoplasm.css @@ -0,0 +1,4 @@ +#banner-homoween-title { + text-shadow: 0 0 40px #3AE63A; + fill: #90ee90; +} diff --git a/files/assets/events/homoween/css/flashlight.css b/files/assets/events/homoween/css/flashlight.css new file mode 100644 index 0000000000..fe85cac3ff --- /dev/null +++ b/files/assets/events/homoween/css/flashlight.css @@ -0,0 +1,40 @@ +#flashlight-effect { + --Xpos: 50vw; + --Ypos: 50vh; + position: fixed; + width:100%; + height:100%; + z-index:1061; + pointer-events:none; + opacity:0.8; + /*looks better but is too expensive to justify :(*/ + backdrop-filter: brightness(1.5); + background-color: rgba(256,256,256,0.06); +} +#flashlight-effect:before { + content: ""; + display: block; + width: 100%; + height: 100%; + position: absolute; + pointer-events: none; + background: radial-gradient( + circle 30vmax at var(--Xpos) var(--Ypos), + rgba(0,0,0,0) 0%, + rgba(0,0,0,.5) 70%, + rgba(0,0,0,.93) 100% + ); + z-index: 1061; +} +@media (max-width: 767.98px) { + #flashlight-effect::before { + background: radial-gradient( + circle 20em at 50% var(--Ypos), + rgba(0,0,0,0) 0%, + rgba(0,0,0,0) 80%, + rgba(0,0,0,.93) 100% + ); + opacity:0.9; + pointer-events: none; + } +} diff --git a/files/assets/events/homoween/css/haunted.css b/files/assets/events/homoween/css/haunted.css new file mode 100644 index 0000000000..09c1d490c1 --- /dev/null +++ b/files/assets/events/homoween/css/haunted.css @@ -0,0 +1,21 @@ +#haunted-effect { + position: fixed; + width:100%; + height:100%; + pointer-events:none; +} +#haunt-bg { + position: fixed; + background-repeat: no-repeat; + width: 100%; + height: 100%; + pointer-events:none; + background-color: var(--background); + z-index:0; +} +#banner-homoween-title { + opacity: 0; +} +#banner-homoween-text-evil { + opacity: 1 !important; +} diff --git a/files/assets/events/homoween/css/haunted2.css b/files/assets/events/homoween/css/haunted2.css new file mode 100644 index 0000000000..a585593da1 --- /dev/null +++ b/files/assets/events/homoween/css/haunted2.css @@ -0,0 +1,3 @@ +img { + filter: invert(1); +} diff --git a/files/assets/events/homoween/css/homoween_main.css b/files/assets/events/homoween/css/homoween_main.css new file mode 100644 index 0000000000..e0c69aabf5 --- /dev/null +++ b/files/assets/events/homoween/css/homoween_main.css @@ -0,0 +1,879 @@ +@charset "UTF-8"; + +/* Fonts */ +@font-face { + font-family: 'Creepster'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url("/assets/events/homoween/fonts/Creepster.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "DoubleFeature"; + src: url("/assets/events/homoween/fonts/DoubleFeature.woff") format("woff"); +} + +@font-face { + font-family: "Jo_wrote_a_lovesong"; + src: url("/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff") format("woff"); +} + +@font-face { + font-family: "XTypewriter-Regular"; + src: url("/assets/events/homoween/fonts/XTypewriter-Regular.woff") format("woff"); +} + +@font-face { + font-family: "SpecialElite-Regular"; + src: url("/assets/events/homoween/fonts/SpecialElite-Regular.woff") format("woff"); +} + +/* Homoween Theming */ +:root { + --primary: #F66A3C; + --dark: #140224; + --secondary: #820263; + --white: #E1E1E1; + --black: #CFCFCF; + --light: #170535; + --muted: #E1E1E1; + --gray: #383838; + --gray-100: #E1E1E1; + --gray-200: #E1E1E1; + --gray-300: #291720; + --gray-400: #303030; + --gray-500: var(--dark); + --gray-600: var(--dark); + --gray-700: var(--dark); + --gray-800: var(--dark); + --gray-900: var(--dark); + --background: var(--dark); +} + +body { + overflow-x: hidden; +} + +#header--icon { + height: 33px; + width: 33px; + object-fit: contain; +} + +* { + border-color: var(--primary); +} + +a:hover.user-name { + cursor: url('/assets/events/homoween/images/machete.webp'), auto !important; +} + +.border { + border-color: var(--primary) !important; +} + +.form-control { + background: transparent; + border-color: var(--primary) !important; +} + +.btn { + background: transparent; + border-color: var(--primary) !important; + border-width: 2px; +} + +.form-control:disabled, .form-control[readonly] { + background: transparent; + border-color: var(--primary) !important; +} + +.btn-success { + border-color: #38A169 !important; +} + +.btn-danger { + border-color: #E53E3E !important; +} + +#frontpage .pseudo-submit-form.card .card-body .form-control { + border-color: transparent !important; +} + +.btn-lg { + border-color: transparent !important; +} + +pre { + color: #CFCFCF; +} + +.transparent { + background: None !important; +} + +#frontpage .post-title a:visited { + color: #7a7a7a !important; +} + +.post-title a, h1.post-title { + font-family: 'SpecialElite-Regular'; + font-size: 1.25rem; +} + +.arrow-up::before, .arrow-down::before { + content: '\f720'; + width: 20px; +} + +.arrow-down::before { + display: inline-block; + transform: rotate(180deg); +} + +#thread .arrow-up::before, #thread .arrow-down::before { + content: '\f720'; + width: 17px; + } + +/* Cob Webs */ +body::before { + content: ''; + position: fixed; + background-image: url('/assets/events/homoween/images/cobweb-bl.webp'); + background-size: contain; + background-repeat: no-repeat; + left: -1.5rem; + bottom: -1.5rem; + width: 170px; + height: 230px; + z-index: 10001; + pointer-events: none; + transform: rotate(180deg); + opacity: .5; +} + +body::after { + content: ''; + position: fixed; + background-image: url('/assets/events/homoween/images/cobweb-tr.webp'); + background-size: contain; + background-repeat: no-repeat; + right: -1.5rem; + top: -1.5rem; + width: 160px; + height: 160px; + z-index: 10001; + pointer-events: none; + opacity: .45; +} + +/* Blood Effect */ +.blood::before { + content: ''; + position: absolute; + background-image: url('/assets/events/homoween/images/blood-anim.webp'); + width: 100%; + height: 55px; + background-repeat: repeat-x; + top: 0; + left: 0; +} + +.blood { + position: relative; +} + +.blood .comment-text { + color: #dc3545 !important; + font-family: 'DoubleFeature'; +} + +.sketch { + z-index: 10000; + position: fixed; + top: 0; + left: 0; + pointer-events: none; +} + +/* Haunted Effect */ +.haunt > div:not(.modal) { + animation: haunted 10s infinite; +} + +@keyframes haunted { + 0% { + backdrop-filter: brightness(20%); + } + 1% { + backdrop-filter: brightness(20%); + } + 2% { + backdrop-filter: sepia(0.8) contrast(1.5) brightness(200%); + } + 3% { + backdrop-filter: sepia(0.8) contrast(1.5) brightness(20%); + } + 4% { + backdrop-filter: brightness(300%); + } + 7% { + backdrop-filter: brightness(1); + } + 100% { + backdrop-filter: brightness(1); + } +} + +@keyframes haunted-upsidedown { + 0% { + backdrop-filter: brightness(20%) sepia(1) saturate(3) hue-rotate(180deg); + } + 1% { + backdrop-filter: brightness(20%) sepia(1) saturate(3) hue-rotate(180deg); + } + 2% { + backdrop-filter: sepia(1) contrast(1.5) brightness(200%) saturate(3) hue-rotate(180deg); + } + 3% { + backdrop-filter: sepia(1) contrast(1.5) brightness(20%) saturate(3) hue-rotate(180deg); + } + 4% { + backdrop-filter: brightness(300%) sepia(1) saturate(3) hue-rotate(180deg); + } + 7% { + backdrop-filter: brightness(1) sepia(1) saturate(3) hue-rotate(180deg); + } + 100% { + backdrop-filter: brightness(1) sepia(1) saturate(3) hue-rotate(180deg); + } +} + +/* Spiders */ +.spider:nth-child(odd) { + animation-name: swingFast; +} + +.spider:nth-child(2) { + animation-delay: 250ms; + animation-duration: 2100ms; + left: 20%; +} + +.spider:nth-child(3) { + animation-delay: 300ms; + animation-duration: 1600ms; + left: 30%; +} + +.spider:nth-child(4) { + animation-delay: 400ms; + animation-duration: 1800ms; + left: 40%; +} + +.spider:nth-child(5) { + animation-delay: 240ms; + animation-duration: 1900ms; + left: 50%; +} + +.spider:nth-child(6) { + animation-delay: 250ms; + animation-duration: 2300ms; + left: 60%; +} + +.spider:nth-child(7) { + animation-delay: 400ms; + animation-duration: 2100ms; + left: 70%; +} + +.spider:nth-child(8) { + animation-delay: 4000ms; + animation-duration: 200ms; + left: 80%; +} + +.spider { + z-index: 10; + position: fixed; + display: inline-block; + top: 0; + left: 10%; + + animation: swing 2s infinite; + transform-origin: top; + + transition: 0.8s ease-in-out; + pointer-events: none; +} + +.spider:hover .body { + transform: rotate(20deg); + transition: 0.4s ease-in-out; +} + +.spider:nth-child(odd):hover .body { + transform: rotate(-10deg); + transition: 0.2s ease-in-out; +} + +.spider .spiderweb { + width: 2px; + height: 200px; + margin-left: 49px; + background: rgba(255, 255, 255, 0.7); +} + +.spider .body { + width: 100px; + height: 80px; + background: #222; + position: relative; + border-radius: 50%; +} + +.spider .body .eye { + width: 28px; + height: 28px; + position: absolute; + bottom: 24px; + background: #fff; + border-radius: 50%; +} + +.spider .body .eye.left { + left: 20px; +} + +.spider .body .eye.right { + right: 20px; +} + +.spider .body .eye:after { + background: #222; + width: 7px; + height: 7px; + content: ""; + display: block; + margin: 55%; + border-radius: 50%; + + animation: look 4s infinite; +} + +.spider:nth-child(8) .body .eye { + background-color: #FF0000; + background: radial-gradient(#FF9B9B, #FF0000); +} + +.spider:nth-child(odd) .body .eye:after { + animation-delay: 1400ms; + animation-duration: 3600ms; +} + +.spider .legs .leg { + width: 80px; + height: 40px; + margin-top: -20px; + border: 5px solid transparent; + border-top-color: #333; + border-radius: 40px 40px 0 0; +} + +.spider .legs { + position: absolute; + bottom: -10%; + z-index: -1; +} + +.spider .legs.left { + left: -70%; +} +.spider .legs.right { + right: -60%; +} + +.legs.left .leg:nth-child(1) { + transform: rotate(10deg); + margin-left: 10px; +} +.legs.right .leg:nth-child(1) { + transform: rotate(-10deg); + margin-left: -10px; +} + +.legs.left .leg:nth-child(2) { + transform: rotate(-20deg); + margin-left: 20px; +} +.legs.right .leg:nth-child(2) { + transform: rotate(20deg); + margin-left: -20px; +} + +.legs.left .leg:nth-child(3) { + transform: rotate(-50deg); + margin-left: 30px; +} +.legs.right .leg:nth-child(3) { + transform: rotate(50deg); + margin-left: -30px; +} + +@keyframes look { + 0%, + 40%, + 100% { + transform: translateX(0); + } + + 45%, + 95% { + transform: translateX(-100%); + } +} + +@keyframes swing { + 0%, + 100% { + transform: translateY(0); + } + + 50% { + transform: translateY(-24px); + } +} + +@keyframes swingFast { + 0%, + 100% { + transform: translateY(0); + } + + 55% { + transform: translateY(-36px); + } +} + +/* Fog effect */ +.fog-effect { + opacity: 0.35; +} + +#fog-effect { + pointer-events: none; + position:fixed; + bottom:0; + left: 0; + width:100%; + height: 100%; + z-index: 1031; +} + +/* Eyes */ +.eye { + position: relative; + width: 26px; + height: 26px; +} + +/* Candy Corn */ +.candy-corn { + --color3: #FBED21; + --color2: #F66A3C; + --color1: #FDFBDA; + font-family: "Open Sans", sans-serif !important; + background: repeating-linear-gradient( + 45deg, + var(--color1), + var(--color1) 10px, + var(--color2) 20px, + var(--color2) 20px, + var(--color3) 60px, + var(--color3) 60px + ); + background-clip: text; + color: transparent !important; + -webkit-background-clip: text; + animation: 32s linear 0s infinite candy-corn-move; +} + +.candy-corn:not(a) > p { + color: transparent !important; +} + +#post-title > a.candy-corn { + color: transparent; +} + +.candy-corn:hover { + animation-duration: 10s; +} + +@keyframes candy-corn-move { + from { + background-position: 0px; + } + to { + background-position: 1000px; + } +} + +/* Ectoplasm */ +.ectoplasm { + text-shadow: 0 0 20px #3AE63A; +} + +.ectoplasm .comment-text > p, .ectoplasm .post-body, h1.ectoplasm { + font-family: 'Creepster'; + color: #90ee90; + letter-spacing: 0.15em; +} + +.ectoplasm .candy-corn { + --color3: rgb(140, 255, 0); + --color2: rgb(0, 111, 0); + --color1: rgb(131, 255, 131); + text-shadow: none; +} + +.ectoplasm.blood .comment-text > p { + font-family: 'DoubleFeature'; + letter-spacing: initial; +} + +.ectoplasm .rainbow-text > p { + color: #90ee90 !important; + font-weight: initial; +} + +.ectoplasm .comment-text, .ectoplasm .post-body, h1.ectoplasm { + overflow:visible !important; +} + +/* Upsidedown */ +#canvas { + position:absolute; + pointer-events:none; +} + +/* Bones */ +#animate{ + margin-left:45%; + margin-top:-5%; + position: fixed; + z-index:999; + pointer-events: none; + opacity:0.9; +} + +/* Pumpkin */ +.fall-pumpkin { + color: #fff; + font-size: 1em; + font-family: Serif; + text-shadow: 0 0 1px #000; + pointer-events: none; +} + +@-webkit-keyframes fall-pumpkins-fall { + 0% { + top: -20% + } + 100% { + top: 100% + } +} + +@-webkit-keyframes fall-pumpkins-shake { + 0% { + -webkit-transform: translateX(0px); + transform: translateX(0px) + } + 50% { + -webkit-transform: translateX(80px); + transform: translateX(80px) + } + 100% { + -webkit-transform: translateX(0px) rotate(360deg); + transform: translateX(0px) rotate(360deg); + } +} + +@keyframes fall-pumpkins-fall { + 0% { + top: -20% + } + 100% { + top: 100% + } +} + +@keyframes fall-pumpkins-shake { + 0% { + transform: translateX(0px) + } + 50% { + transform: translateX(80px) + } + 100% { + transform: translateX(0px) rotate(360deg); + } +} + +.fall-pumpkin { + position: fixed; + top: -20%; + z-index: 999; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: default; + -webkit-animation-name: fall-pumpkins-fall, fall-pumpkins-shake; + -webkit-animation-duration: 10s, 4s; + -webkit-animation-timing-function: linear, ease-in-out; + -webkit-animation-iteration-count: infinite, infinite; + -webkit-animation-play-state: running, running; + animation-name: fall-pumpkins-fall, fall-pumpkins-shake; + animation-duration: 10s, 4s; + animation-timing-function: linear, ease-in-out; + animation-iteration-count: infinite, infinite; + animation-play-state: running, running +} + +.fall-pumpkin:nth-of-type(0) { + left: 1%; + -webkit-animation-delay: 0s, 0s; + animation-delay: 0s, 0s +} +.fall-pumpkin:nth-of-type(1) { + left: 10%; + -webkit-animation-delay: 1s, 1s; + animation-delay: 1s, 1s +} +.fall-pumpkin:nth-of-type(2) { + left: 20%; + -webkit-animation-delay: 6s, .5s; + animation-delay: 6s, .5s +} +.fall-pumpkin:nth-of-type(3) { + left: 30%; + -webkit-animation-delay: 4s, 2s; + animation-delay: 4s, 2s +} +.fall-pumpkin:nth-of-type(4) { + left: 40%; + -webkit-animation-delay: 2s, 2s; + animation-delay: 2s, 2s +} +.fall-pumpkin:nth-of-type(5) { + left: 50%; + -webkit-animation-delay: 8s, 3s; + animation-delay: 8s, 3s +} +.fall-pumpkin:nth-of-type(6) { + left: 60%; + -webkit-animation-delay: 6s, 2s; + animation-delay: 6s, 2s +} +.fall-pumpkin:nth-of-type(7) { + left: 70%; + -webkit-animation-delay: 2.5s, 1s; + animation-delay: 2.5s, 1s +} +.fall-pumpkin:nth-of-type(8) { + left: 80%; + -webkit-animation-delay: 1s, 0s; + animation-delay: 1s, 0s +} +.fall-pumpkin:nth-of-type(9) { + left: 90%; + -webkit-animation-delay: 3s, 1.5s; + animation delay: 3s, 1.5s +} +.fall-pumpkin:nth-of-type(10) { + left: 100%; + -webkit-animation-delay: 3s, 2s; + animation-delay: 3s, 2s +} +.fall-pumpkin:nth-of-type(11) { + left: 5%; + -webkit-animation-delay: 1s, 4s; + animation-delay: 1s, 4s +} +.fall-pumpkin:nth-of-type(12) { + left: 15%; + -webkit-animation-delay: 1s, 1.5s; + animation-delay: 1s, 1.5s +} +.fall-pumpkin:nth-of-type(13) { + left: 25%; + -webkit-animation-delay: 6s, 2.5s; + animation-delay: 6s, 2.5s +} +.fall-pumpkin:nth-of-type(14) { + left: 35%; + -webkit-animation-delay: 4s, 1s; + animation-delay: 4s, 1s +} +.fall-pumpkin:nth-of-type(15) { + left: 45%; + -webkit-animation-delay: 2s, 4s; + animation-delay: 2s, 4s +} +.fall-pumpkin:nth-of-type(16) { + left: 55%; + -webkit-animation-delay: 8s, 3s; + animation-delay: 8s, 3s +} +.fall-pumpkin:nth-of-type(17) { + left: 65%; + -webkit-animation-delay: 6s, 3s; + animation-delay: 6s, 3s +} +.fall-pumpkin:nth-of-type(18) { + left: 75%; + -webkit-animation-delay: 2.5s, 4s; + animation-delay: 2.5s, 4s +} +.fall-pumpkin:nth-of-type(19) { + left: 85%; + -webkit-animation-delay: 2s, 0s; + animation-delay: 2s, 0s +} +.fall-pumpkin:nth-of-type(20) { + left: 95%; + -webkit-animation-delay: 3s, 1.5s; + animation delay: 3s, 1.5s +} + +.animate-spin { + animation: spin 5600ms linear infinite; +} + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +/* Trick or Treat */ +#trick-or-treat { + font-family: Jo_wrote_a_lovesong; + font-size: 2rem; + letter-spacing: 0.5rem; + border-color: var(--primary) !important; +} + +#trick-or-treat::before { + content:""; + background-image:url('/e/marseyface.webp'); ; + background-size: cover; + height:28px; + width:32px; + display:inline-block; +} + +#trick-or-treat::after { + content:""; + background-image:url('/e/marseytrickortreat.webp'); ; + background-size: cover; + height:28px; + width:32px; + display:inline-block; +} + +#jump-scare-img { + position: fixed; + left: 0; + top: 0; + height: 100%; + width: 100%; + z-index: 9999; + object-fit: cover; + pointer-events: none; + } + +/* progressbar */ +.progress { + background-color: #1d9bf0; + background-image: linear-gradient(0deg, #1d9bf0 0%, #59b1ec 100%); + width: 270px; + height: 24px; + border-radius: 4px; + box-shadow: inset 0px 12px 2px #ffffff10; + backdrop-filter: blur(2px) brightness(101%); + margin-bottom: 40px; +} + +.progress::before { + content: "\f48e"; + font-family: "Font Awesome 6 Pro"; + position: absolute; + left: 6px; + top: 2px; + font-size: 13px; + color: #fff; +} +.progress::after { + content: "\f780"; + font-family: "Font Awesome 6 Pro"; + position: absolute; + right: 6px; + top: 2px; + font-size: 13px; + color: #fff; +} + +.progress > .legend { + display: flex; + justify-content: space-between; + margin-top: 6px; + padding: 0 6px; + color: #dc3545; + font-family: -apple-system,BlinkMacSystemFont,segoe ui,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol; + font-size: 12px; + font-weight: bold; +} + +.progress > .legend span:nth-child(1) { + color: #d3bc00; +} + +.bar-left { + display: inline-block; + width: var(--width); + height: 24px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + background-color: #d3bc00; + background-image: linear-gradient(180deg, #d3bc00 50%, #877800 100%); + box-shadow: inset 0px 12px 2px #ffffff20; + color: white; + text-align: center; +} + +.bar-right { + display: inline-block; + width: var(--width); + height: 24px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + background-color: #dc3545; + background-image: linear-gradient(180deg, #dc3545 50%, #9e1b32 100%); + box-shadow: inset 2px 12px 0px #ffffff20; + color: white; + text-align: center; + position: absolute; + right: 0; +} diff --git a/files/assets/events/homoween/css/stab.css b/files/assets/events/homoween/css/stab.css new file mode 100644 index 0000000000..4fd5bb2764 --- /dev/null +++ b/files/assets/events/homoween/css/stab.css @@ -0,0 +1,3 @@ +canvas.sketch { + opacity: calc(0.1*{{ stab }}); +} diff --git a/files/assets/events/homoween/css/upsidedown.css b/files/assets/events/homoween/css/upsidedown.css new file mode 100644 index 0000000000..3257c6e0c6 --- /dev/null +++ b/files/assets/events/homoween/css/upsidedown.css @@ -0,0 +1,56 @@ +/*
tag 'background-color' is boilerplate here. We only care about the box-shadow and filter effects. We can add a woods background-image for added effect. */ + +body { + background-size: cover; + background-attachment: fixed; + background-color: #000; + filter: sepia(100%) hue-rotate(180deg) saturate(300%); + box-shadow: 0 0 900px rgba(0, 0, 0, 0.9) inset; + overflow-x: hidden; +} + +canvas.particles { + pointer-events: none; + position: fixed; + left: 0; + top: 0; + z-index: 1; + filter: blur(1.5px); + animation: flicker 4s infinite; +} + +@keyframes flicker { + 0% { + filter: brightness(30%); + } + 48% { + filter: brightness(30%); + } + 50% { + filter: contrast(1.5) brightness(40%); + } + 60% { + filter: contrast(1.5) brightness(40%); + } + 62% { + filter: brightness(30%); + } + 78% { + filter: brightness(20%); + } + 84% { + filter: brightness(40%); + } + 88% { + filter: brightness(30%); + } + 96% { + filter: brightness(80%); + } + 98% { + filter: brightness(30%); + } + 100% { + filter: brightness(90%); + } +} diff --git a/files/assets/events/homoween/fonts/Creepster.woff2 b/files/assets/events/homoween/fonts/Creepster.woff2 new file mode 100644 index 0000000000..e3df072b61 Binary files /dev/null and b/files/assets/events/homoween/fonts/Creepster.woff2 differ diff --git a/files/assets/events/homoween/fonts/DoubleFeature.woff b/files/assets/events/homoween/fonts/DoubleFeature.woff new file mode 100644 index 0000000000..ec42c9a5ba Binary files /dev/null and b/files/assets/events/homoween/fonts/DoubleFeature.woff differ diff --git a/files/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff b/files/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff new file mode 100644 index 0000000000..986b741601 Binary files /dev/null and b/files/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff differ diff --git a/files/assets/events/homoween/fonts/SpecialElite-Regular.woff b/files/assets/events/homoween/fonts/SpecialElite-Regular.woff new file mode 100644 index 0000000000..c32b2a007c Binary files /dev/null and b/files/assets/events/homoween/fonts/SpecialElite-Regular.woff differ diff --git a/files/assets/events/homoween/fonts/Unutterable.woff b/files/assets/events/homoween/fonts/Unutterable.woff new file mode 100644 index 0000000000..fae2f6aaae Binary files /dev/null and b/files/assets/events/homoween/fonts/Unutterable.woff differ diff --git a/files/assets/events/homoween/fonts/XTypewriter-Regular.woff b/files/assets/events/homoween/fonts/XTypewriter-Regular.woff new file mode 100644 index 0000000000..f0b3d36bd8 Binary files /dev/null and b/files/assets/events/homoween/fonts/XTypewriter-Regular.woff differ diff --git a/files/assets/events/homoween/images/blood-anim.webp b/files/assets/events/homoween/images/blood-anim.webp new file mode 100644 index 0000000000..c511faa3fb Binary files /dev/null and b/files/assets/events/homoween/images/blood-anim.webp differ diff --git a/files/assets/events/homoween/images/chud/1.webp b/files/assets/events/homoween/images/chud/1.webp new file mode 100644 index 0000000000..b3362f36f6 Binary files /dev/null and b/files/assets/events/homoween/images/chud/1.webp differ diff --git a/files/assets/events/homoween/images/chud/10.webp b/files/assets/events/homoween/images/chud/10.webp new file mode 100644 index 0000000000..260db4baac Binary files /dev/null and b/files/assets/events/homoween/images/chud/10.webp differ diff --git a/files/assets/events/homoween/images/chud/11.webp b/files/assets/events/homoween/images/chud/11.webp new file mode 100644 index 0000000000..2a92c45770 Binary files /dev/null and b/files/assets/events/homoween/images/chud/11.webp differ diff --git a/files/assets/events/homoween/images/chud/12.webp b/files/assets/events/homoween/images/chud/12.webp new file mode 100644 index 0000000000..b51fa12ec3 Binary files /dev/null and b/files/assets/events/homoween/images/chud/12.webp differ diff --git a/files/assets/events/homoween/images/chud/13.webp b/files/assets/events/homoween/images/chud/13.webp new file mode 100644 index 0000000000..f18ebc6349 Binary files /dev/null and b/files/assets/events/homoween/images/chud/13.webp differ diff --git a/files/assets/events/homoween/images/chud/14.webp b/files/assets/events/homoween/images/chud/14.webp new file mode 100644 index 0000000000..f1e66a64fd Binary files /dev/null and b/files/assets/events/homoween/images/chud/14.webp differ diff --git a/files/assets/events/homoween/images/chud/15.webp b/files/assets/events/homoween/images/chud/15.webp new file mode 100644 index 0000000000..39ba392440 Binary files /dev/null and b/files/assets/events/homoween/images/chud/15.webp differ diff --git a/files/assets/events/homoween/images/chud/16.webp b/files/assets/events/homoween/images/chud/16.webp new file mode 100644 index 0000000000..6e5f879771 Binary files /dev/null and b/files/assets/events/homoween/images/chud/16.webp differ diff --git a/files/assets/events/homoween/images/chud/17.webp b/files/assets/events/homoween/images/chud/17.webp new file mode 100644 index 0000000000..7f8fffa953 Binary files /dev/null and b/files/assets/events/homoween/images/chud/17.webp differ diff --git a/files/assets/events/homoween/images/chud/18.webp b/files/assets/events/homoween/images/chud/18.webp new file mode 100644 index 0000000000..0981cc4836 Binary files /dev/null and b/files/assets/events/homoween/images/chud/18.webp differ diff --git a/files/assets/events/homoween/images/chud/19.webp b/files/assets/events/homoween/images/chud/19.webp new file mode 100644 index 0000000000..92376f495c Binary files /dev/null and b/files/assets/events/homoween/images/chud/19.webp differ diff --git a/files/assets/events/homoween/images/chud/2.webp b/files/assets/events/homoween/images/chud/2.webp new file mode 100644 index 0000000000..85365ef143 Binary files /dev/null and b/files/assets/events/homoween/images/chud/2.webp differ diff --git a/files/assets/events/homoween/images/chud/3.webp b/files/assets/events/homoween/images/chud/3.webp new file mode 100644 index 0000000000..24679eaafd Binary files /dev/null and b/files/assets/events/homoween/images/chud/3.webp differ diff --git a/files/assets/events/homoween/images/chud/4.webp b/files/assets/events/homoween/images/chud/4.webp new file mode 100644 index 0000000000..1f0f990b7a Binary files /dev/null and b/files/assets/events/homoween/images/chud/4.webp differ diff --git a/files/assets/events/homoween/images/chud/5.webp b/files/assets/events/homoween/images/chud/5.webp new file mode 100644 index 0000000000..ee3a8b3458 Binary files /dev/null and b/files/assets/events/homoween/images/chud/5.webp differ diff --git a/files/assets/events/homoween/images/chud/6.webp b/files/assets/events/homoween/images/chud/6.webp new file mode 100644 index 0000000000..e7a07b52fe Binary files /dev/null and b/files/assets/events/homoween/images/chud/6.webp differ diff --git a/files/assets/events/homoween/images/chud/7.webp b/files/assets/events/homoween/images/chud/7.webp new file mode 100644 index 0000000000..ac5e4603bc Binary files /dev/null and b/files/assets/events/homoween/images/chud/7.webp differ diff --git a/files/assets/events/homoween/images/chud/8.webp b/files/assets/events/homoween/images/chud/8.webp new file mode 100644 index 0000000000..aa592f3384 Binary files /dev/null and b/files/assets/events/homoween/images/chud/8.webp differ diff --git a/files/assets/events/homoween/images/chud/9.webp b/files/assets/events/homoween/images/chud/9.webp new file mode 100644 index 0000000000..51a7d4b283 Binary files /dev/null and b/files/assets/events/homoween/images/chud/9.webp differ diff --git a/files/assets/events/homoween/images/cobweb-bl.webp b/files/assets/events/homoween/images/cobweb-bl.webp new file mode 100644 index 0000000000..4b19cf1622 Binary files /dev/null and b/files/assets/events/homoween/images/cobweb-bl.webp differ diff --git a/files/assets/events/homoween/images/cobweb-tr.webp b/files/assets/events/homoween/images/cobweb-tr.webp new file mode 100644 index 0000000000..16873a7f4d Binary files /dev/null and b/files/assets/events/homoween/images/cobweb-tr.webp differ diff --git a/files/assets/events/homoween/images/jumpscares/1.webp b/files/assets/events/homoween/images/jumpscares/1.webp new file mode 100644 index 0000000000..6a1133423f Binary files /dev/null and b/files/assets/events/homoween/images/jumpscares/1.webp differ diff --git a/files/assets/events/homoween/images/jumpscares/2.webp b/files/assets/events/homoween/images/jumpscares/2.webp new file mode 100644 index 0000000000..b6adabe4c0 Binary files /dev/null and b/files/assets/events/homoween/images/jumpscares/2.webp differ diff --git a/files/assets/events/homoween/images/machete.webp b/files/assets/events/homoween/images/machete.webp new file mode 100644 index 0000000000..c5098b8b33 Binary files /dev/null and b/files/assets/events/homoween/images/machete.webp differ diff --git a/files/assets/events/homoween/images/poor/blood.webp b/files/assets/events/homoween/images/poor/blood.webp new file mode 100644 index 0000000000..a9aa4c5a01 Binary files /dev/null and b/files/assets/events/homoween/images/poor/blood.webp differ diff --git a/files/assets/events/homoween/images/poor/flashlight.webp b/files/assets/events/homoween/images/poor/flashlight.webp new file mode 100644 index 0000000000..8d72b97da5 Binary files /dev/null and b/files/assets/events/homoween/images/poor/flashlight.webp differ diff --git a/files/assets/events/homoween/images/poor/fog.webp b/files/assets/events/homoween/images/poor/fog.webp new file mode 100644 index 0000000000..55bba55b73 Binary files /dev/null and b/files/assets/events/homoween/images/poor/fog.webp differ diff --git a/files/assets/events/homoween/images/ricardo1.webp b/files/assets/events/homoween/images/ricardo1.webp new file mode 100644 index 0000000000..2362ee244b Binary files /dev/null and b/files/assets/events/homoween/images/ricardo1.webp differ diff --git a/files/assets/events/homoween/images/ricardo2.webp b/files/assets/events/homoween/images/ricardo2.webp new file mode 100644 index 0000000000..004cb3d993 Binary files /dev/null and b/files/assets/events/homoween/images/ricardo2.webp differ diff --git a/files/assets/events/homoween/images/ricardo3.webp b/files/assets/events/homoween/images/ricardo3.webp new file mode 100644 index 0000000000..ed58c42dfe Binary files /dev/null and b/files/assets/events/homoween/images/ricardo3.webp differ diff --git a/files/assets/events/homoween/images/sidebar/1.webp b/files/assets/events/homoween/images/sidebar/1.webp new file mode 100644 index 0000000000..9066f22a3b Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/1.webp differ diff --git a/files/assets/events/homoween/images/sidebar/2.webp b/files/assets/events/homoween/images/sidebar/2.webp new file mode 100644 index 0000000000..d53dac38eb Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/2.webp differ diff --git a/files/assets/events/homoween/images/sidebar/3.webp b/files/assets/events/homoween/images/sidebar/3.webp new file mode 100644 index 0000000000..b1f2a52c2c Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/3.webp differ diff --git a/files/assets/events/homoween/images/sidebar/4.webp b/files/assets/events/homoween/images/sidebar/4.webp new file mode 100644 index 0000000000..ae7d4d84c6 Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/4.webp differ diff --git a/files/assets/events/homoween/images/sidebar/5.webp b/files/assets/events/homoween/images/sidebar/5.webp new file mode 100644 index 0000000000..bddfcc89c3 Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/5.webp differ diff --git a/files/assets/events/homoween/images/sidebar/6.webp b/files/assets/events/homoween/images/sidebar/6.webp new file mode 100644 index 0000000000..8613c97070 Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/6.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton1.webp b/files/assets/events/homoween/images/skeletons/skeleton1.webp new file mode 100644 index 0000000000..8bbf7d7c00 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton1.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton2.webp b/files/assets/events/homoween/images/skeletons/skeleton2.webp new file mode 100644 index 0000000000..9821bec66a Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton2.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton3.webp b/files/assets/events/homoween/images/skeletons/skeleton3.webp new file mode 100644 index 0000000000..5914c1a713 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton3.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton4.webp b/files/assets/events/homoween/images/skeletons/skeleton4.webp new file mode 100644 index 0000000000..3d675b35da Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton4.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton5.webp b/files/assets/events/homoween/images/skeletons/skeleton5.webp new file mode 100644 index 0000000000..8f341aa317 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton5.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton6.webp b/files/assets/events/homoween/images/skeletons/skeleton6.webp new file mode 100644 index 0000000000..2515e6aa31 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton6.webp differ diff --git a/files/assets/events/homoween/images/smoke.webp b/files/assets/events/homoween/images/smoke.webp new file mode 100644 index 0000000000..ac3bb3327d Binary files /dev/null and b/files/assets/events/homoween/images/smoke.webp differ diff --git a/files/assets/events/homoween/images/zombies/1.webp b/files/assets/events/homoween/images/zombies/1.webp new file mode 100644 index 0000000000..6f0ceec121 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/1.webp differ diff --git a/files/assets/events/homoween/images/zombies/10.webp b/files/assets/events/homoween/images/zombies/10.webp new file mode 100644 index 0000000000..8e5bdcf9ec Binary files /dev/null and b/files/assets/events/homoween/images/zombies/10.webp differ diff --git a/files/assets/events/homoween/images/zombies/2.webp b/files/assets/events/homoween/images/zombies/2.webp new file mode 100644 index 0000000000..e3958e6402 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/2.webp differ diff --git a/files/assets/events/homoween/images/zombies/3.webp b/files/assets/events/homoween/images/zombies/3.webp new file mode 100644 index 0000000000..5c679389a4 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/3.webp differ diff --git a/files/assets/events/homoween/images/zombies/4.webp b/files/assets/events/homoween/images/zombies/4.webp new file mode 100644 index 0000000000..5b03ba3329 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/4.webp differ diff --git a/files/assets/events/homoween/images/zombies/5.webp b/files/assets/events/homoween/images/zombies/5.webp new file mode 100644 index 0000000000..7db37a694b Binary files /dev/null and b/files/assets/events/homoween/images/zombies/5.webp differ diff --git a/files/assets/events/homoween/images/zombies/6.webp b/files/assets/events/homoween/images/zombies/6.webp new file mode 100644 index 0000000000..9b588222cf Binary files /dev/null and b/files/assets/events/homoween/images/zombies/6.webp differ diff --git a/files/assets/events/homoween/images/zombies/7.webp b/files/assets/events/homoween/images/zombies/7.webp new file mode 100644 index 0000000000..86b2ce7b95 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/7.webp differ diff --git a/files/assets/events/homoween/images/zombies/8.webp b/files/assets/events/homoween/images/zombies/8.webp new file mode 100644 index 0000000000..fcdf0f7765 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/8.webp differ diff --git a/files/assets/events/homoween/images/zombies/9.webp b/files/assets/events/homoween/images/zombies/9.webp new file mode 100644 index 0000000000..b220630546 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/9.webp differ diff --git a/files/assets/events/homoween/js/banner-debug.js b/files/assets/events/homoween/js/banner-debug.js new file mode 100644 index 0000000000..996a1eb51a --- /dev/null +++ b/files/assets/events/homoween/js/banner-debug.js @@ -0,0 +1,26 @@ +function setBannerDay(day){ + let sky = document.getElementById("banner-homoween-svg"), + moon = document.getElementById("banner-homoween-moon"), + house = document.getElementById("house-fill-gradient-stop"), + ground = document.getElementById("ground-gradient-stop"), + objects = document.getElementById("banner-homoween-objects"), + stars = document.getElementById("banner-homoween-stars") + + sky.style.backgroundImage = "var(--sky-gradient-day"+day+")" + moon.style.fill = "var(--moon-fill-day"+day+")" + moon.style.filter = "var(--moon-shadow-day"+day+")" + moon.style.cy = "var(--moon-position-day"+day+")" + house.style.stopColor = "var(--house-shadow-day"+day+")" + ground.style.stopColor = "var(--ground-shadow-day"+day+")" + objects.style.fill = "var(--object-fill-day"+day+")" + stars.style.opacity = "var(--star-opacity-day"+day+")" +} + +function cycleBanner(){ + i=1 + asdf = setInterval(function(){ + setBannerDay(i) + if (i > 9){clearInterval(asdf)} + i++ + }, 250) +} diff --git a/files/assets/events/homoween/js/banner.js b/files/assets/events/homoween/js/banner.js new file mode 100644 index 0000000000..4f185a354c --- /dev/null +++ b/files/assets/events/homoween/js/banner.js @@ -0,0 +1,13 @@ +const el = document.getElementById("banner-homoween-title"); + +function animateBannerText() { + const letters = el.getElementsByTagName("tspan"); + + for (let i = 0; i < letters.length; i++) { + letters.item(i).style.transition = `all 600ms ${600 + i * 40}ms`; + } + + setTimeout(() => el.classList.add("life"), 1000); +} + +animateBannerText(); diff --git a/files/assets/events/homoween/js/blood.js b/files/assets/events/homoween/js/blood.js new file mode 100644 index 0000000000..e4cc6cce0e --- /dev/null +++ b/files/assets/events/homoween/js/blood.js @@ -0,0 +1,52 @@ +/* + A Bloody Mess by Rob Glazebrook + By default, canvas does not clear between frames. I'm taking advantage of that to create the running blood effect. + This pen was inspired by Katy Decorah's BLOOD: https://codepen.io/katydecorah/pen/Lkogi +*/ + + +let i = 0; + +const stabs = document.getElementById('stabs').value + +let blood = Sketch.create({autoclear: false, autopause: false}), + drops = [], + dropCount = stabs*10, + maxDrops = dropCount+1, + Drop = function() { + this.x = random(0,blood.width); + this.radius = random(10,20); + this.y = -this.radius - random(50,100); + this.vy = this.radius/6; + this.r = ~~random(240,255); + this.g = ~~random(0,20); + this.b = ~~random(0,20); + }; + +blood.update = function() { + let d = drops.length; + while(d < dropCount && i < maxDrops) { + let drop = new Drop(); + drops.push(drop); + d++; + i++; + } + while(d-- && i < maxDrops) { + let drop = drops[d]; + drop.y += drop.vy; + if(drop.y - drop.radius > blood.height) { + drops.splice(d,1); + } + } +} + +blood.draw = function() { + let d = drops.length; + while(d-- && i < maxDrops) { + let drop = drops[d]; + blood.beginPath(); + blood.fillStyle = 'rgba('+drop.r+','+drop.g+','+drop.b+',.8)'; + blood.arc(drop.x,drop.y,drop.radius,0,TWO_PI); + blood.fill(); + } +} diff --git a/files/assets/events/homoween/js/bones.js b/files/assets/events/homoween/js/bones.js new file mode 100644 index 0000000000..59eb85f5ae --- /dev/null +++ b/files/assets/events/homoween/js/bones.js @@ -0,0 +1,75 @@ +let bones_container = document.getElementById('animate'); +const number = bones_container.dataset.bones + +// Stackable +// With each award, append a new image to array +const sources = ['skeleton1.webp','skeleton2.webp','skeleton3.webp','skeleton4.webp','skeleton5.webp','skeleton6.webp']; + +if(number > sources.length){ + number = sources.length +} + +const n = sources.length - number +const pw = screen.availWidth/6 + +let circles = []; + +for (let i = 0; i < 3; i++) { + addCircle(i * 150, [10 + 0, pw]); + addCircle(i * 150, [10 + 0, -pw]); + addCircle(i * 150, [10 - (0.5*pw), -pw]); + addCircle(i * 150, [10 + (0.5*pw), pw]); + addCircle(i * 150, [10 - (1.5*pw), -pw]); + addCircle(i * 150, [10 + (1.5*pw), pw]); +} + + +function addCircle(delay, range) { + setTimeout(function() { + let c = new Circle(range[0] + Math.random() * range[1], 80 + Math.random() * 4, { + x: -0.15 + Math.random() * 0.3, + y: 1 + Math.random() * 1 + }, range); + circles.push(c); + }, delay); +} + +function random_emoji() { + return sources[Math.floor(Math.random() * sources.length)] +} + +function Circle(x, y, v, range) { + let _this = this; + this.x = x; + this.y = y; + this.v = v; + this.range = range; + this.element = document.createElement('img'); + this.element.style.opacity = 0; + this.element.style.position = 'absolute'; + this.element.style.height = '3rem'; + this.element.src = `${SITE_FULL_IMAGES}/assets/events/homoween/images/skeletons/${random_emoji()}`; + bones_container.appendChild(this.element); + + this.update = function() { + if (_this.y > window.innerHeight) { + _this.y = 80 + Math.random() * 4; + _this.x = _this.range[0] + Math.random() * _this.range[1]; + } + _this.y += _this.v.y; + _this.x += _this.v.x; + this.element.style.opacity = 1; + this.element.style.transform = 'translate3d(' + _this.x + 'px, ' + _this.y + 'px, 0px)'; + this.element.style.webkitTransform = 'translate3d(' + _this.x + 'px, ' + _this.y + 'px, 0px)'; + this.element.style.mozTransform = 'translate3d(' + _this.x + 'px, ' + _this.y + 'px, 0px)'; + }; +} + +function animate() { + for (let i in circles) { + circles[i].update(); + } + requestAnimationFrame(animate); +} + +animate(); diff --git a/files/assets/events/homoween/js/flashlight.js b/files/assets/events/homoween/js/flashlight.js new file mode 100644 index 0000000000..d8c1077125 --- /dev/null +++ b/files/assets/events/homoween/js/flashlight.js @@ -0,0 +1,30 @@ +// Original codepen: https://codepen.io/Coding-Artist/pen/ExLyRJg + +let mouseX = 0; +let mouseY = 0; + +// Detect touch device +const isTouchDevice = () => { + try { + // We try to create TouchEvent (it would fail for desktops and throw error) + document.createEvent("TouchEvent"); + return true; + } catch (e) { + return false; + } +}; +function getMousePosition(e) { + try { + // Get position of mouse or touch + mouseX = !isTouchDevice() ? e.clientX : e.touches[0].clientX; + mouseY = !isTouchDevice() ? e.clientY : e.touches[0].clientY; + + // Set the Xpos and Ypos variables to current mouse/touch position + document.getElementById("flashlight-effect").style.setProperty("--Xpos", mouseX + "px"); + document.getElementById("flashlight-effect").style.setProperty("--Ypos", mouseY + "px"); + } catch (e) {} +} + +// Update mouse position on mouse move / touch move +document.addEventListener("mousemove", getMousePosition); +document.addEventListener("touchmove", getMousePosition); diff --git a/files/assets/events/homoween/js/fog.js b/files/assets/events/homoween/js/fog.js new file mode 100644 index 0000000000..5f8cef0880 --- /dev/null +++ b/files/assets/events/homoween/js/fog.js @@ -0,0 +1,137 @@ +canvasWidth = 1600; +canvasHeight = 200; + +pCount = 0; + + +pCollection = new Array(); + +let puffs = 1; +let particlesPerPuff = 1000; +let img = `${SITE_FULL_IMAGES}/assets/events/homoween/images/smoke.webp`; + +let smokeImage = new Image(); +smokeImage.src = img; + +for (let i1 = 0 ; i1 < puffs; i1++) +{ + let puffDelay = i1 * 1500; //300 ms between puffs + + for (let i2 = 0 ; i2 < particlesPerPuff; i2++) + { + addNewParticle((i2*50) + puffDelay); + } +} + + +draw(new Date().getTime(), 3000) + + + +function addNewParticle(delay) +{ + + let p = {}; + p.top = canvasHeight; + p.left = randBetween(-200,800); + + p.start = new Date().getTime() + delay; + p.life = 16000; + p.speedUp = 30; + + + p.speedRight = randBetween(0,20); + + p.rot = randBetween(-1,1); + p.red = Math.floor(randBetween(0,255)); + p.blue = Math.floor(randBetween(0,255)); + p.green = Math.floor(randBetween(0,255)); + + + p.startOpacity = .3 + p.newTop = p.top; + p.newLeft = p.left; + p.size = 200; + p.growth = 10; + + pCollection[pCount] = p; + pCount++; + + +} + +function draw(startT, totalT) +{ + //Timing + let timeDelta = new Date().getTime() - startT; + let stillAlive = false; + + //Grab and clear the canvas + let c=document.getElementById("fog-effect"); + let ctx=c.getContext("2d"); + ctx.clearRect(0, 0, c.width, c.height); + c.width = c.width; + + //Loop through particles + for (let i= 0; i < pCount; i++) + { + //Grab the particle + let p = pCollection[i]; + + //Timing + let td = new Date().getTime() - p.start; + let frac = td/p.life + + if (td > 0) + { + if (td <= p.life ) + { stillAlive = true; } + + //attributes that change over time + let newTop = p.top - (p.speedUp * (td/1000)); + let newLeft = p.left + (p.speedRight * (td/1000)); + let newOpacity = Math.max(p.startOpacity * (1-frac),0); + + let newSize = p.size + (p.growth * (td/1000)); + p.newTop = newTop; + p.newLeft = newLeft; + + //Draw! + ctx.fillStyle = 'rgba(150,150,150,' + newOpacity + ')'; + ctx.globalAlpha = newOpacity; + ctx.drawImage(smokeImage, newLeft, newTop, newSize, newSize); + } + } + + + + //Repeat if there's still a living particle + if (stillAlive) + { + requestAnimationFrame(function(){draw(startT,totalT);}); + } + else + { + clog(timeDelta + ": stopped"); + } +} + +function randBetween(n1,n2) +{ + let r = (Math.random() * (n2 - n1)) + n1; + return r; +} + +function randOffset(n, variance) +{ + //e.g. variance could be 0.1 to go between 0.9 and 1.1 + let max = 1 + variance; + let min = 1 - variance; + let r = Math.random() * (max - min) + min; + return n * r; +} + +function clog(s) +{ + console.log(s); +} diff --git a/files/assets/events/homoween/js/haunted.js b/files/assets/events/homoween/js/haunted.js new file mode 100644 index 0000000000..5e6d22cf27 --- /dev/null +++ b/files/assets/events/homoween/js/haunted.js @@ -0,0 +1,44 @@ +const thunder1 = new Audio(`/assets/events/homoween/audio/haunted/thunder1.mp3`) +const thunder2 = new Audio(`/assets/events/homoween/audio/haunted/thunder2.mp3`) +const is_upsidedown = localStorage.getItem('setting_upsidedown') +const div = document.getElementById("haunted-effect") + +const stylesheet_haunted = document.createElement("link") +stylesheet_haunted.setAttribute("rel", "stylesheet") +stylesheet_haunted.setAttribute("href", "/assets/events/homoween/css/haunted2.css?x=1") +stylesheet_haunted.disabled = true +document.head.appendChild(stylesheet_haunted) + +window.onload = function(){ + thunder2.volume = 0.5 + lightningStrike("normal") +} + +setInterval(function(){ + if(Math.floor(Math.random()*3) > 1){ + lightningStrike("haunted") + } else { + lightningStrike("normal") + } +},14000) + +function lightningStrike(strike) { + if(is_upsidedown == 'true'){ + div.style.animation = "haunted-upsidedown 20s" + } else { + div.style.animation = "haunted 20s" + } + + if(strike == "haunted"){ + stylesheet_haunted.disabled = false + thunder2.play() + setTimeout(function(){ + stylesheet_haunted.disabled = true + },700) + } + + thunder1.play() + setTimeout(function(){ + div.style.animation = "none" + },1000) +} diff --git a/files/assets/events/homoween/js/jumpscare.js b/files/assets/events/homoween/js/jumpscare.js new file mode 100644 index 0000000000..e4e5e795a3 --- /dev/null +++ b/files/assets/events/homoween/js/jumpscare.js @@ -0,0 +1,27 @@ +// Jump scare function +function scare() { + const image = document.getElementById("jump-scare-img"); + image.style.display = "block"; + + const jumpscare_audio = document.getElementById('jumpscare-audio') + jumpscare_audio.play(); + + // Hide image and reset sound + setTimeout(function () { + image.style.display = "none"; + jumpscare_audio.pause() + jumpscare_audio.currentTime = 0; + }, 3000); +} + +if (Math.random() <= 0.1) { + setTimeout(function () { + const xhr = new XMLHttpRequest(); + xhr.open("POST", "/jumpscare"); + xhr.setRequestHeader('xhr', 'xhr'); + form = new FormData(); + form.append("formkey", formkey()); + xhr.send(form) + scare() + }, 3000); +} diff --git a/files/assets/events/homoween/js/sketch.js b/files/assets/events/homoween/js/sketch.js new file mode 100644 index 0000000000..14a894d548 --- /dev/null +++ b/files/assets/events/homoween/js/sketch.js @@ -0,0 +1,628 @@ +/* Copyright (C) 2013 Justin Windle, http://soulwire.co.uk */ + +(function ( root, factory ) { + + if ( typeof exports === 'object' ) { + + // CommonJS like + module.exports = factory(root, root.document); + + } else if ( typeof define === 'function' && define.amd ) { + + // AMD + define( function() { return factory( root, root.document ); }); + + } else { + + // Browser global + root.Sketch = factory( root, root.document ); + } + +}( typeof window !== "undefined" ? window : this, function ( window, document ) { + "use strict"; + + /* + ---------------------------------------------------------------------- + + Config + + ---------------------------------------------------------------------- + */ + + let MATH_PROPS = 'E LN10 LN2 LOG2E LOG10E PI SQRT1_2 SQRT2 abs acos asin atan ceil cos exp floor log round sin sqrt tan atan2 pow max min'.split( ' ' ); + let HAS_SKETCH = '__hasSketch'; + let M = Math; + + let CANVAS = 'canvas'; + let WEBGL = 'webgl'; + let DOM = 'dom'; + + let doc = document; + let win = window; + + let instances = []; + + let defaults = { + + fullscreen: true, + autostart: true, + autoclear: true, + autopause: true, + container: doc.body, + interval: 1, + globals: true, + retina: false, + type: CANVAS + }; + + let keyMap = { + + 8: 'BACKSPACE', + 9: 'TAB', + 13: 'ENTER', + 16: 'SHIFT', + 27: 'ESCAPE', + 32: 'SPACE', + 37: 'LEFT', + 38: 'UP', + 39: 'RIGHT', + 40: 'DOWN' + }; + + /* + ---------------------------------------------------------------------- + + Utilities + + ---------------------------------------------------------------------- + */ + + function isArray( object ) { + + return Object.prototype.toString.call( object ) == '[object Array]'; + } + + function isFunction( object ) { + + return typeof object == 'function'; + } + + function isNumber( object ) { + + return typeof object == 'number'; + } + + function isString( object ) { + + return typeof object == 'string'; + } + + function keyName( code ) { + + return keyMap[ code ] || String.fromCharCode( code ); + } + + function extend( target, source, overwrite ) { + + for ( let key in source ) + + if ( overwrite || !( key in target ) ) + + target[ key ] = source[ key ]; + + return target; + } + + function proxy( method, context ) { + + return function() { + + method.apply( context, arguments ); + }; + } + + function clone( target ) { + + let object = {}; + + for ( let key in target ) { + + if ( key === 'webkitMovementX' || key === 'webkitMovementY' ) + continue; + + if ( isFunction( target[ key ] ) ) + + object[ key ] = proxy( target[ key ], target ); + + else + + object[ key ] = target[ key ]; + } + + return object; + } + + /* + ---------------------------------------------------------------------- + + Constructor + + ---------------------------------------------------------------------- + */ + + function constructor( context ) { + + let request, handler, target, parent, bounds, index, suffix, clock, node, copy, type, key, val, min, max, w, h; + + let counter = 0; + let touches = []; + let resized = false; + let setup = false; + let ratio = win.devicePixelRatio || 1; + let isDiv = context.type == DOM; + let is2D = context.type == CANVAS; + + let mouse = { + x: 0.0, y: 0.0, + ox: 0.0, oy: 0.0, + dx: 0.0, dy: 0.0 + }; + + let eventMap = [ + + context.eventTarget || context.element, + + pointer, 'mousedown', 'touchstart', + pointer, 'mousemove', 'touchmove', + pointer, 'mouseup', 'touchend', + pointer, 'click', + pointer, 'mouseout', + pointer, 'mouseover', + + doc, + + keypress, 'keydown', 'keyup', + + win, + + active, 'focus', 'blur', + resize, 'resize' + ]; + + let keys = {}; for ( key in keyMap ) keys[ keyMap[ key ] ] = false; + + function trigger( method ) { + + if ( isFunction( method ) ) + + method.apply( context, [].splice.call( arguments, 1 ) ); + } + + function bind( on ) { + + for ( index = 0; index < eventMap.length; index++ ) { + + node = eventMap[ index ]; + + if ( isString( node ) ) + + target[ ( on ? 'add' : 'remove' ) + 'EventListener' ].call( target, node, handler, false ); + + else if ( isFunction( node ) ) + + handler = node; + + else target = node; + } + } + + function update() { + + cAF( request ); + request = rAF( update ); + + if ( !setup ) { + + trigger( context.setup ); + setup = isFunction( context.setup ); + } + + if ( !resized ) { + trigger( context.resize ); + resized = isFunction( context.resize ); + } + + if ( context.running && !counter ) { + + context.dt = ( clock = +new Date() ) - context.now; + context.millis += context.dt; + context.now = clock; + + trigger( context.update ); + + // Pre draw + + if ( is2D ) { + + if ( context.retina ) { + + context.save(); + + if (context.autoclear) { + context.scale( ratio, ratio ); + } + } + + if ( context.autoclear ) + + context.clear(); + } + + // Draw + + trigger( context.draw ); + + // Post draw + + if ( is2D && context.retina ) + + context.restore(); + } + + counter = ++counter % context.interval; + } + + function resize() { + + target = isDiv ? context.style : context.canvas; + suffix = isDiv ? 'px' : ''; + + w = context.width; + h = context.height; + + if ( context.fullscreen ) { + + h = context.height = win.innerHeight; + w = context.width = win.innerWidth; + } + + if ( context.retina && is2D && ratio ) { + + target.style.height = h + 'px'; + target.style.width = w + 'px'; + + w *= ratio; + h *= ratio; + } + + if ( target.height !== h ) + + target.height = h + suffix; + + if ( target.width !== w ) + + target.width = w + suffix; + + if ( is2D && !context.autoclear && context.retina ) + + context.scale( ratio, ratio ); + + if ( setup ) trigger( context.resize ); + } + + function align( touch, target ) { + + bounds = target.getBoundingClientRect(); + + touch.x = touch.pageX - bounds.left - (win.scrollX || win.pageXOffset); + touch.y = touch.pageY - bounds.top - (win.scrollY || win.pageYOffset); + + return touch; + } + + function augment( touch, target ) { + + align( touch, context.element ); + + target = target || {}; + + target.ox = target.x || touch.x; + target.oy = target.y || touch.y; + + target.x = touch.x; + target.y = touch.y; + + target.dx = target.x - target.ox; + target.dy = target.y - target.oy; + + return target; + } + + function process( event ) { + + event.preventDefault(); + + copy = clone( event ); + copy.originalEvent = event; + + if ( copy.touches ) { + + touches.length = copy.touches.length; + + for ( index = 0; index < copy.touches.length; index++ ) + + touches[ index ] = augment( copy.touches[ index ], touches[ index ] ); + + } else { + + touches.length = 0; + touches[0] = augment( copy, mouse ); + } + + extend( mouse, touches[0], true ); + + return copy; + } + + function pointer( event ) { + + event = process( event ); + + min = ( max = eventMap.indexOf( type = event.type ) ) - 1; + + context.dragging = + + /down|start/.test( type ) ? true : + + /up|end/.test( type ) ? false : + + context.dragging; + + while( min ) + + isString( eventMap[ min ] ) ? + + trigger( context[ eventMap[ min-- ] ], event ) : + + isString( eventMap[ max ] ) ? + + trigger( context[ eventMap[ max++ ] ], event ) : + + min = 0; + } + + function keypress( event ) { + + key = event.keyCode; + val = event.type == 'keyup'; + keys[ key ] = keys[ keyName( key ) ] = !val; + + trigger( context[ event.type ], event ); + } + + function active( event ) { + + if ( context.autopause ) + + ( event.type == 'blur' ? stop : start )(); + + trigger( context[ event.type ], event ); + } + + // Public API + + function start() { + + context.now = +new Date(); + context.running = true; + } + + function stop() { + + context.running = false; + } + + function toggle() { + + ( context.running ? stop : start )(); + } + + function clear() { + + if ( is2D ) + + context.clearRect( 0, 0, context.width * ratio, context.height * ratio ); + } + + function destroy() { + + parent = context.element.parentNode; + index = instances.indexOf( context ); + + if ( parent ) parent.removeChild( context.element ); + if ( ~index ) instances.splice( index, 1 ); + + bind( false ); + stop(); + } + + extend( context, { + + touches: touches, + mouse: mouse, + keys: keys, + + dragging: false, + running: false, + millis: 0, + now: NaN, + dt: NaN, + + destroy: destroy, + toggle: toggle, + clear: clear, + start: start, + stop: stop + }); + + instances.push( context ); + + return ( context.autostart && start(), bind( true ), resize(), update(), context ); + } + + /* + ---------------------------------------------------------------------- + + Global API + + ---------------------------------------------------------------------- + */ + + let element, context, Sketch = { + + CANVAS: CANVAS, + WEB_GL: WEBGL, + WEBGL: WEBGL, + DOM: DOM, + + instances: instances, + + install: function( context ) { + + if ( !context[ HAS_SKETCH ] ) { + + for ( let i = 0; i < MATH_PROPS.length; i++ ) + + context[ MATH_PROPS[i] ] = M[ MATH_PROPS[i] ]; + + extend( context, { + + TWO_PI: M.PI * 2, + HALF_PI: M.PI / 2, + QUARTER_PI: M.PI / 4, + + random: function( min, max ) { + + if ( isArray( min ) ) + + return min[ ~~( M.random() * min.length ) ]; + + if ( !isNumber( max ) ) + + max = min || 1, min = 0; + + return min + M.random() * ( max - min ); + }, + + lerp: function( min, max, amount ) { + + return min + amount * ( max - min ); + }, + + map: function( num, minA, maxA, minB, maxB ) { + + return ( num - minA ) / ( maxA - minA ) * ( maxB - minB ) + minB; + } + }); + + context[ HAS_SKETCH ] = true; + } + }, + + create: function( options ) { + + options = extend( options || {}, defaults ); + + if ( options.globals ) Sketch.install( self ); + + element = options.element = options.element || doc.createElement( options.type === DOM ? 'div' : 'canvas' ); + + context = options.context = options.context || (function() { + + switch( options.type ) { + + case CANVAS: + + return element.getContext( '2d', options ); + + case WEBGL: + + return element.getContext( 'webgl', options ) || element.getContext( 'experimental-webgl', options ); + + case DOM: + + return element.canvas = element; + } + + })(); + + ( options.container || doc.body ).appendChild( element ); + + return Sketch.augment( context, options ); + }, + + augment: function( context, options ) { + + options = extend( options || {}, defaults ); + + options.element = context.canvas || context; + options.element.className += ' sketch'; + + extend( context, options, true ); + + return constructor( context ); + } + }; + + /* + ---------------------------------------------------------------------- + + Shims + + ---------------------------------------------------------------------- + */ + + let vendors = [ 'ms', 'moz', 'webkit', 'o' ]; + let scope = self; + let then = 0; + + let a = 'AnimationFrame'; + let b = 'request' + a; + let c = 'cancel' + a; + + let rAF = scope[ b ]; + let cAF = scope[ c ]; + + for ( let i = 0; i < vendors.length && !rAF; i++ ) { + + rAF = scope[ vendors[ i ] + 'Request' + a ]; + cAF = scope[ vendors[ i ] + 'Cancel' + a ]; + } + + scope[ b ] = rAF = rAF || function( callback ) { + + let now = +new Date(); + let dt = M.max( 0, 16 - ( now - then ) ); + let id = setTimeout( function() { + callback( now + dt ); + }, dt ); + + then = now + dt; + return id; + }; + + scope[ c ] = cAF = cAF || function( id ) { + clearTimeout( id ); + }; + + /* + ---------------------------------------------------------------------- + + Output + + ---------------------------------------------------------------------- + */ + + return Sketch; + +})); diff --git a/files/assets/events/homoween/js/trickortreat.js b/files/assets/events/homoween/js/trickortreat.js new file mode 100644 index 0000000000..ddcd2c086f --- /dev/null +++ b/files/assets/events/homoween/js/trickortreat.js @@ -0,0 +1,24 @@ +function postToastTrickOrTreat(t, url) { + const xhr = createXhrWithFormKey(url); + xhr[0].onload = function() { + postToastLoadTrickOrTreat(xhr[0]) + }; + xhr[0].send(xhr[1]); +} + +function postToastLoadTrickOrTreat(xhr) { + let data + try { + data = JSON.parse(xhr.response) + } + catch (e) { + console.log(e) + } + success = xhr.status >= 200 && xhr.status < 300; + showToast(success, getMessageFromJsonData(success, data)); + + if (data["result"] == 0){ + scare() + } +} + diff --git a/files/assets/events/homoween/js/upsidedown.js b/files/assets/events/homoween/js/upsidedown.js new file mode 100644 index 0000000000..5595889302 --- /dev/null +++ b/files/assets/events/homoween/js/upsidedown.js @@ -0,0 +1,80 @@ +let st = init("canvas"), // stranger things var +w = (canvas.width = innerWidth), +h = (canvas.height = window.innerHeight); + +class firefly { + constructor() { + this.x = Math.random() * w; + this.y = Math.random() * h; + this.s = Math.random() * 2; + this.ang = Math.random() * 2 * Math.PI; + this.v = (this.s * this.s) / 4; + } + move() { + this.x += this.v * Math.cos(this.ang); + this.y += this.v * Math.sin(this.ang); + this.ang += (Math.random() * 20 * Math.PI) / 180 - (10 * Math.PI) / 180; + } + show() { + st.beginPath(); + st.arc(this.x, this.y, this.s, 0, 2 * Math.PI); + st.fillStyle = "#fff"; + st.fill(); + } +} + +let f = []; + +function draw() { + if (f.length < 100) { + for (let j = 0; j < 10; j++) { + f.push(new firefly()); + } + } + //animation + for (let i = 0; i < f.length; i++) { + f[i].move(); + f[i].show(); + if (f[i].x < 0 || f[i].x > w || f[i].y < 0 || f[i].y > h) { + f.splice(i, 1); + } + } +} + +function init(elemid) { + let canvas = document.getElementById(elemid), + st = canvas.getContext("2d"), + w = (canvas.width = innerWidth), + h = (canvas.height = window.innerHeight); + st.fillStyle = "rgba(30,30,30,1)"; + st.fillRect(0, 0, w, h); + return st; +} + +window.requestAnimFrame = function () { + return ( + window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + window.setTimeout(callback); + } + ); +}; + +function loop() { + window.requestAnimFrame(loop); + st.clearRect(0, 0, w, h); + draw(); +} + +window.addEventListener("resize", function () { + (w = canvas.width = innerWidth), + (h = canvas.height = window.innerHeight); + loop(); +}); + +loop(); +setInterval(loop, 1000 / 60); diff --git a/files/assets/events/homoween/music/CARPENTER_MASTER.mp3 b/files/assets/events/homoween/music/CARPENTER_MASTER.mp3 new file mode 100644 index 0000000000..7cef0148ad Binary files /dev/null and b/files/assets/events/homoween/music/CARPENTER_MASTER.mp3 differ diff --git a/files/assets/events/homoween/music/Jan Terri - Get Down Goblin (Special Treat).mp3 b/files/assets/events/homoween/music/Jan Terri - Get Down Goblin (Special Treat).mp3 new file mode 100644 index 0000000000..f3ccf970de Binary files /dev/null and b/files/assets/events/homoween/music/Jan Terri - Get Down Goblin (Special Treat).mp3 differ diff --git a/files/assets/events/homoween/music/Spooky_Scary_Skeletons.mp3 b/files/assets/events/homoween/music/Spooky_Scary_Skeletons.mp3 new file mode 100644 index 0000000000..2192236755 Binary files /dev/null and b/files/assets/events/homoween/music/Spooky_Scary_Skeletons.mp3 differ diff --git a/files/assets/events/homoween/music/Stranger Things Theme Song (C418 REMIX)_edit.mp3 b/files/assets/events/homoween/music/Stranger Things Theme Song (C418 REMIX)_edit.mp3 new file mode 100644 index 0000000000..6a1496e53d Binary files /dev/null and b/files/assets/events/homoween/music/Stranger Things Theme Song (C418 REMIX)_edit.mp3 differ diff --git a/files/assets/events/homoween/music/bauhaus_bela.mp3 b/files/assets/events/homoween/music/bauhaus_bela.mp3 new file mode 100644 index 0000000000..dcdc627235 Binary files /dev/null and b/files/assets/events/homoween/music/bauhaus_bela.mp3 differ diff --git a/files/assets/events/homoween/music/burton.mp3 b/files/assets/events/homoween/music/burton.mp3 new file mode 100644 index 0000000000..687739c1b8 Binary files /dev/null and b/files/assets/events/homoween/music/burton.mp3 differ diff --git a/files/assets/events/homoween/music/exorcist.mp3 b/files/assets/events/homoween/music/exorcist.mp3 new file mode 100644 index 0000000000..dd72bbd254 Binary files /dev/null and b/files/assets/events/homoween/music/exorcist.mp3 differ diff --git a/files/assets/events/homoween/music/ghostbusters.mp3 b/files/assets/events/homoween/music/ghostbusters.mp3 new file mode 100644 index 0000000000..fdbb8539c3 Binary files /dev/null and b/files/assets/events/homoween/music/ghostbusters.mp3 differ diff --git a/files/assets/events/homoween/music/ghostly-music-box.mp3 b/files/assets/events/homoween/music/ghostly-music-box.mp3 new file mode 100644 index 0000000000..ec98213823 Binary files /dev/null and b/files/assets/events/homoween/music/ghostly-music-box.mp3 differ diff --git a/files/assets/events/homoween/music/goosebumps-original-theme-song.mp3 b/files/assets/events/homoween/music/goosebumps-original-theme-song.mp3 new file mode 100644 index 0000000000..6b8b3b177b Binary files /dev/null and b/files/assets/events/homoween/music/goosebumps-original-theme-song.mp3 differ diff --git a/files/assets/events/homoween/music/halloween-II-theme.mp3 b/files/assets/events/homoween/music/halloween-II-theme.mp3 new file mode 100644 index 0000000000..26ccfddfd5 Binary files /dev/null and b/files/assets/events/homoween/music/halloween-II-theme.mp3 differ diff --git a/files/assets/events/homoween/music/headsroll.mp3 b/files/assets/events/homoween/music/headsroll.mp3 new file mode 100644 index 0000000000..0ddb28fb08 Binary files /dev/null and b/files/assets/events/homoween/music/headsroll.mp3 differ diff --git a/files/assets/events/homoween/music/hereditary-soundtrack-reborn.mp3 b/files/assets/events/homoween/music/hereditary-soundtrack-reborn.mp3 new file mode 100644 index 0000000000..c228118e94 Binary files /dev/null and b/files/assets/events/homoween/music/hereditary-soundtrack-reborn.mp3 differ diff --git a/files/assets/events/homoween/music/i-put-a-spell-on-you.mp3 b/files/assets/events/homoween/music/i-put-a-spell-on-you.mp3 new file mode 100644 index 0000000000..437d221259 Binary files /dev/null and b/files/assets/events/homoween/music/i-put-a-spell-on-you.mp3 differ diff --git a/files/assets/events/homoween/music/jack-the-ripper.mp3 b/files/assets/events/homoween/music/jack-the-ripper.mp3 new file mode 100644 index 0000000000..41e613c13b Binary files /dev/null and b/files/assets/events/homoween/music/jack-the-ripper.mp3 differ diff --git a/files/assets/events/homoween/music/koopsta-knicca-stash-pot-remix.mp3 b/files/assets/events/homoween/music/koopsta-knicca-stash-pot-remix.mp3 new file mode 100644 index 0000000000..28637f0fca Binary files /dev/null and b/files/assets/events/homoween/music/koopsta-knicca-stash-pot-remix.mp3 differ diff --git a/files/assets/events/homoween/music/monstermash.mp3 b/files/assets/events/homoween/music/monstermash.mp3 new file mode 100644 index 0000000000..af42afa842 Binary files /dev/null and b/files/assets/events/homoween/music/monstermash.mp3 differ diff --git a/files/assets/events/homoween/music/nightmare-on-elm-street-theme.mp3 b/files/assets/events/homoween/music/nightmare-on-elm-street-theme.mp3 new file mode 100644 index 0000000000..3609221ba1 Binary files /dev/null and b/files/assets/events/homoween/music/nightmare-on-elm-street-theme.mp3 differ diff --git a/files/assets/events/homoween/music/opera_ix_bela.mp3 b/files/assets/events/homoween/music/opera_ix_bela.mp3 new file mode 100644 index 0000000000..b0d961b5d9 Binary files /dev/null and b/files/assets/events/homoween/music/opera_ix_bela.mp3 differ diff --git a/files/assets/events/homoween/music/owo.mp3 b/files/assets/events/homoween/music/owo.mp3 new file mode 100644 index 0000000000..ce21a32a8e Binary files /dev/null and b/files/assets/events/homoween/music/owo.mp3 differ diff --git a/files/assets/events/homoween/music/pyscho.mp3 b/files/assets/events/homoween/music/pyscho.mp3 new file mode 100644 index 0000000000..eaf47e0a26 Binary files /dev/null and b/files/assets/events/homoween/music/pyscho.mp3 differ diff --git a/files/assets/events/homoween/music/rats.mp3 b/files/assets/events/homoween/music/rats.mp3 new file mode 100644 index 0000000000..e62ea05495 Binary files /dev/null and b/files/assets/events/homoween/music/rats.mp3 differ diff --git a/files/assets/events/homoween/music/scooby.mp3 b/files/assets/events/homoween/music/scooby.mp3 new file mode 100644 index 0000000000..c3a78e6a01 Binary files /dev/null and b/files/assets/events/homoween/music/scooby.mp3 differ diff --git a/files/assets/events/homoween/music/scoops-troop.mp3 b/files/assets/events/homoween/music/scoops-troop.mp3 new file mode 100644 index 0000000000..d3934b47dd Binary files /dev/null and b/files/assets/events/homoween/music/scoops-troop.mp3 differ diff --git a/files/assets/events/homoween/music/signs-main-titles-theme.mp3 b/files/assets/events/homoween/music/signs-main-titles-theme.mp3 new file mode 100644 index 0000000000..eaa350ca03 Binary files /dev/null and b/files/assets/events/homoween/music/signs-main-titles-theme.mp3 differ diff --git a/files/assets/events/homoween/music/strangerintro.mp3 b/files/assets/events/homoween/music/strangerintro.mp3 new file mode 100644 index 0000000000..79f0b527a9 Binary files /dev/null and b/files/assets/events/homoween/music/strangerintro.mp3 differ diff --git a/files/assets/events/homoween/music/this-is-halloween.mp3 b/files/assets/events/homoween/music/this-is-halloween.mp3 new file mode 100644 index 0000000000..da6c59d034 Binary files /dev/null and b/files/assets/events/homoween/music/this-is-halloween.mp3 differ diff --git a/files/assets/events/homoween/music/thriller.mp3 b/files/assets/events/homoween/music/thriller.mp3 new file mode 100644 index 0000000000..ea5e7729d0 Binary files /dev/null and b/files/assets/events/homoween/music/thriller.mp3 differ diff --git a/files/assets/events/homoween/music/twilightzone.mp3 b/files/assets/events/homoween/music/twilightzone.mp3 new file mode 100644 index 0000000000..113d864cb0 Binary files /dev/null and b/files/assets/events/homoween/music/twilightzone.mp3 differ diff --git a/files/assets/events/homoween/music/welcome-to-crystal-lake.mp3 b/files/assets/events/homoween/music/welcome-to-crystal-lake.mp3 new file mode 100644 index 0000000000..e0c1014fe8 Binary files /dev/null and b/files/assets/events/homoween/music/welcome-to-crystal-lake.mp3 differ diff --git a/files/assets/events/shared/images/eye.webp b/files/assets/events/shared/images/eye.webp new file mode 100644 index 0000000000..68fb609b0a Binary files /dev/null and b/files/assets/events/shared/images/eye.webp differ diff --git a/files/assets/events/shared/js/eye_tracking.js b/files/assets/events/shared/js/eye_tracking.js new file mode 100644 index 0000000000..188e2b1665 --- /dev/null +++ b/files/assets/events/shared/js/eye_tracking.js @@ -0,0 +1,43 @@ +if (innerWidth >= 992) +{ + /*init*/ + sidebar = document.getElementById('desktop-sidebar') + + if (sidebar) { + const eye_left = sidebar.getElementsByClassName("eye")[0], + eye_right = sidebar.getElementsByClassName("eye")[1] + + /*eye movement*/ + document.addEventListener('mousemove', function(event) { + const click = {x: event.clientX, y: event.clientY}, + /*recalculating eye position on every mousemove is less efficient + but ensures eyes track properly upon pageload even if script doesnt fire*/ + eye_left_center = getCenter(eye_left), + eye_right_center = getCenter(eye_right) + + eye_left.style.transform = 'rotate('+getAngle(click, eye_left_center)+'rad)' + eye_right.style.transform = 'rotate('+getAngle(click, eye_right_center)+'rad)' + }) + + function getCenter(element) { + const bounds = element.getBoundingClientRect() + + let centerX = bounds["left"] + bounds["width"]/2, + centerY = bounds["top"] + bounds["height"]/2 + + return({x: centerX, y: centerY}) + } + + function getAngle(point1, point2) { + let x = point1["x"] - point2["x"], + y = point1["y"] - point2["y"], + angle = Math.atan(y/x) + + if(point1["x"] < point2["x"]) { + angle += Math.PI + } + + return(angle) + } + } +} diff --git a/files/assets/events/fistmas/js/music.js b/files/assets/events/shared/js/music.js similarity index 68% rename from files/assets/events/fistmas/js/music.js rename to files/assets/events/shared/js/music.js index a6f80772d9..61d342c24f 100644 --- a/files/assets/events/fistmas/js/music.js +++ b/files/assets/events/shared/js/music.js @@ -1,6 +1,6 @@ -const song = document.getElementById('fistmas-song').value; +const song = document.getElementById('event-song').value; const audio = new Audio(song); -audio.loop=true; +audio.loop = true; audio.play(); document.addEventListener('click', () => { diff --git a/files/assets/js/casino/blackjack_screen.js b/files/assets/js/casino/blackjack_screen.js index 11cdc394ce..213989e9db 100644 --- a/files/assets/js/casino/blackjack_screen.js +++ b/files/assets/js/casino/blackjack_screen.js @@ -114,7 +114,7 @@ function updateBlackjackTable(state) { const currency = state.wager.currency === 'coins' ? 'coins' : 'marseybux'; const gameCompleted = ['BLACKJACK', 'WON', 'PUSHED', 'LOST'].indexOf(state.status) !== -1 && (!state.has_player_split || ['WON', 'PUSHED', 'LOST'].indexOf(state.status_split) !== -1); - + if(gameCompleted) { switch (state.status) { case 'BLACKJACK': @@ -141,7 +141,7 @@ function updateBlackjackTable(state) { else { updateResult(`Pushed: Received ${state.wager.amount} ${currency}`, "success"); } - + break; case 'LOST': if(state.status_split === 'WON') { @@ -157,7 +157,7 @@ function updateBlackjackTable(state) { } updateResult(`Lost ${lost} ${currency}`, "danger"); } - + break; default: break; diff --git a/files/assets/js/fireworks.js b/files/assets/js/fireworks.js index 1c76d0ef01..a8f98e267c 100644 --- a/files/assets/js/fireworks.js +++ b/files/assets/js/fireworks.js @@ -20,7 +20,7 @@ function execute_fireworks(firework) { function frame() { if (ypos <= height) { clearInterval(id); - firework.firstElementChild.src = `${SITE_FULL_IMAGES}/i/firework-explosion.webp?v=${vnum}` + firework.firstElementChild.src = `${SITE_FULL_IMAGES}/i/firework-explosion.webp?x=${vnum}` } else { ypos--; firework.style.top=ypos+"%" diff --git a/files/assets/js/flash.js b/files/assets/js/flash.js index a6c8ff4aef..b8c9e5639e 100644 --- a/files/assets/js/flash.js +++ b/files/assets/js/flash.js @@ -18,7 +18,7 @@ function flash(){ if (notifs >= 1 && !focused){ title.innerHTML = `[+${notifs}] ${page_title}` if (alert) { - icon.href = `${SITE_FULL_IMAGES}/i/${SITE_NAME}/alert.ico?v=3009` + icon.href = `${SITE_FULL_IMAGES}/i/${SITE_NAME}/alert.ico?x=3009` alert = false } else { diff --git a/files/assets/js/formatting.js b/files/assets/js/formatting.js index 0f6fd14d4d..1128af193c 100644 --- a/files/assets/js/formatting.js +++ b/files/assets/js/formatting.js @@ -2,7 +2,7 @@ /* addFormattingCopyButtons(): creates a button in the first column of each row of a table that copies the text in the second column of that row */ function addFormattingCopyButtons() { - var allTablesGenerateCopyButtons = document.getElementsByClassName('generate-copy-buttons') + let allTablesGenerateCopyButtons = document.getElementsByClassName('generate-copy-buttons') for (let table = 0; table < allTablesGenerateCopyButtons.length; table++) { @@ -10,14 +10,14 @@ function addFormattingCopyButtons() { continue; } - for (var i = 1, row; row = allTablesGenerateCopyButtons[table].rows[i]; i++) { + for (let i = 1, row; row = allTablesGenerateCopyButtons[table].rows[i]; i++) { const textCopyButton = document.createElement("button"); textCopyButton.setAttribute("type", "button"); textCopyButton.className = "btn caction ml-1 py-0 nobackground px-1 text-muted copy-link"; /* replace HTML newlines with text newlines */ - var cleanedText = row.cells[1].cloneNode(true) + let cleanedText = row.cells[1].cloneNode(true) cleanedText.innerHTML = cleanedText.innerHTML.replace(/