🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/10 09:14:14
🔄 下次更新时间:2026/01/10 10:14:14
手动刷新缓存

Diep.io Lobby Selector

Press TAB to show/ hide Lobby Selector

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         Diep.io Lobby Selector
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  Press TAB to show/ hide Lobby Selector
// @author       A-76    Discord: anuryx. (Github: XyrenTheCoder)
// @match        https://dieplobbypicker.io/
// @match        *://diep.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=diep.io
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const container = document.createElement('div');
    container.style.position = 'fixed';
    container.style.padding = '10px';
    container.style.zIndex = 1000;
    container.style.backgroundColor = '#121212';
    container.style.border = '1px solid #696969';
    container.style.overflowY = 'auto';
    container.style.maxHeight = '80%';
    container.style.width = '250px';
    container.style.display = 'none';
    document.body.appendChild(container);

    function fetchLobbyData() {
        fetch('https://lb.diep.io/api/lb/pc')
            .then(response => response.json())
            .then(data => {
                updateMenu(data.regions);
            })
            .catch(error => console.error('Error fetching lobby data:', error));
    }

    function updateMenu(regions) {
        container.innerHTML = '';

        regions.forEach(region => {
            const regionTitle = document.createElement('h6');
            regionTitle.style.fontSize = '80%';
            regionTitle.style.color = '#ccc';
            regionTitle.style.margin = '10%';
            regionTitle.innerText = region.regionName;
            container.appendChild(regionTitle);
            container.appendChild(document.createElement('hr'));

            const sortedLobbies = region.lobbies.sort((a, b) => a.gamemodeName.localeCompare(b.gamemodeName));

            sortedLobbies.forEach(lobby => {
                const button = document.createElement('button');
                button.innerText = `${lobby.gamemodeName} (${lobby.numPlayers-10} Players)`; //average real player count
                button.style.width = '100%';
                button.style.marginBottom = '5px';
                button.style.padding = '5px';
                button.style.color = 'white';
                button.style.borderRadius = '5px';
                button.style.borderWidth = '2px';
                button.style.borderStyle = 'solid';
                button.style.cursor = 'pointer';
                button.style.transition = 'box-shadow 0.3s ease';
                button.style.backgroundColor = '#1f1f1f';
                button.style.boxShadow = '0 0 8px rgba(0, 0, 0, 0.5)';


                if (lobby.gamemode == 'teams') {
                    button.style.borderImage = 'linear-gradient(to top right, hsl(165.625 39.669% 52.549%), hsl(118.681 40.444% 55.882%), hsl(86.667 48.293% 59.804%)) 1';
                    button.style.boxShadow = '0 0 8px #82ff43';
                } else if (lobby.gamemode == '4teams') {
                    button.style.borderImage = 'linear-gradient(to top right, hsl(0 88.732% 53.235%), hsl(20 81.522% 63.922%)) 1';
                    button.style.boxShadow = '0 0 8px #ff4343';
                } else if (lobby.gamemode == 'ffa') {
                    button.style.borderImage = 'linear-gradient(to top right, hsl(210.683 88.732% 58.235%), hsl(190 81.522% 63.922%)) 1';
                    button.style.boxShadow = '0 0 8px #43fff9';
                } else if (lobby.gamemode == 'maze') {
                    button.style.borderImage = 'linear-gradient(to top right, hsl(18 calc(1 * 81.522%) 63.922% / 1), hsl(39.683 calc(1 * 88.732%) 58.235% / 1)) 1';
                    button.style.boxShadow = '0 0 8px #ffde43';
                } else if (lobby.gamemode == 'sandbox') {
                    button.style.borderImage = 'linear-gradient(to top right, hsl(270.683 88.732% 53.235%), hsl(300 81.522% 63.922%)) 1';
                    button.style.boxShadow = '0 0 8px #8543ff';
                } else {
                    button.style.borderImage = 'linear-gradient(to top right, hsl(228.683 88.732% 53.235%), hsl(252 81.522% 63.922%)) 1';
                    button.style.boxShadow = '0 0 8px #437fff';
                }

                const baseUrl = `https://diep.io/?lobby=${region.region}_${lobby.gamemode}_${lobby.ip}_x_x`;

                button.onclick = function() {
                    window.open(baseUrl, '_blank');
                };

                container.appendChild(button);
            });
        });
    }


    document.addEventListener('keydown', (event) => {
        if (event.key === 'Tab') {
            event.preventDefault();
            container.style.display = container.style.display === 'none' ? 'block' : 'none';
        }
    });

    fetchLobbyData();
    setInterval(fetchLobbyData, 1000);
})();