import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
name: string
}
export default function handler(
req: NextApiRequest,
res: NextApiResponse<any>
) {
var apps: Array<any> = [{name: 'GeForce Now', icon: '/icon/gfn.ico', url: 'https://play.geforcenow.com/mall/',},{name: 'Youtube', icon: '/icon/yt.ico', url: 'https://www.youtube.com',},{name: 'Google Search', icon: '/icon/google.ico', url: 'https://www.google.com/webhp',},{name: 'Reddit', icon: '/icon/reddit.ico', url: 'https://reddit.com',},{name: 'Discord', icon: '/icon/discord.ico', url: 'https://discord.com',},{name: 'now.gg', icon: '/icon/now.ico', url: 'https://now.gg',},{name: 'Twitter', icon: '/icon/twitter.ico', url: 'https://twitter.com',},{name: 'Github', icon: '/icon/git.ico', url: 'https://github.com',},{name: 'Webretro', icon: '/icon/retro.ico', url: '/webretro/', proxy: false},{name: 'Spotify', icon: '/icon/spot.ico', url: 'https://spotify.com',},{name: 'Replit', icon: '/icon/repl.ico', url: 'https://replit.com',},{name: 'Wikipedia', icon: '/icon/wiki.ico', url: 'https://wikipedia.org',},].map((e:any,i)=>{return {...e,id:i+1+''}});
var exploits: Array<any> = [
{name: 'LTBEEF + Ingot', code: `javascript:(function () {var a = document.createElement('script');a.src = '!!{origin}/scripts/ingot.min.js';document.body.appendChild(a);}())`,description: `LTBEEF (literally the best exploit ever found): Disables any extension with a nice UI. go to <b style="text-decoration: underline !important;" onclick="open('https://chrome.google.com/webstorex')">https://chrome.google.com/webstorex</b> and run the bookmarklet. <b>USES INGOT UI by Nebelung</b>`},
{name: 'Flooder', code: `javascript:(e=>{var num=prompt('How Times Do You Want This Page To Show Up In your History?');done=false;x=window.location.href;for (var i=1; i<=num; i++){history.pushState(0, 0, i==num?x:i.toString());if(i==num){done=true}}if(done===true){alert('Flooding Successful!\n '+window.location.href+' \nIs Now In Your History '+num+(num==1?' time.':' Times. '))}})()`, description: `Flooder (history flooder): Floods your <i>History</i> with a set number of entries. Creator: waldo#9044`},
{name: 'Stealth Tab', code: "javascript:document.write(`<style> iframe{margin:0px; border:none; padding:0px; outline:none} body{margin:0px}</style><iframe src = ${prompt('enter url')}' width = ${window.innerWidth} height = ${window.innerHeight} />`)", description: `Stealth Tab (Porta Proxy): Creates a block-free frame of any URL you want. Open a new tab, and use the bookmarklet. Creator: CoolElectronics#4683`},
{name: 'Youtube', code: `javascript:(()=>{const hash=escape((new URLSearchParams(window.location.search).get('v'))); if (hash!==null){window.location.href='https://www.youtube-nocookie.com/embed/'+hash}})()`, description: 'Youtube: Unblocks blocked youtube videos. Go to a blocked youtube video and use the bookmarklet. Creator: SupremeRubisco#8061'}
].map((e:any,i)=>{return {...e,id:i+1+''}});
var games: Array<any> = [{"name":"Minecraft","id":"minecraft"},{"name":"1v1 lol","id":"1v1lol"},{"name":"2048","id":"2048"},{"name":"A Dark Room","id":"adarkroom"},{"name":"Among Us","id":"amongus"},{"name":"ASCII Space","id":"asciispace"},{"name":"Asteroids","id":"asteroids"},{"name":"Astray","id":"astray"},{"name":"Back Country","id":"backcountry"},{"name":"Black Hole Square","id":"blackholesquare"},{"name":"Bounce Back","id":"bounceback"},{"name":"Breaklock","id":"breaklock"},{"name":"Breakout","id":"breakout"},{"name":"Captain Callisto","id":"captaincallisto"},{"name":"Chess","id":"chess"},{"name":"Chroma Incident","id":"chromaincident"},{"name":"Chrome Dino","id":"chromedino"},{"name":"Connect 3","id":"connect3"},{"name":"Cookie Clicker","id":"cookieclicker"},{"name":"Crossy Road","id":"crossyroad"},{"name":"Cut the Rope","id":"cuttherope"},{"name":"Dogeminer","id":"dogeminer"},{"name":"Edge not Found","id":"edgenotfound"},{"name":"Evil Glitch","id":"evilglitch"},{"name":"Factory Balls Forever","id":"factoryballsforever"},{"name":"Flappy Bird","id":"flappybird"},{"name":"Geometry Dash","id":"geometrydash"},{"name":"Hextris","id":"hextris"},{"name":"Konnekt","id":"konnekt"},{"name":"Ninja vs Evil Corp","id":"ninjavsevilcorp"},{"name":"Packa Bunchas","id":"packabunchas"},{"name":"Pacman","id":"pacman"},{"name":"Paper io","id":"paperio"},{"name":"Particle Clicker","id":"particleclicker"},{"name":"Pushback","id":"pushback"},{"name":"q1k3","id":"q1k3"},{"name":"Racer","id":"racer"},{"name":"Radius Raid","id":"radiusraid"},{"name":"Retro Bowl","id":"retrobowl"},{"name":"Retro Haunt","id":"retrohaunt"},{"name":"Road Blocks","id":"roadblocks"},{"name":"Run 3","id":"run3"},{"name":"Shuttle Deck","id":"shuttledeck"},{"name":"Sleeping Beauty","id":"sleepingbeauty"},{"name":"Slither io","id":"slitherio"},{"name":"Slope","id":"slope"},{"name":"Snake","id":"snake"},{"name":"Space Company","id":"spacecompany"},{"name":"Space Garden","id":"spacegarden"},{"name":"Space Huggers","id":"spacehuggers"},{"name":"Temple Run","id":"templerun"},{"name":"Tetris","id":"tetris"},{"name":"The Maze of Space Goblins","id":"themazeofspacegoblins"},{"name":"Tower Master","id":"towermaster"},{"name":"Trimps","id":"trimps"},{"name":"Underrun","id":"underrun"},{"name":"xx142-b2exe","id":"xx142-b2exe"}];
res.status(200).json([apps, exploits, games]);
}