|
7 | 7 | import { onMount } from "svelte"; |
8 | 8 | import { loadGames } from "$lib/loadCards.js"; |
9 | 9 | import { checkNotifications } from "$lib/checkNotifications.js"; |
| 10 | + import { browser } from "$app/environment"; |
10 | 11 |
|
11 | 12 | let isAHost = $state(State.isAHost()); |
12 | 13 | let devMode = $state(true); |
13 | 14 | let adblockEnabled = $state(SessionState.adBlockEnabled); |
14 | 15 | let adsEnabled = $state(SessionState.adsEnabled); |
| 16 | + let streamingContent = $state(""); |
15 | 17 | onMount(async () => { |
16 | 18 | await initializeTooling(); |
17 | 19 |
|
|
22 | 24 | devMode = SessionState.devMode; |
23 | 25 | adblockEnabled = SessionState.adBlockEnabled; |
24 | 26 | adsEnabled = SessionState.adsEnabled; |
| 27 | +
|
| 28 | + function injectBadAds() { |
| 29 | + const script = document.createElement("script"); |
| 30 | + script.type = "text/javascript"; |
| 31 | + script.src = |
| 32 | + "//pl27945791.effectivegatecpm.com/f9/0f/48/f90f487cd8f3cdf83690f6955c1b5655.js"; |
| 33 | + document.body.appendChild(script); |
| 34 | + } |
| 35 | + if ((!isAHost && adsEnabled)) { |
| 36 | + console.log("[R][LAYOUT][BASE] Bad Ads enabled"); |
| 37 | + injectBadAds(); |
| 38 | + } else { |
| 39 | + if (isAHost && adsEnabled) { |
| 40 | + console.log("[R][LAYOUT][BASE] Good ads enabled"); |
| 41 | + } else { |
| 42 | + console.log("[R][LAYOUT][BASE] No ads"); |
| 43 | + } |
| 44 | + } |
| 45 | +
|
| 46 | + var chars = "~!@#$%^&*()_+{}|:'<>?`1234567890-=[]\\;/.,"; |
| 47 | +
|
| 48 | + if (browser && window.innerWidth > 800) { |
| 49 | + setInterval(() => { |
| 50 | + streamingContent += |
| 51 | + chars.split("")[Math.floor(Math.random() * chars.length)]; |
| 52 | +
|
| 53 | + streamingContent = streamingContent.slice(-75); |
| 54 | + }, 50); |
| 55 | + } |
25 | 56 | }); |
26 | 57 | </script> |
27 | 58 |
|
|
40 | 71 | </div> |
41 | 72 |
|
42 | 73 | <footer> |
43 | | - <h3> |
44 | | - <b |
45 | | - >Can't find what you're looking for? <a |
46 | | - href="https://discord.gg/GDEFRBTT3Z">Join the discord</a |
47 | | - ></b |
48 | | - > |
49 | | - </h3> |
50 | | - <p> |
51 | | - CCPorted is not affiliated with or endorsed by any game developers or |
52 | | - publishers. All games are property of their respective owners. |
53 | | - </p> |
54 | | - <p> |
55 | | - DMCA Requests can be sent to < a href= "mailto:[email protected]" |
56 | | - |
57 | | - > |
58 | | - </p> |
59 | | - <p> |
60 | | - Site, design, and development are protected under common law copyright; |
61 | | - © {new Date().getFullYear()} CCPorted |
62 | | - </p> |
63 | | - <p> |
64 | | - <a href="/tos/privacy_policy">Privacy Policy</a> | |
65 | | - <a href="/tos/terms_of_service">Terms of Service</a> |
66 | | - </p> |
67 | | - <Info /> |
| 74 | + <div class="left"> |
| 75 | + <h3> |
| 76 | + <b |
| 77 | + >Can't find what you're looking for? <a |
| 78 | + href="https://discord.gg/GDEFRBTT3Z">Join the discord</a |
| 79 | + ></b |
| 80 | + > |
| 81 | + </h3> |
| 82 | + <p> |
| 83 | + CCPorted is not affiliated with or endorsed by any game developers |
| 84 | + or publishers. All games are property of their respective owners* |
| 85 | + </p> |
| 86 | + <p> |
| 87 | + DMCA Requests can be sent to <a |
| 88 | + |
| 89 | + > |
| 90 | + </p> |
| 91 | + <p> |
| 92 | + Site, design, and development are protected under common law |
| 93 | + copyright; © {new Date().getFullYear()} CCPorted |
| 94 | + </p> |
| 95 | + <p> |
| 96 | + <a href="/tos/privacy_policy">Privacy Policy</a> | |
| 97 | + <a href="/tos/terms_of_service">Terms of Service</a> |
| 98 | + </p> |
| 99 | + <p> |
| 100 | + * BallZ, Nighttime Visitor, Tetris, Tic Tac Toe, Stack, and Reaction |
| 101 | + Rush are all owned and protected by CCPorted. |
| 102 | + </p> |
| 103 | + <p> |
| 104 | + For complaints about ad content, please contact us at <a |
| 105 | + |
| 106 | + > or through the discord (see link above and in the navigation). |
| 107 | + </p> |
| 108 | + <h3>CCPORTED</h3> |
| 109 | + <p>CCPorted is the greatest place to play video games. The CCPorted team parses through hundreds of games and only adds the highest-quality games to our library, ensuring a high quality gaming experience for the users. Log in to get added to leaderboards and compete with your friends. Play all kinds of games from nostalgic classics to the latest hits. Our extensive ROM library also features over 300 titles from the late 90s and early 2000s. Join the Discord to get site updates and request games. New games are added each week, and games are updated regularly to ensure a bug-free experience.</p> |
| 110 | + <p>Join the discord to request the <i>Underground Document</i>, a Google Doc with information on how to access other links for the site.</p> |
| 111 | + <p>To view old notifications, visit the notifications page.</p> |
| 112 | + <h3>Partners</h3> |
| 113 | + <p>To become a partner, please contact us through the discord.</p> |
| 114 | + </div> |
| 115 | + <div class="license"> |
| 116 | + <h3>CCPORTED SOFTWARE LICENSE INFORMATION</h3> |
| 117 | + <p> |
| 118 | + This software is licensed under the GNU Affero General Public |
| 119 | + License v3.0 (AGPL-3.0), with additional terms that restrict |
| 120 | + commercial use as described below. |
| 121 | + </p> |
| 122 | + |
| 123 | + <h4>NONCOMMERCIAL CLAUSE</h4> |
| 124 | + <p> |
| 125 | + You may not use, modify, distribute, or otherwise exploit this |
| 126 | + software, in whole or in part, for commercial purposes. |
| 127 | + </p> |
| 128 | + <p> |
| 129 | + "Commercial purposes" means any use that is intended for or directed |
| 130 | + toward commercial advantage or monetary compensation, including but |
| 131 | + not limited to: - Selling or licensing copies of the software, - |
| 132 | + Hosting, operating, or distributing the software as part of a paid |
| 133 | + service, - Using the software to generate revenue (advertising, |
| 134 | + subscriptions, etc.), - Integrating the software into commercial |
| 135 | + products or services. |
| 136 | + </p> |
| 137 | + <p> |
| 138 | + You may use, modify, and share this software freely for personal, |
| 139 | + educational, research, or other noncommercial purposes, provided |
| 140 | + that all modified versions and derivative works are distributed |
| 141 | + under the same license and made publicly available. |
| 142 | + </p> |
| 143 | + |
| 144 | + <h4>AGPL v3 LICENSE TERMS</h4> |
| 145 | + <p> |
| 146 | + This program is free software: you can redistribute it and/or modify |
| 147 | + it under the terms of the GNU Affero General Public License as |
| 148 | + published by the Free Software Foundation, either version 3 of the |
| 149 | + License, or (at your option) any later version. |
| 150 | + </p> |
| 151 | + <p> |
| 152 | + This program is distributed in the hope that it will be useful, but |
| 153 | + WITHOUT ANY WARRANTY; without even the implied warranty of |
| 154 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 155 | + Affero General Public License for more details. |
| 156 | + </p> |
| 157 | + <p> |
| 158 | + You should have received a copy of the GNU Affero General Public |
| 159 | + License along with this program. If not, see <a |
| 160 | + href="https://www.gnu.org/licenses/" |
| 161 | + >https://www.gnu.org/licenses/</a |
| 162 | + >. |
| 163 | + </p> |
| 164 | + <h4>LICENSE NOTICE</h4> |
| 165 | + <p> |
| 166 | + When redistributing this software or derivative works, you must |
| 167 | + include this full license text, clearly indicating that it is |
| 168 | + licensed under "AGPL v3 + NonCommercial Clause". |
| 169 | + </p> |
| 170 | + </div> |
| 171 | + <div class="info"> |
| 172 | + <Info /> |
| 173 | + </div> |
68 | 174 | </footer> |
| 175 | +<div class="streaming-console"> |
| 176 | + <code>{streamingContent}</code> |
| 177 | +</div> |
69 | 178 |
|
70 | 179 | <style> |
71 | | - footer { |
| 180 | + .streaming-console { |
| 181 | + width: 100%; |
72 | 182 | text-align: center; |
| 183 | + } |
| 184 | + footer { |
| 185 | + display: flex; |
| 186 | + flex-direction: row; |
73 | 187 | color: #666; |
74 | | - margin: 20px 0; |
75 | 188 | font-size: 14px; |
| 189 | + justify-content: space-around; |
| 190 | + } |
| 191 | + footer div { |
| 192 | + margin: 20px; |
| 193 | + max-width: 600px; |
| 194 | + } |
| 195 | +
|
| 196 | + @media (max-width: 800px) { |
| 197 | + footer { |
| 198 | + flex-direction: column; |
| 199 | + align-items: center; |
| 200 | + text-align: center; |
| 201 | + } |
| 202 | + footer div { |
| 203 | + max-width: none; |
| 204 | + } |
| 205 | + footer .license { |
| 206 | + order: 1; |
| 207 | + text-align: left; |
| 208 | + } |
76 | 209 | } |
77 | 210 | </style> |
0 commit comments