Evade and deceive

Better evades.io experience

当前为 2021-05-29 提交的版本,查看 最新版本

// ==UserScript==
// @name         Evade and deceive
// @version      0.3
// @description  Better evades.io experience
// @author       Shädam
// @match        https://evades.io
// @icon         https://www.google.com/s2/favicons?domain=evades.io
// @grant        none
// @run-at       document-body
// @namespace https://greasyfork.org/users/719520
// ==/UserScript==

"use strict";

const style = document.createElement("style");
style.innerHTML = `
body, html {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  overflow-x: hidden;
}
.hero-select-heroes-container {
  height: auto;
  width: 100%;
  overflow: hidden;
  padding: 0;
  margin-left: 50px;
  padding-bottom: 100px;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #888;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}
#chat-input {
  border: 0;
}
#leaderboard {
  max-height: 650px;
}
.changelog {
  height: 300px;
  transform: translate(-500px, -50px);
}
`;
const canvas = document.getElementById("canvas");
canvas.getContext("2d").miterLimit = 1;
new MutationObserver(function(mutationsList, observer) {
  document.body.appendChild(style);
  observer.disconnect();
}).observe(document.body, { attributes: false, childList: true, subtree: false });
window.onbeforeunload = function(e) {
  if(window.socket != null) {
    e.preventDefault();
    e.returnValue = "Are you sure you want to quit?";
    return "Are you sure you want to quit?";
  }
};
canvas.oncontextmenu = function(e) {
	e = e || window.event;
	e.preventDefault();
};