From 15820f1359ce929e96417c2e8552d4ea49418583 Mon Sep 17 00:00:00 2001 From: Russell2259 Date: Wed, 6 Mar 2024 18:06:28 +0000 Subject: [PATCH 01/14] rollback bare server update --- package-lock.json | 141 ++++++++++++++++++++++++++++++---------------- package.json | 8 +-- 2 files changed, 96 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc58096..4e6b2e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,14 @@ "version": "1.3.2", "license": "GNU-3.0-or-later", "dependencies": { - "@tomphttp/bare-server-node": "^2.0.2", - "cors": "*", + "@tomphttp/bare-server-node": "^2.0.1", + "cors": "^2.8.5", "easyviolet": "github:Russell2259/Easyviolet", - "express": "*", + "express": "^4.18.3", "html-minifier": "^4.0.0", "javascript-obfuscator": "^4.1.0", "jsdom": "^23.0.1", - "mime": "*", + "mime": "^4.0.1", "uuid": "^9.0.1" } }, @@ -67,15 +67,16 @@ "integrity": "sha512-0s2g3bpKAxwk7sOsfewpngLF+2lQrS0mxnga+6qIzKCoYdOKd5+Lm3lkEDHO0cWIEqMbgRZB2wjW1+NQ2XbGWA==" }, "node_modules/@tomphttp/bare-server-node": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@tomphttp/bare-server-node/-/bare-server-node-2.0.2.tgz", - "integrity": "sha512-C9UPAY2gNF4mY+2r2wyRqz8tK6Qv4Ps5Q0P8kZx1tCw9oIaTnwfcofEKIyJY7ds6bYnCd1TE7PVz6AioNVuQQA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tomphttp/bare-server-node/-/bare-server-node-2.0.1.tgz", + "integrity": "sha512-L42TC/AldYRFBRZSxhkI0FC5TL8EC/NAsepNC/cWYTTiHQJ7mGg/vdTqNz8ShTYHr6LTHYkuD3/81nhX55SYtA==", "dependencies": { "async-exit-hook": "^2.0.1", "commander": "^10.0.1", "dotenv": "^16.0.3", + "headers-polyfill": "^3.1.2", "http-errors": "^2.0.0", - "ipaddr.js": "^2.1.0", + "ipaddr.js": "^2.0.1", "source-map-support": "^0.5.21", "ws": "^8.13.0" }, @@ -240,12 +241,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -253,7 +254,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -285,13 +286,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -517,16 +523,19 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-properties": { @@ -614,6 +623,25 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es6-object-assign": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", @@ -708,13 +736,13 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", + "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -821,15 +849,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -911,6 +943,11 @@ "he": "bin/he" } }, + "node_modules/headers-polyfill": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.3.0.tgz", + "integrity": "sha512-5e57etwBpNcDc0b6KCVWEh/Ro063OxPvzVimUdM0/tsYM/T7Hfy3kknIGj78SFTOhNd8AZY41U8mOHoO4LzmIQ==" + }, "node_modules/html-encoding-sniffer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", @@ -1315,9 +1352,9 @@ } }, "node_modules/mime": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.0.tgz", - "integrity": "sha512-pzhgdeqU5pJ9t5WK9m4RT4GgGWqYJylxUf62Yb9datXRwdcw5MjiD1BYI5evF8AgTXN9gtKX3CFLvCUL5fAhEA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.1.tgz", + "integrity": "sha512-5lZ5tyrIfliMXzFtkYyekWbtRXObT9OWa8IwQ5uxTBDHucNNwniRqo0yInflj+iYi5CBa6qxadGzGarDfuEOxA==", "funding": [ "https://github.com/sponsors/broofa" ], @@ -1599,9 +1636,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -1729,14 +1766,16 @@ "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -1748,13 +1787,17 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" diff --git a/package.json b/package.json index bb1d282..72da069 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,14 @@ "author": "Polaris Development Group", "license": "GNU-3.0-or-later", "dependencies": { - "@tomphttp/bare-server-node": "^2.0.2", - "cors": "*", + "@tomphttp/bare-server-node": "^2.0.1", + "cors": "^2.8.5", "easyviolet": "github:Russell2259/Easyviolet", - "express": "*", + "express": "^4.18.3", "html-minifier": "^4.0.0", "javascript-obfuscator": "^4.1.0", "jsdom": "^23.0.1", - "mime": "*", + "mime": "^4.0.1", "uuid": "^9.0.1" } } From 30a6a8857df6d704f0b1278083e55980adb4d838 Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Wed, 6 Mar 2024 13:10:22 -0500 Subject: [PATCH 02/14] begin image sourcing for view page, remove useless comments --- static/assets/js/games.js | 4 +++- static/assets/js/utils.js | 3 ++- static/assets/js/view.js | 34 ---------------------------------- 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/static/assets/js/games.js b/static/assets/js/games.js index f6ab7a4..8512791 100644 --- a/static/assets/js/games.js +++ b/static/assets/js/games.js @@ -115,11 +115,13 @@ const load = () => { if (isValidURL(game.target)) createViewPage({ target: game.target, title: game.name, + image: game.image, proxied: true }); else createViewPage({ target: game.target, - title: game.name + title: game.name, + image: game.image }); }, 500); }); diff --git a/static/assets/js/utils.js b/static/assets/js/utils.js index 9a9f7d5..e3e987c 100644 --- a/static/assets/js/utils.js +++ b/static/assets/js/utils.js @@ -132,7 +132,8 @@ export const createViewPage = (options) => location.href = `/view?load=${btoa(JS return: options.return || location.href, proxied: options.proxied, target: options.target, - title: options.title + title: options.title, + image: options.image }))}`; /** diff --git a/static/assets/js/view.js b/static/assets/js/view.js index 7f2a75b..ed33def 100644 --- a/static/assets/js/view.js +++ b/static/assets/js/view.js @@ -54,40 +54,6 @@ if (params.get('load')) { else if (frame.msRequestFullscreen) frame.msRequestFullscreen(); }); - /* - No - - document.querySelector('#discord-join').addEventListener('click', () => { - use the createViewPage function to load the page - document.getElementById('loadframe').src = "/uv/service/hvtrs8%2F-dksaopd%2Ccmm-ilvktg%2Fqkmon-aoomwnkt%7B-%3B52427%3B3142839%3A737"; - swal("How would you like to open this?", { - buttons: { - cancel: "Cancel", - proxy: { - text: "Proxy", - value: "proxy", - }, - newtab: true, - }, - }) - .then((value) => { - switch (value) { - - case "newtab": - window.open("https://dsc.gg/skoolworld", '_blank').focus(); - break; - - case "proxy": - document.getElementById('loadframe').src = "/uv/service/hvtrs8%2F-dksaopd%2Ccmm-ilvktg%2Fqkmon-aoomwnkt%7B-%3B52427%3B3142839%3A737"; - break; - - default: - bruv what - swal("you should have joined the server 🙄"); - } - }); - });*/ - window.addEventListener('fullscreenchange', () => { if (document.fullscreenElement) document.querySelector('#loadframe').style.borderRadius = '0px'; else document.querySelector('#loadframe').style.borderRadius = ''; From 00d8eb5dda7a75fae7fb621538291bb5c45e8eb7 Mon Sep 17 00:00:00 2001 From: Russell2259 Date: Thu, 7 Mar 2024 15:28:50 +0000 Subject: [PATCH 03/14] add 10 games --- static/assets/JSON/changelog.json | 6 ++- static/assets/JSON/games.json | 72 ++++++++++++++++++++++++++----- static/games.html | 2 +- 3 files changed, 67 insertions(+), 13 deletions(-) diff --git a/static/assets/JSON/changelog.json b/static/assets/JSON/changelog.json index 9940197..fc38788 100644 --- a/static/assets/JSON/changelog.json +++ b/static/assets/JSON/changelog.json @@ -1,7 +1,11 @@ [ + { + "date": "3/7/2024", + "simpleDescription": "Add 10 games" + }, { "date": "3/1/2024", - "simpleDescription": "Fix ROBLOX" + "simpleDescription": "Fix roblox" }, { "date": "2/28/2024", diff --git a/static/assets/JSON/games.json b/static/assets/JSON/games.json index 0f72a39..a425af4 100644 --- a/static/assets/JSON/games.json +++ b/static/assets/JSON/games.json @@ -337,9 +337,19 @@ "image": "/cdn/mindustry/splash.png" }, { - "name": "Minecraft", - "target": "/cdn/3kh0/minecraft-15/index.html", - "image": "/cdn/images/mc.jpeg" + "name": "Minecraft 1.3", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/eagler-1.3/index.html", + "image": "https://i.ytimg.com/vi/IB2h3OTbbvA/sddefault.jpg" + }, + { + "name": "Minecraft 1.5.2", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/eagler-1.5.2/index.html", + "image": "https://images.squarespace-cdn.com/content/v1/5e172d9413c1a94fc0a5a165/1596626261379-ZV6K2M7DC4S3QNIO82R7/block.jpg?format=500w" + }, + { + "name": "Minecraft 1.8", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/eagler-1.8/index.html", + "image": "/cdn/images/minecraft.svg" }, { "name": "Missiles", @@ -931,7 +941,7 @@ "image": "/cdn/3kh0/stick-merge/splash.png" }, { - "name": "Subway Surfers New York", + "name": "Subway Surfers: New York", "target": "/cdn/3kh0/subway-surfers-ny/index.html", "image": "/cdn/3kh0/subway-surfers-ny/NewYorkIcon.png" }, @@ -1038,36 +1048,76 @@ { "name": "The Chroma Incident", "target": "https://js13kgames.com/games/the-chroma-incident/index.html", - "image": "/cdn/images/thechromaincident.png" + "image": "/cdn/images/thechromaincident.png" }, { "name": "Dino Run 3d", "target": "https://russell2259.github.io/dino3d/", - "image": "/cdn/images/dino3d.jpg" + "image": "/cdn/images/dino3d.jpg" }, { "name": "Burrito Bison: Launcha Libre", "target": "https://rawcdn.githack.com/GameHub88/Yexex-Assets/main/bb/index.html", - "image": "https://play-lh.googleusercontent.com/vpTgm9u7-GzZP_MceTWpDi0HbinXd_4phCoTwf4ZspFL-115FtNRdo_SU1p-khLDnLA" + "image": "https://play-lh.googleusercontent.com/vpTgm9u7-GzZP_MceTWpDi0HbinXd_4phCoTwf4ZspFL-115FtNRdo_SU1p-khLDnLA" }, { "name": "Yohoho.io", "target": "https://rawcdn.githack.com/GameHub88/Yexex-Assets/main/yohoho/index.html", - "image": "https://lh3.googleusercontent.com/BulAgT61Ocg2r5obu2apG_IOYUi3t16vdmBwy0uAgmiOatFUfcRVuRKFPGSsz0kRJN8N" + "image": "https://lh3.googleusercontent.com/BulAgT61Ocg2r5obu2apG_IOYUi3t16vdmBwy0uAgmiOatFUfcRVuRKFPGSsz0kRJN8N" }, { "name": "Jacksmith", "target": "https://moonlight.silvereen.net/src/static/games/jacksmith/index.html", - "image": "https://img.poki.com/cdn-cgi/image/quality=78,width=600,height=600,fit=cover,f=auto/ebe99c6629baa3ea5f4d9c13f36a37bb.png" + "image": "https://img.poki.com/cdn-cgi/image/quality=78,width=600,height=600,fit=cover,f=auto/ebe99c6629baa3ea5f4d9c13f36a37bb.png" }, { "name": "Sans Fight Simulator", "target": "https://jcw87.github.io/c2-sans-fight/", - "image": "https://img.itch.zone/aW1nLzE2MDEzODIucG5n/original/oNevX4.png" + "image": "https://img.itch.zone/aW1nLzE2MDEzODIucG5n/original/oNevX4.png" }, { "name": "Slowroads", "target": "https://slowroads.io", - "image": "https://cdn-1.webcatalog.io/catalog/slow-roads/slow-roads-icon-filled-256.png?v=1678597634783" + "image": "https://cdn-1.webcatalog.io/catalog/slow-roads/slow-roads-icon-filled-256.png?v=1678597634783" + }, + { + "name": "Duck Life 5", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/duck-life-5/index.html", + "image": "https://play-lh.googleusercontent.com/JQqSn7wuCj0SxBqpBThNI33qCR9gwY0str2TIAnu-m_xrVCgZk3IPxYK2S7zC9WG0ig" + }, + { + "name": "Bloons TD 4", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/btd-4/index.html", + "image": "https://assets-prd.ignimgs.com/2022/08/16/bloons-td4-button-1660612386362.jpg" + }, + { + "name": "Bloons TD 5", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/btd-5/index.html", + "image": "https://m.media-amazon.com/images/M/MV5BNTkzYTJmNWEtOTdjMS00MzBjLWJiZmUtNzhlMDQzYzhkODA2XkEyXkFqcGdeQXVyNTgyNTA4MjM@._V1_.jpg" + }, + { + "name": "Raft Wars", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/raft-wars/index.html", + "image": "https://i.ytimg.com/vi/FPZMXwGSwpQ/hqdefault.jpg" + }, + { + "name": "Raft Wars 2", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/raft-wars-2/index.html", + "image": "https://static.wikia.nocookie.net/raftwars/images/c/c2/Rw2.jpg/revision/latest?cb=20141110013832" + }, + { + "name": "Run", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/run/index.html", + "image": "https://www.coolmathgames.com/sites/default/files/Run_OG-logo.jpg" + }, + { + "name": "Run 2", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/run2/index.html", + "image": "https://www.coolmathgames.com/sites/default/files/run-2.png" + }, + { + "name": "Subway Surfers: Singapore", + "target": "https://rawcdn.githack.com/CybriaTech/Opium/main/games/subway-surfers-singapore/index.html", + "image": "https://static.wikia.nocookie.net/subwaysurf/images/6/6d/Singapore2019LoadingScreen.png/revision/latest/scale-to-width-down/250?cb=20220403173202" } ] \ No newline at end of file diff --git a/static/games.html b/static/games.html index 4a56ff7..582af03 100644 --- a/static/games.html +++ b/static/games.html @@ -34,7 +34,7 @@ -

All Games (200+ 🎉)

+

All Games

diff --git a/static/games.html b/static/games.html index 582af03..6bfd6fa 100644 --- a/static/games.html +++ b/static/games.html @@ -52,7 +52,16 @@
- +
@@ -62,6 +71,16 @@

Oops, we couldn't find the game you were looking for.

+ diff --git a/static/search.html b/static/search.html index 2170a96..5c3a146 100644 --- a/static/search.html +++ b/static/search.html @@ -24,11 +24,23 @@
+
+
+
+

- From 55e86ec13b8e8eaecc1ec133d72c5f825c9f950f Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Thu, 7 Mar 2024 13:25:57 -0500 Subject: [PATCH 05/14] intrusive :( --- templates/adtop.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/adtop.html b/templates/adtop.html index 3fa97b9..651e917 100644 --- a/templates/adtop.html +++ b/templates/adtop.html @@ -1,2 +1,3 @@ - \ No newline at end of file + + \ No newline at end of file From 8ff12d71cc924a7562dbea0717ddcd7d53a1b62f Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Thu, 7 Mar 2024 13:28:26 -0500 Subject: [PATCH 06/14] remove ads from play page --- static/view.html | 1 - 1 file changed, 1 deletion(-) diff --git a/static/view.html b/static/view.html index 5edecea..137ebad 100644 --- a/static/view.html +++ b/static/view.html @@ -3,7 +3,6 @@ - From 81fd089e49100a2af3bcf2e3f1f5cb7b24816109 Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Thu, 7 Mar 2024 13:43:29 -0500 Subject: [PATCH 07/14] calm --- static/assets/JSON/changelog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/assets/JSON/changelog.json b/static/assets/JSON/changelog.json index fc38788..7f93a71 100644 --- a/static/assets/JSON/changelog.json +++ b/static/assets/JSON/changelog.json @@ -1,7 +1,7 @@ [ { "date": "3/7/2024", - "simpleDescription": "Add 10 games" + "simpleDescription": "Add ads (only here for a day), Added 10 games" }, { "date": "3/1/2024", From b2809532eb0301f718a44f3dacf107f66620cdea Mon Sep 17 00:00:00 2001 From: Cobalt-60 <95923271+plastics-eater@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:11:04 -0500 Subject: [PATCH 08/14] Update index.html --- static/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/static/index.html b/static/index.html index d563f25..a4d125b 100644 --- a/static/index.html +++ b/static/index.html @@ -3,7 +3,6 @@ - From 30b8c18f5747d9356f294b48e2d1c3c9a269448e Mon Sep 17 00:00:00 2001 From: Cobalt-60 <95923271+plastics-eater@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:12:27 -0500 Subject: [PATCH 09/14] Update games.html --- static/games.html | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/static/games.html b/static/games.html index 6bfd6fa..1939502 100644 --- a/static/games.html +++ b/static/games.html @@ -15,19 +15,6 @@ - -

Games

@@ -52,17 +39,6 @@
- -
@@ -71,17 +47,6 @@

Oops, we couldn't find the game you were looking for.

- - @@ -89,4 +54,4 @@ - \ No newline at end of file + From 43fa80856d2fc60179e6e94075248b0f03591337 Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Fri, 8 Mar 2024 08:21:59 -0500 Subject: [PATCH 10/14] ads --- templates/adtop.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/adtop.html b/templates/adtop.html index 651e917..3fa97b9 100644 --- a/templates/adtop.html +++ b/templates/adtop.html @@ -1,3 +1,2 @@ - - \ No newline at end of file + \ No newline at end of file From 6737f39c329e20154ac2d7be3c64fa1d6a5b669a Mon Sep 17 00:00:00 2001 From: Russell2259 Date: Fri, 8 Mar 2024 15:08:00 +0000 Subject: [PATCH 11/14] update changelog --- static/assets/JSON/changelog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/assets/JSON/changelog.json b/static/assets/JSON/changelog.json index 7f93a71..fb9b1cf 100644 --- a/static/assets/JSON/changelog.json +++ b/static/assets/JSON/changelog.json @@ -1,7 +1,7 @@ [ { "date": "3/7/2024", - "simpleDescription": "Add ads (only here for a day), Added 10 games" + "simpleDescription": "Added 10 games" }, { "date": "3/1/2024", From 777c8724b6d774091f25546f984a44fc7f70c87a Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Fri, 8 Mar 2024 10:20:06 -0500 Subject: [PATCH 12/14] share start --- static/assets/js/games.js | 25 ++++++++++++++++++++++++- static/assets/js/main.js | 8 +++++++- static/assets/js/share.js | 0 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 static/assets/js/share.js diff --git a/static/assets/js/games.js b/static/assets/js/games.js index 8512791..e7465b2 100644 --- a/static/assets/js/games.js +++ b/static/assets/js/games.js @@ -185,8 +185,31 @@ const load = () => { randomGame.click(); } }); + +}; +const loadGameFromURL = () => { + const urlParams = new URLSearchParams(window.location.search); + const gameName = urlParams.get('game'); + + if (!gameName) { + throw new PolarisError('No game specified in the URL'); + } + + fetch('/assets/JSON/games.json') + .then(res => res.json()) + .then(data => { + const game = data.find(g => g.name === decodeURIComponent(gameName)); + + if (!game) { + throw new PolarisError(`Game "${gameName}" not found`); + } + + renderGames([game]); + }) + .catch(e => new PolarisError('Failed to load game')); }; export default { - load + load, + loadGameFromURL }; \ No newline at end of file diff --git a/static/assets/js/main.js b/static/assets/js/main.js index 5405e1c..6ea5dd8 100644 --- a/static/assets/js/main.js +++ b/static/assets/js/main.js @@ -227,4 +227,10 @@ if (window.self === window.top && location.pathname !== '/view') window.addEvent else document.querySelector('.navbar').classList.remove('scrolling'); }); -if (window.self !== window.top && document.querySelector('.navbar')) document.querySelector('.navbar').remove(); \ No newline at end of file +if (window.self !== window.top && document.querySelector('.navbar')) document.querySelector('.navbar').remove(); + +if (location.pathname === '/share' && new URLSearchParams(location.search).has('game')) { + Games.loadGameFromURL(); +} else if (location.pathname !== '/view') { + loadSidebarInterface(); +} \ No newline at end of file diff --git a/static/assets/js/share.js b/static/assets/js/share.js new file mode 100644 index 0000000..e69de29 From bc3a593cf70d097c825f63290e69c1ac0be532b8 Mon Sep 17 00:00:00 2001 From: "Dean @ Skool" Date: Fri, 8 Mar 2024 16:10:30 -0500 Subject: [PATCH 13/14] Add discord invite to search page and fix dark theme button color --- static/assets/css/themes.css | 2 +- static/search.html | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/static/assets/css/themes.css b/static/assets/css/themes.css index 17b0e9d..a941a4f 100644 --- a/static/assets/css/themes.css +++ b/static/assets/css/themes.css @@ -3,7 +3,7 @@ body[data-theme='dark'] { --background-darker: rgba(0, 0, 0, 0.9); --text: #fff; --sidebar-bg: #161f2eef; - --button-bg: #1c1c1c69; + --button-bg: #332a4769; --shadow-color: #000; --switch-color: #42424259; --switch-active: #2196F3; diff --git a/static/search.html b/static/search.html index 5c3a146..a8d0007 100644 --- a/static/search.html +++ b/static/search.html @@ -27,16 +27,7 @@

-
+ @@ -44,6 +35,13 @@ + From 80431ee7c298d726e88b22e08aebe4106221016f Mon Sep 17 00:00:00 2001 From: Cobalt-60 <95923271+plastics-eater@users.noreply.github.com> Date: Sun, 10 Mar 2024 06:43:10 +0000 Subject: [PATCH 14/14] fiex settings menu iprivbe game sergc --- static/assets/JSON/changelog.json | 4 ++++ static/assets/css/main.css | 5 +++-- static/assets/js/main.js | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/static/assets/JSON/changelog.json b/static/assets/JSON/changelog.json index fb9b1cf..8c99421 100644 --- a/static/assets/JSON/changelog.json +++ b/static/assets/JSON/changelog.json @@ -1,4 +1,8 @@ [ + { + "date": "3/10/2024", + "simpleDescription": "Fixed Settings Menu and improved Game Search" + }, { "date": "3/7/2024", "simpleDescription": "Added 10 games" diff --git a/static/assets/css/main.css b/static/assets/css/main.css index de165ea..0bca3a7 100644 --- a/static/assets/css/main.css +++ b/static/assets/css/main.css @@ -105,6 +105,7 @@ body::-webkit-scrollbar-corner { padding: 0px; margin-right: 2.5px; margin-left: calc(50vw - calc(44vh + 45px)); + background-color: var(--background-darker); } input:focus { @@ -124,7 +125,7 @@ body::-webkit-scrollbar-corner { height: 7.5vh; border-radius: 2vh; font-size: 3vh; - background: var(--sidebar-bg); + background-color: var(--background-darker); margin-left: 0px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; @@ -136,7 +137,7 @@ body::-webkit-scrollbar-corner { box-shadow: 0.5vh 0.5vh 1vh 0vh var(--shadow-color); cursor: pointer; height: 7.5vh; - background: var(--sidebar-bg); + background-color: var(--background-darker); color: var(--text); margin-left: 0px; border-radius: 0px; diff --git a/static/assets/js/main.js b/static/assets/js/main.js index 6ea5dd8..efef720 100644 --- a/static/assets/js/main.js +++ b/static/assets/js/main.js @@ -231,6 +231,4 @@ if (window.self !== window.top && document.querySelector('.navbar')) document.qu if (location.pathname === '/share' && new URLSearchParams(location.search).has('game')) { Games.loadGameFromURL(); -} else if (location.pathname !== '/view') { - loadSidebarInterface(); } \ No newline at end of file