Minefun → Minecraft Style 🧱

Biến minefun thành phong cách Minecraft (visual)

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Minefun → Minecraft Style 🧱
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Biến minefun thành phong cách Minecraft (visual)
// @match        *://minefun.io/*
// @match        *://*.minefun.io/*
// @grant        none
// ==/UserScript==

(function(){
'use strict';

let on=false;

const btn=document.createElement("div");
btn.innerHTML="🧱";
btn.style.position="fixed";
btn.style.top="120px";
btn.style.left="120px";
btn.style.width="60px";
btn.style.height="60px";
btn.style.background="#3b7a3b";
btn.style.border="4px solid #2a5a2a";
btn.style.fontFamily="monospace";
btn.style.color="#fff";
btn.style.display="flex";
btn.style.alignItems="center";
btn.style.justifyContent="center";
btn.style.cursor="pointer";
btn.style.zIndex="999999";

document.body.appendChild(btn);

const style=document.createElement("style");
style.innerHTML=`

body.minecraft canvas{
image-rendering: pixelated !important;
filter: contrast(1.2) saturate(1.1) brightness(0.95);
}

body.minecraft *{
font-family: monospace !important;
}

body.minecraft::before{
content:'';
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
pointer-events:none;
background:url('https://i.imgur.com/8Qx4K3X.png');
opacity:0.2;
mix-blend-mode:multiply;
}

`;

document.head.appendChild(style);

btn.onclick=()=>{
on=!on;
document.body.classList.toggle("minecraft",on);
btn.style.background=on?"#2a5a2a":"#3b7a3b";
};

})();