Surviv.io CustomCSS & BugFix

A script meant for streamers, adding a nice little "Streamer Mode" effect to the game.

目前為 2019-07-16 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Surviv.io CustomCSS & BugFix
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  A script meant for streamers, adding a nice little "Streamer Mode" effect to the game.
// @author       DamienVesper
// @match        *://surviv.io/*
// @match        *://surviv2.io/*
// @match        *://2dbattleroyale.com/*
// @match        *://2dbattleroyale.org/*
// @match        *://piearesquared.info/*
// @match        *://thecircleisclosing.com/*
// @match        *://parmainitiative.com/*
// @match        *://ot38.club/*
// @grant        none
// ==/UserScript==

(function() {
    /*
    LEGAL
     - All code licensed under the Apache 2.0 License. Code copyright 2019 by DamienVesper. All rights reserved.
     - All code reproductions must include the below insigna.
     - Any reproductions of this and other related works that are found to be in violence of this code will be reported and removed.
                         ____                                            _
     |\   \      /      |    |                                          |_|
     | \   \    /       |____|  __   __   __   __   __    __ __   __ __      __   __
     | /    \  /        |      |  | |  | |  | |  | |  |  |  |  | |  |  | |  |  | |  |
     |/      \/         |      |    |__| |__| |    |__|_ |  |  | |  |  | |  |  | |__|
                                            |                                       |
                                          __|                                     __|
    */

    'use strict';

    setInterval(function() {
        //Squad BugFix
        if(document.querySelector(`#btn-start-team`)) document.querySelector(`#btn-start-team`).style.display = `block`;

        //Streamer Mode / Blur Effect
        if(document.querySelector(`#ad-block-left > #news`)) document.querySelector(`#ad-block-left > #news`).remove();
        if(document.querySelector(`#news-block > #news`)) document.querySelector(`#news-block > #news`).remove();

        document.querySelector(`#ad-block-left`).style.height = `325px`;
        document.querySelector(`#ad-block-left`).style.overflowY = `hidden`;

        let blurElements = document.querySelectorAll(`.account-player-name, .featured-streamer > a, #featured-youtuber a`)
        for(let i = 0; i < blurElements.length; i++) blurElements[i].style.filter = `blur(5px)`;

        let removeShadowElements = document.querySelectorAll(`#news-block, #social-share-block, #start-menu, #team-menu`);
        for(let i = 0; i < removeShadowElements.length; i++) removeShadowElements[i].style.boxShadow = ``;

        document.querySelector(`#background`).style.filter = `blur(2.5px)`;
    });
})();