// ==UserScript== // @name Global Game Navigation (PC/Mobile) // @namespace https://greasyfork.org/zh-CN/users/xxxxx // @version 3.0 // @description One-click access to 500+ game sites worldwide, with categories, search, and multi-language support (EN/ZH). // @author Someone // @match *://*/* // @grant none // @license MIT // @icon https://www.google.com/s2/favicons?domain=poki.com // ==/UserScript== (function() { 'use strict'; // -------------------------------------------------------------- // 语言资源包 // -------------------------------------------------------------- const translations = { en: { panelTitle: "🌍 Global Game Navigation (Click to open)", searchPlaceholder: "🔍 Search site name...", noResults: "😔 No matching sites found. Try another keyword.", langSwitch: "🌐 EN", // 分类名称(英文) categories: { "🌐 Global Platforms": "🌐 Global Platforms", "🎨 Indie & Creative": "🎨 Indie & Creative", "📀 Retro & Flash Archive": "📀 Retro & Flash Archive", "⚔️ Multiplayer & .io Games": "⚔️ Multiplayer & .io Games", "☁️ Cloud & China Platforms": "☁️ Cloud & China Platforms", "🎓 Educational / School Accessible": "🎓 Educational / School Accessible", "🇯🇵 Japan & Korea & East Asia": "🇯🇵 Japan & Korea & East Asia", "🌏 Southeast & South Asia": "🌏 Southeast & South Asia", "🐫 West Asia, Central Asia & Africa": "🐫 West Asia, Central Asia & Africa", "🇪🇺 Europe & Oceania": "🇪🇺 Europe & Oceania", "🌎 Americas (North & Latin)": "🌎 Americas (North & Latin)", "🔗 Initial Provided Links": "🔗 Initial Provided Links" } }, zh: { panelTitle: "🌍 全球游戏导航 (点击直达)", searchPlaceholder: "🔍 搜索网站名称...", noResults: "😔 没有找到匹配的网站,试试其他关键词", langSwitch: "🌐 中文", // 分类名称(中文) categories: { "🌐 Global Platforms": "🌐 全球综合平台", "🎨 Indie & Creative": "🎨 独立创意 & 小众精品", "📀 Retro & Flash Archive": "📀 怀旧经典 & Flash存档", "⚔️ Multiplayer & .io Games": "⚔️ 多人竞技 & .io 游戏", "☁️ Cloud & China Platforms": "☁️ 云游戏 & 国内平台", "🎓 Educational / School Accessible": "🎓 教育/校园可访问", "🇯🇵 Japan & Korea & East Asia": "🇯🇵 日韩 & 东亚", "🌏 Southeast & South Asia": "🌏 东南亚 & 南亚", "🐫 West Asia, Central Asia & Africa": "🐫 西亚 & 中亚 & 非洲", "🇪🇺 Europe & Oceania": "🇪🇺 欧洲 & 大洋洲", "🌎 Americas (North & Latin)": "🌎 美洲(北美/拉美)", "🔗 Initial Provided Links": "🔗 最初提供的链接" } } }; // 当前语言,默认根据浏览器语言自动选择 let currentLang = (navigator.language || navigator.userLanguage).startsWith('zh') ? 'zh' : 'en'; // -------------------------------------------------------------- // 网站数据(与语言无关,保持原始名称) // -------------------------------------------------------------- const siteCategories = { "global": [ { name:"Poki", url:"https://poki.com/" }, { name:"CrazyGames", url:"https://www.crazygames.com/" }, { name:"Armor Games", url:"https://www.armorgames.com/" }, { name:"Kongregate", url:"https://www.kongregate.com/" }, { name:"Miniclip", url:"https://www.miniclip.com/" }, { name:"Addicting Games", url:"https://www.addictinggames.com/" }, { name:"Friv", url:"https://www.friv.com/" }, { name:"Y8 Games", url:"https://www.y8.com/" }, { name:"Lagged", url:"https://www.lagged.com/" }, { name:"AllWebGames", url:"https://www.allwebgames.com/" }, { name:"SeaGames", url:"https://www.seagames.com/" }, { name:"GamePix", url:"https://www.gamepix.com/" }, { name:"PlayVio", url:"https://playvio.com/" }, { name:"GameShred", url:"https://www.gameshred.com/" }, { name:"GameReek", url:"https://www.gamereek.com/" }, { name:"GameSludge", url:"https://www.gamesludge.com/" }, { name:"Playgama", url:"https://playgama.com/" }, { name:"GamH5", url:"https://gamh5.com/" }, { name:"Sonsaur", url:"https://www.sonsaur.com/" }, { name:"Game.Monster", url:"https://game.monster/" }, { name:"AppAgg", url:"https://appagg.com/" }, { name:"MobyGames", url:"https://www.mobygames.com/" }, { name:"WhatGamesPlay", url:"https://whatgamesplay.com/" }, { name:"HelloGame.io", url:"https://hellogame.io/" }, { name:"Game Jolt", url:"https://gamejolt.com/" }, { name:"Newgrounds", url:"https://www.newgrounds.com/" }, { name:"itch.io", url:"https://itch.io/" }, { name:"FUUN.FUN", url:"https://fuun.fun/" }, { name:"Rando.gg", url:"https://rando.gg/" }, { name:"MiniPlay", url:"https://miniplay.com/" } ], "indie": [ { name:"Neal.fun", url:"https://neal.fun/" }, { name:"NanoBanana.games", url:"https://nanobanana.games/" }, { name:"BestCrazyGames", url:"https://bestcrazygames.com/" }, { name:"gaming.inlinestyle.it", url:"https://gaming.inlinestyle.it/" }, { name:"Manyland", url:"https://manyland.com/" }, { name:"Nazo Game", url:"https://nazo.one/" }, { name:"Gugu Fish", url:"https://www.guguyu.com/" }, { name:"U77 / Git Games", url:"https://gitgame.com/" }, { name:"Snokido", url:"https://www.snokido.com/" }, { name:"KBH Games", url:"https://kbhgames.com/" } ], "retro": [ { name:"Flashpoint Archive", url:"https://flashpointarchive.org/" }, { name:"17yoo (YiQiYou)", url:"https://www.17yoo.com/" }, { name:"niconico Flash Game", url:"https://www.nicovideo.jp/flash" }, { name:"Flashstorage.games", url:"https://flashstorage.games/" }, { name:"ClassicReload", url:"https://classicreload.com/" }, { name:"Internet Archive (MS-DOS)", url:"https://archive.org/details/softwarelibrary_msdos_games" }, { name:"Little霸王 (XiaoBaWang)", url:"https://www.xiaobawang.com/" }, { name:"YIKM", url:"https://yikm.net/" }, { name:"return8090", url:"https://return8090.com/" }, { name:"Emu666", url:"https://www.emu666.com/" }, { name:"80 Online Arcade", url:"https://www.80online.com/" }, { name:"zaixianwan.app", url:"https://zaixianwan.app/" }, { name:"retroonline.net", url:"https://retroonline.net/" }, { name:"Heheda.top", url:"https://heheda.top/" }, { name:"classic.minecraft.net", url:"https://classic.minecraft.net/" }, { name:"oldswf.com", url:"https://oldswf.com/" } ], "io": [ { name:"ioGames.Space", url:"https://iogames.space/" }, { name:"io2333", url:"https://io2333.com/" }, { name:"YORG.io", url:"https://yorg.io/" }, { name:"Krunker.io", url:"https://krunker.io/" }, { name:"Zombs Royale", url:"https://zombsroyale.io/" }, { name:"Bloxd.io", url:"https://bloxd.io/" }, { name:"Circle Battle", url:"https://bulletz.io/" }, { name:"Online CS 1.6", url:"https://play-cs.com/" }, { name:"Draw & Guess", url:"https://enazo.cn/" }, { name:"Papergames.io", url:"https://papergames.io/" } ], "cloud": [ { name:"Tencent Start", url:"https://gamer.qq.com/" }, { name:"Netease Cloud Game", url:"https://cg.163.com/" }, { name:"MiGu KuaiYou", url:"https://www.migufun.com/" }, { name:"4399", url:"https://www.4399.com/" }, { name:"7k7k", url:"https://www.7k7k.com/" }, { name:"YiQiYou", url:"https://www.17yoo.cn/" }, { name:"DouYou", url:"https://www.doyo.cn/" }, { name:"7724 Games", url:"https://www.7724.com/" }, { name:"7723 Game Box", url:"https://www.7723.cn/" }, { name:"Ali213 Mini Games", url:"https://u.ali213.net/" }, { name:"Pigame", url:"https://cn.pigame.cc/" }, { name:"WuFan Game Hall", url:"https://www.wufan.com/" }, { name:"LingDong Games", url:"https://www.ldgame.com/" }, { name:"37 Games", url:"https://www.37.com/" }, { name:"9377 Games", url:"https://www.9377.com/" }, { name:"TanWan Games", url:"https://www.tanwan.com/" }, { name:"JiongYou Village", url:"https://www.jyc.com/" }, { name:"45yx", url:"https://www.45yx.com/" }, { name:"QQ Games", url:"https://qqgame.qq.com/" }, { name:"YY Games", url:"https://game.yy.com/" }, { name:"51 Games", url:"https://www.51.com/" }, { name:"Hao123 Mini Games", url:"https://www.hao123.com/game" }, { name:"07073 Game Network", url:"https://www.07073.com/" } ], "edu": [ { name:"Coolmath Games", url:"https://www.coolmathgames.com/" }, { name:"Hooda Math", url:"https://www.hoodamath.com/" }, { name:"Math Playground", url:"https://www.mathplayground.com/" }, { name:"Montessori Childrens Community", url:"https://www.montessorichildrenscommunity.org/" }, { name:"PushtoLearn", url:"https://pushtolearn.com/" }, { name:"Unblocked Games 66", url:"https://sites.google.com/site/unblockedgames66ez/" }, { name:"Unblocked Games 77", url:"https://sites.google.com/site/unblockedgames77/" }, { name:"Unblocked Games WTF", url:"https://sites.google.com/site/unblockedgameswtf/" }, { name:"Car Games Unblocked", url:"https://cargamesunblocked.com/" } ], "jpkr": [ { name:"DMM Games", url:"https://games.dmm.com/" }, { name:"G123.jp", url:"https://g123.jp/" }, { name:"GameWith.jp", url:"https://gamewith.jp/" }, { name:"Game8.jp", url:"https://game8.jp/" }, { name:"Hangame", url:"https://www.hangame.com/" }, { name:"Netmarble", url:"https://company.netmarble.com/" }, { name:"NCSOFT", url:"https://www.ncsoft.com/" }, { name:"Lol.ps", url:"https://lol.ps/" }, { name:"HanYouWang", url:"https://www.hanyouwang.com/" }, { name:"Dan Ball", url:"https://dan-ball.jp/" }, { name:"Freem", url:"https://www.freem.ne.jp/" }, { name:"81Dojo", url:"https://81dojo.com/" }, { name:"Yahoo! Mobage", url:"https://yahoo-mbga.jp/" }, { name:"QooApp", url:"https://www.qoo-app.com/" }, { name:"GameKee", url:"https://www.gamekee.com/" } ], "seasia": [ { name:"PlayPark", url:"https://www.playpark.com/" }, { name:"SEAGM", url:"https://www.seagm.com/" }, { name:"VNGGames", url:"https://vnggames.com/" }, { name:"Garena", url:"https://www.garena.com/" }, { name:"Dunia Games", url:"https://duniagames.co.id/" }, { name:"WinZO", url:"https://www.winzo.com/" }, { name:"MPL (Mobile Premier League)", url:"https://www.mpl.live/" }, { name:"Ludo King™", url:"https://ludoking.com/" }, { name:"Krikya", url:"https://krikya.com/" }, { name:"MJ88 (M88)", url:"https://www.m88.com/" }, { name:"Googly", url:"https://googly.com/" } ], "westasia": [ { name:"Tamatem Games", url:"https://tamatemgames.com/" }, { name:"Yaahlan", url:"https://yaahlan.com/" }, { name:"Kafu Games", url:"https://kafugames.com/" }, { name:"Babil Games", url:"https://babilgames.com/" }, { name:"Games-Arabia.com", url:"https://games-arabia.com/" }, { name:"beGAME", url:"https://begame.com/" }, { name:"Carry1st", url:"https://carry1st.com/" }, { name:"Gamr", url:"https://gamr.com/" }, { name:"Mettlestate", url:"https://mettlestate.com/" } ], "europe": [ { name:"Gameforge", url:"https://gameforge.com/" }, { name:"4Players", url:"https://www.4players.de/" }, { name:"Fanatical", url:"https://www.fanatical.com/" }, { name:"R2Games", url:"https://www.r2games.com/" }, { name:"Hatch", url:"https://www.hatch.gg/" }, { name:"Big Fish Games", url:"https://www.bigfishgames.com/" }, { name:"BigD Gaming", url:"https://www.bigdgaming.net/" }, { name:"HytaleANZ", url:"https://hytaleanz.com/" }, { name:"freegames.nz", url:"https://freegames.nz/" } ], "americas": [ { name:"Atomix.vg", url:"https://atomix.vg/" }, { name:"TierraGamer", url:"https://tierragamer.com/" }, { name:"1Up Gaming MX", url:"https://1upgamingmx.com/" }, { name:"PlayUZU.mx", url:"https://playuzu.mx/" }, { name:"Winpot.mx", url:"https://winpot.mx/" }, { name:"Ubuy Mexico", url:"https://www.ubuy.mx/" }, { name:"Spinoo.mx", url:"https://spinoo.mx/" }, { name:"MXWin", url:"https://mxwin.com/" }, { name:"CMillonario.com", url:"https://cmillonario.com/" }, { name:"Adrenaline", url:"https://adrenaline.com.br/" }, { name:"MMOJOGO", url:"https://mmojogo.com/" }, { name:"Hype.games", url:"https://hype.games/" }, { name:"ViVa Games", url:"https://vivagames.com/" }, { name:"PlayUZU", url:"https://playuzu.com/" } ], "initial": [ { name:"17173 H5", url:"https://h5.17173.com/" }, { name:"Yuppiy", url:"https://yuppiy.com/cn/" }, { name:"Easegame", url:"https://easegame.com/zh" }, { name:"Playhop", url:"https://playhop.com/zh" } ] }; // 分类键值与翻译键的映射 const categoryKeys = [ { key: "global", transKey: "🌐 Global Platforms" }, { key: "indie", transKey: "🎨 Indie & Creative" }, { key: "retro", transKey: "📀 Retro & Flash Archive" }, { key: "io", transKey: "⚔️ Multiplayer & .io Games" }, { key: "cloud", transKey: "☁️ Cloud & China Platforms" }, { key: "edu", transKey: "🎓 Educational / School Accessible" }, { key: "jpkr", transKey: "🇯🇵 Japan & Korea & East Asia" }, { key: "seasia", transKey: "🌏 Southeast & South Asia" }, { key: "westasia", transKey: "🐫 West Asia, Central Asia & Africa" }, { key: "europe", transKey: "🇪🇺 Europe & Oceania" }, { key: "americas", transKey: "🌎 Americas (North & Latin)" }, { key: "initial", transKey: "🔗 Initial Provided Links" } ]; // ---------- 创建 UI ---------- const btn = document.createElement('div'); btn.id = 'game-nav-btn'; btn.innerHTML = '🎮'; btn.style.cssText = ` position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px; background: #1e2a3a; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; z-index: 999999; box-shadow: 0 4px 12px rgba(0,0,0,0.3); transition: all 0.2s; user-select: none; touch-action: manipulation; `; btn.onmouseenter = () => btn.style.background = '#e67e22'; btn.onmouseleave = () => btn.style.background = '#1e2a3a'; const panel = document.createElement('div'); panel.id = 'game-nav-panel'; panel.style.cssText = ` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); `; const modal = document.createElement('div'); modal.style.cssText = ` width: 90%; max-width: 1000px; height: 85%; max-height: 90vh; background: #fefefe; border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; box-shadow: 0 20px 40px rgba(0,0,0,0.3); `; const header = document.createElement('div'); header.style.cssText = ` padding: 14px 20px; background: #1e2a3a; color: white; display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: bold; flex-shrink: 0; `; const titleSpan = document.createElement('span'); titleSpan.id = 'panel-title'; const langBtn = document.createElement('button'); langBtn.id = 'lang-switch-btn'; langBtn.style.cssText = ` background: rgba(255,255,255,0.2); border: none; color: white; font-size: 14px; padding: 4px 10px; border-radius: 20px; cursor: pointer; margin-left: 12px; transition: 0.2s; `; langBtn.onmouseenter = () => langBtn.style.background = 'rgba(255,255,255,0.4)'; langBtn.onmouseleave = () => langBtn.style.background = 'rgba(255,255,255,0.2)'; const headerRight = document.createElement('div'); headerRight.style.cssText = `display: flex; align-items: center; gap: 12px;`; const closeSpan = document.createElement('span'); closeSpan.id = 'close-nav-panel'; closeSpan.innerHTML = '×'; closeSpan.style.cssText = `cursor:pointer; font-size:28px; line-height:1;`; headerRight.appendChild(langBtn); headerRight.appendChild(closeSpan); header.appendChild(titleSpan); header.appendChild(headerRight); const searchBox = document.createElement('div'); searchBox.style.cssText = ` padding: 12px 20px; background: #f1f5f9; border-bottom: 1px solid #cbd5e1; flex-shrink: 0; `; const searchInput = document.createElement('input'); searchInput.type = 'text'; searchInput.id = 'search-input'; searchInput.style.cssText = ` width: 100%; padding: 12px 16px; font-size: 16px; border: 1px solid #cbd5e1; border-radius: 40px; box-sizing: border-box; outline: none; background: white; `; searchBox.appendChild(searchInput); const contentDiv = document.createElement('div'); contentDiv.id = 'content-div'; contentDiv.style.cssText = ` flex: 1; overflow-y: auto; padding: 16px 20px; `; modal.appendChild(header); modal.appendChild(searchBox); modal.appendChild(contentDiv); panel.appendChild(modal); document.body.appendChild(panel); document.body.appendChild(btn); // 更新界面文本和分类 function updateLanguage() { const t = translations[currentLang]; titleSpan.textContent = t.panelTitle; searchInput.placeholder = t.searchPlaceholder; langBtn.textContent = t.langSwitch; // 重新渲染 renderSites(searchInput.value); } function renderSites(filter = '') { contentDiv.innerHTML = ''; const lowerFilter = filter.toLowerCase(); let hasAny = false; const t = translations[currentLang]; for (const cat of categoryKeys) { const sites = siteCategories[cat.key]; const filtered = sites.filter(s => s.name.toLowerCase().includes(lowerFilter)); if (filtered.length === 0) continue; hasAny = true; const catDiv = document.createElement('div'); catDiv.style.marginBottom = '24px'; const catTitle = document.createElement('div'); catTitle.style.cssText = ` font-size: 18px; font-weight: 700; border-left: 5px solid #e67e22; padding-left: 12px; margin-bottom: 12px; color: #0f172a; `; // 获取翻译后的分类名 const translatedCatName = t.categories[cat.transKey] || cat.transKey; catTitle.textContent = translatedCatName; catDiv.appendChild(catTitle); const grid = document.createElement('div'); grid.style.cssText = ` display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; `; for (const site of filtered) { const link = document.createElement('a'); link.href = site.url; link.target = '_blank'; link.rel = 'noopener noreferrer'; link.textContent = site.name; link.style.cssText = ` display: block; padding: 8px 12px; background: #ffffff; border-radius: 12px; text-decoration: none; color: #2563eb; font-size: 14px; font-weight: 500; transition: 0.1s; border: 1px solid #e2e8f0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; `; link.onmouseenter = () => link.style.backgroundColor = '#eff6ff'; link.onmouseleave = () => link.style.backgroundColor = '#fff'; link.addEventListener('touchstart', () => link.style.backgroundColor = '#eff6ff'); link.addEventListener('touchend', () => link.style.backgroundColor = '#fff'); grid.appendChild(link); } catDiv.appendChild(grid); contentDiv.appendChild(catDiv); } if (!hasAny) { contentDiv.innerHTML = `