Protox Block Tooltip+

Adds more details to the tooltip

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Protox Block Tooltip+
// @namespace    https://restrictedword.github.io/
// @version      1.0
// @description  Adds more details to the tooltip
// @author       Word
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=protox.io
// @grant        none
// ==/UserScript==

(()=>{"use strict";const t="[ProtoxTooltip]",o="https://restrictedword.github.io/protox/data/block_info.json";let e=null,n=!1,r=null;function c(){return document.getElementById("global-tooltip")}function a(t,o){const e=document.createElement("div");e.dataset.extraProp="true",e.textContent=o,t.appendChild(e)}async function fetchJSON(){if(e)return e;try{const n=await fetch(o);e=await n.json()}catch(o){}return e}async function init(){await fetchJSON();const l=c();if(!l)return;new MutationObserver((()=>{const o=l.textContent.match(/id:\s*(\d+)/i);if(!o)return;const i=o[1];i!==r&&(r=i,async function(o){if(!o||!e||n)return;const r=c();if(!r)return;const l=e[String(o)];l&&(n=!0,function(t){t.querySelectorAll("[data-extra-prop]").forEach((t=>t.remove()))}(r),!0===l.transparent&&a(r,"transparent: true"),!0===l.penetrable&&a(r,"penetrable: true"),"number"==typeof l.impactResistance&&a(r,`impactResistance: ${l.impactResistance}`),!0===l.climbable&&a(r,"climbable: true"),requestAnimationFrame((()=>{n=!1})))})(i)})).observe(l,{childList:!0,subtree:!0,characterData:!0})}init()})()