AWBW Pixel Pefector

Forces all game sprites to look cleaner and nicer and cuter

目前為 2023-02-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         AWBW Pixel Pefector
// @namespace    https://awbw.amarriner.com/
// @version      1.1
// @description  Forces all game sprites to look cleaner and nicer and cuter
// @author       twiggy_
// @match        https://awbw.amarriner.com/*?games_id=*
// @match        https://awbw.amarriner.com/*?replays_id=*
// @icon         https://awbw.amarriner.com/favicon.ico
// @license MIT
// ==/UserScript==

var gameMap = document.getElementById('gamemap');
gameMap.style.imageRendering = 'pixelated';

var calc = document.getElementById('calculator');
calc.style.imageRendering = 'pixelated';

var weatherCanvas = document.getElementById('weather-canvas');
weatherCanvas.style.imageRendering = 'pixelated';

// Icons and UI
var tileInfoWindow = document.getElementsByClassName('tile-info');
Array.prototype.forEach.call(tileInfoWindow, function(win) {
    win.style.imageRendering = 'pixelated';
});

var playerContainers = document.getElementsByClassName('player-overview-container');
Array.prototype.forEach.call(playerContainers, function(container) {
    container.style.imageRendering = 'pixelated';
});

var eventCOs = document.getElementsByClassName('event-cos');
Array.prototype.forEach.call(eventCOs, function(co) {
    co.style.imageRendering = 'pixelated';
});