Greasy Fork

Vanis++

This extension adds needed functions to the game Vanis.io

目前为 2020-05-30 提交的版本。查看 最新版本

// ==UserScript==
// @name     Vanis++
// @version  0.1
// @author   Ross
// @description This extension adds needed functions to the game Vanis.io
// @match    https://vanis.io/*
// @grant    none
// @namespace https://greasyfork.org/users/574646
// ==/UserScript==
function GM_addStyle(cssStr) {
    var D = document;
    var newNode = D.createElement('style');
    newNode.textContent = cssStr;

    var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement;
    targ.appendChild(newNode);
}

if (window.location.origin + window.location.pathname == 'https://vanis.io' || 'https://vanis.io/') {
    setTimeout(function() {
        document.getElementById("ab-overlay").remove();
        GM_addStyle(`
            * {
                cursor: crosshair !important;
            }
       `);
        var elements = document.getElementsByTagName("*");
        for (var id = 0; id < elements.length; ++id) {
            elements[id].oncontextmenu = null;
        }
    }, 1500);
}