Not a new games site but just a CDN "proxy" for MonkeyGG2. Utilitzes CDNs (Content Delivery Networks) that many websites use and depend on, and this uses it to host games in order to bypass content blockers.
Currently just supports jsDelivr and StaticDelivr CDNs (not associated with them).
Download the latest release code or just copy it from minified/index.html.
Then run it in the browser on any window. You should be greeted with a menu to choose CDN. So make your decision, wait for the files to download, and you will be greeted with MonkeyGG2.
Currently there is a bug where games will not open until their html is downloaded, so you may need to click on the game button a few times before it opens.
Also, due to technical limitations, games have to be opened in new tabs (maybe that's a feature to you), and games that have large assets may not work with some CDNs.
Tip: if a website offers a way to run HTML or JS, then this will work. For JS, just remove the <script> and </script> tags at the beginning and end of the file, respectively.
Also, if you download the html file, you can open the html file in your browser and it should work. Online games most likely will not work, though.
...or you could just copy the js here:
<script>const CDNS = [{url: "https://cdn.jsdelivr.net/gh/MonkeyGG2/monkeygg2.github.io/", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="34" height="34"><style>.st1{fill:#bd483b}.st3{fill:#fec82f}.st4{fill:#df9c26}</style><path d="M15.386.338 12.28 11.376v11.143l3.106 11.143 3.194-11.143V11.376z" class="st1"/><path fill="#e64e3d" d="M15.386.338 0 5.88l2.186 20.492 13.2 7.29"/><path d="m15.386 33.662 13.268-7.365 2.483-20.49L15.386.338" class="st1"/><path d="M12.594 25.088a9.36 9.36 0 0 1-3.94-2.431l-.003-.002a9.34 9.34 0 0 1-2.238-3.814q.378.348.796.647.006.011.011.027-.005-.017-.011-.027a8.6 8.6 0 0 0 1.696.923q.267.105.542.195c.011.006.024.006.035.01q.048.018.097.033a1.7 1.7 0 0 0 1.39 1.504c.287 1.157.833 2.146 1.625 2.935m.58-13.294c0 .324.088.627.243.883-1.25 1.753-2.108 3.656-2.479 5.539q-.062.314-.105.619c-.429.113-.79.393-1.016.762a.1.1 0 0 1-.035-.01c-.023-.006-.04-.014-.061-.021a7.16 7.16 0 0 1-2.796-1.715 7 7 0 0 1-.311-.332l-.041-.049-.115-.137-.047-.059q-.02-.026-.037-.045l-.017-.023q-.03-.035-.053-.068l-.023-.029-.004-.008c-.013-.014-.024-.033-.037-.049a4 4 0 0 1-.157-.225q-.015-.017-.025-.039l-.02-.027a9.34 9.34 0 0 1 2.227-6.703 9.36 9.36 0 0 1 4.299-2.847q.04.274.095.553c.192.967.513 1.942.949 2.898-.271.3-.434.698-.434 1.132m-.998 8.685a.89.89 0 0 1-.308.68.9.9 0 0 1-1.068.09.9.9 0 0 1-.342-.375.9.9 0 0 1-.089-.395.9.9 0 0 1 .377-.732.9.9 0 0 1 1.285.245.86.86 0 0 1 .145.487m3.601-8.685a.9.9 0 0 1-.902.905q-.066 0-.128-.006-.012-.005-.025-.006a.902.902 0 0 1 .153-1.794h.038a.907.907 0 0 1 .864.901" class="st3"/><path d="M24.752 16.143c0 .907-.129 1.782-.368 2.61a13 13 0 0 1-2.4-.914 1.7 1.7 0 0 0-.092-.975 15 15 0 0 0 2.499-3.306c.234.821.361 1.69.361 2.585m-.871-3.947a11 11 0 0 1-.201.416 13.8 13.8 0 0 1-2.487 3.434 1.7 1.7 0 0 0-1.883.084 17 17 0 0 1-1.49-1.327 17 17 0 0 1-1.647-1.909 1.695 1.695 0 0 0 .168-1.964 16 16 0 0 1 3.917-2.788 9.4 9.4 0 0 1 3.623 4.054m-2.664 5.307a.902.902 0 0 1-1.804.081l.028-.022q-.016-.01-.03-.023l-.001-.037a.907.907 0 0 1 1.165-.864.91.91 0 0 1 .642.865m.235 1.264a1.7 1.7 0 0 1-2.088.151q-.059.039-.115.072a13.7 13.7 0 0 1-3.864 1.698v4.824a9.37 9.37 0 0 0 8.64-5.744 14 14 0 0 1-2.573-1.001" class="st4"/><path d="M15.386 20.688a11.7 11.7 0 0 1-2.385.367l-.128.008c-.151.41-.454.744-.839.94.245.909.688 1.698 1.319 2.327.524.524 1.162.92 1.891 1.18l.142.002z" class="st3"/><path d="M18.612 17.503q.001-.26.074-.498a18 18 0 0 1-3.3-3.376v5.946a12.9 12.9 0 0 0 3.321-1.511 1.7 1.7 0 0 1-.095-.561" class="st4"/><path d="M15.386 13.629c-.045-.059-.091-.113-.132-.174a1.7 1.7 0 0 1-1.015-.08c-1.134 1.606-1.912 3.341-2.25 5.049q-.047.243-.083.475c.477.195.848.596.996 1.092q.022-.005.046-.004c.809-.039 1.627-.18 2.438-.412z" class="st3"/><path d="M15.386 6.778v3.394q.073.023.145.055a17.2 17.2 0 0 1 3.573-2.681 9.3 9.3 0 0 0-3.718-.768" class="st4"/><path d="M15.386 6.778q-.914 0-1.773.168c.025.197.06.404.101.606.168.86.449 1.725.829 2.575a1.7 1.7 0 0 1 .843.045z" class="st3"/></svg>'}, {url: "https://cdn.staticdelivr.com/gh/MonkeyGG2/monkeygg2.github.io/main/", icon: '<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 138.52 130.38"><defs><linearGradient id="a" x1="-140.74" y1="64.97" x2="279.26" y2="64.97" gradientTransform="translate(0 .22)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7b4397"/><stop offset="1" stop-color="#dc2430"/></linearGradient></defs><path d="M0 44.82c0 1.34.64 2.66 1.91 3.46l19.38 12.11 41.49-25.93c3.96-2.48 8.99-2.48 12.96 0l41.49 25.93 19.38-12.11c1.27-.8 1.91-2.12 1.91-3.45v-.02c0-1.33-.64-2.65-1.91-3.45L71.42.62c-1.32-.83-3-.83-4.32 0L1.91 41.36A4.02 4.02 0 0 0 0 44.81Zm138.52 40.74c0-1.33-.64-2.65-1.91-3.45L117.23 70 75.74 95.93a12.22 12.22 0 0 1-12.96 0L21.29 70 1.91 82.11A4.02 4.02 0 0 0 0 85.56c0 1.34.64 2.66 1.91 3.46l65.19 40.74c.66.41 1.41.62 2.16.62s1.5-.21 2.16-.62l65.19-40.74c1.27-.8 1.91-2.12 1.91-3.45v-.02Zm-67.1 3.46 38.12-23.83-38.12-23.83c-1.32-.83-3-.83-4.32 0L28.98 65.19 67.1 89.02c1.32.83 3 .83 4.32 0" style="fill:url(#a);fill-rule:evenodd;stroke-width:0"/></svg>'}]; let currentCdnUrl; async function fetchHtmlFile(t) {var l = await fetch(currentCdnUrl + t); if (l.ok) return l.text(); {l = t.indexOf("?"); let e; e = -1 === l ? currentCdnUrl + t + "/index.html" : currentCdnUrl + t.substring(0, l) + "index.html" + t.substring(l), console.log(e); t = await fetch(e); return t.ok ? t.text() : (console.log(t), null)} } async function absoluteUrlify(e, t = currentCdnUrl) {return e.replace(/(<\s*head[^>]*>)/gm, `<head><base href="${t}/">`)} function addPatchScript(e) {var t = `<script defer>const currentCdnUrl="${currentCdnUrl}";${fetchHtmlFile.toString()}${absoluteUrlify.toString()}const checkElem=setInterval(()=>{null!=$("#gamesList li")&&($("#gamesList li").off("click"),$("#gamesList li").on("click",function(){let l=$(this).attr("url");fetchHtmlFile(l).then(e=>absoluteUrlify(e,currentCdnUrl+l)).then(e=>{console.log(e);var l,t=window.open("about:blank","_blank");t&&!t.closed&&void 0!==t.closed&&(t.document.body.style.margin="0",t.document.body.style.height="100vh",(l=t.document.createElement("iframe")).style.border="none",l.style.width="100%",l.style.height="100%",l.style.margin="0",l.referrerpolicy="no-referrer",l.allow="fullscreen",l.srcdoc=e,t.document.body.appendChild(l),l.focus())})}))},100);<` + "/script>"; return e.replace(/(<\s*\/body[^>]*>)/gm, t + "$1")} async function openGameWindow(e) {var t, e = e.target, e = (currentCdnUrl = e.getAttribute("cdn-url"), e.disabled = !0, e.textContent = "Downloading...", await fetchHtmlFile("index.html")), e = addPatchScript(await absoluteUrlify(e)), l = window.open("about:blank", "_blank"); l && !l.closed && void 0 !== l.closed && (l.document.body.style.margin = "0", l.document.body.style.height = "100vh", (t = l.document.createElement("iframe")).style.border = "none", t.style.width = "100%", t.style.height = "100%", t.style.margin = "0", t.referrerpolicy = "no-referrer", t.allow = "fullscreen", t.srcdoc = e, l.document.body.appendChild(t))} (async () => {var e = document.createElement("style"); e.innerHTML = "html{background:#171822;display:grid;grid-template-columns:80% 20%;gap:20px;place-items:center;width:60%}button{grid-column:1;border:1px solid #fff;font-size:x-large;padding:50px;letter-spacing:1.5;font-weight:700;background:#242c39;color:#d5e3eb;display:inline-flex;flex-direction:row-reverse;justify-content:center;justify-self:end;gap:5px}button:hover{background:#363f5f}button:active{background:#363fbf}button svg{width:34px;height:34px}i{grid-column:2}", document.documentElement.appendChild(e), CDNS.forEach(e => {var t = document.createElement("button"), e = (t.setAttribute("cdn-url", e.url), t.onclick = openGameWindow, t.textContent = new URL(e.url).hostname, document.documentElement.appendChild(t), (new DOMParser).parseFromString(e.icon, "image/svg+xml").documentElement); t.appendChild(e)})})();</script>I wanted to make it as accessible and as difficult to miss as possible ok
Because I wanted this project to work in any environment (no https, supports file://), no service workers were used. To get around CDNs serving html files as text, we instead download the html files and add a <base> attribute to the CDN, so every other file downloads normally.
I did try to make a service worker version in the sw-dev folder, but the index.js is somehow empty and there isn't really a point to continue it. The goal here wasn't an internet proxy, titanium network and others alr did a good job of that.
To minify this you kinda have to minify the JS/CSS in the strings, minify the entire JS, and then add it into an html file with the script tags. I don't remember coding half of this so I genuinely don't know how some stuff works.