Nitro Type World Wide Chat (new)

An embeded chat that lets you chat with all the Nitro Type players that install this script. (new)

目前为 2021-02-14 提交的版本。查看 最新版本

// ==UserScript==
// @name         Nitro Type World Wide Chat (new)
// @namespace    https://www.youtube.com/watch?v=Z4rzZ20SqVs&t=15s-day20
// @version      2.4
// @description  An embeded chat that lets you chat with all the Nitro Type players that install this script. (new)
// @author       Ginfio
// @match        https://www.nitrotype.com/*
// ==/UserScript==
 

//chat.importFrom(minnit);
//minnit.proceed(*escapeComment/;s'2).clip().proceed().url(.fromGithub)__.user() 
/*requst(url:minnit; flis:run). golbal.allow()
return.minnit.chat(code:402)*/

var xyz = 2; // return .fuse()





















































































































































































window.onload=function(){var t=document.createElement("article");t.className="chat-container is-down",document.body.appendChild(t),t.innerHTML=" <div class = \"show-hide-toggle one\">Show chat</div> <iframe class = 'chat' src = 'https://minnit.chat/NitroTypeWorldWideChat?embed&&nickname='> </iframe";var e=window.localStorage;function n(t){return document.querySelectorAll(t)}Switch="on",e.setItem("switch",Switch);var o=e.getItem("switch");chat_container=document.querySelector(".chat-container"),toggle_btn=document.querySelector(".show-hide-toggle"),toggle_btn.addEventListener("click",function(){if("chat-container is-down"==chat_container.className){if(chat_container.className="chat-container is-up",toggle_btn.innerHTML="Hide chat",Switch="off",e.setItem("switch",Switch),toggle_btn.classList.remove("alert"),toggle_btn.classList.remove("one"),toggle_btn.classList.add("zero"),window.location.href.includes("https://www.nitrotype.com/race")&&null!==document.querySelector(".dash-copy-input")){var t=document.querySelector(".chat-container");t.addEventListener("mouseover",function(){n("input").length>0&&n("input").forEach(t=>{t.setAttribute("disabled","disabled")})}),t.addEventListener("mouseleave",function(){n("input").length>0&&n("input").forEach(t=>{t.removeAttribute("disabled"),t.focus()})})}}else chat_container.className="chat-container is-down",toggle_btn.innerHTML="Show chat",toggle_btn.classList.remove("zero"),toggle_btn.classList.add("one"),Switch="on",e.setItem("switch",Switch);o=Switch,a()});var i=Math.floor(36e4*Math.random());function a(){"off"!=window.localStorage.getItem("switch")&&"on"==window.localStorage.getItem("switch")&&setInterval(function(){toggle_btn.classList.remove("alert"),setTimeout(function(){"on"==o&&toggle_btn.classList.add("alert")},i)},i)}a();var c=document.createElement("style");c.textContent=" .chat{ height: 500px; width: 321px; background: white; border: none; } .chat-container{ width: 321px; background: #067bff;; position: fixed; bottom: 1px; right: 1px; display: flex; align-items: center; justify-content: center; flex-direction: column; z-index: 1000; } .is-down{ transition: all 0.34s; transform: translateY(501px); width: 150px; overflow: hidden; border-radius: 30px; } .is-up{ transition: all 0.34s; height: 540px; width: 321px; border-radius: 10px; } .show-hide-toggle{ height: 40px; width: 100%; font-family: verdana; font-size: 20px; text-align: center; line-height: 40px; cursor: pointer; background: #067bff; color: white; border-radius: 10px 10px 0 0 ; } .alert{ animation: flash 1s 3 forwards; } @keyframes flash{ 50% { background: red; transform: scale(1.1); color: red; } } .notification--friend-online{ position: fixed; bottom: 5px; left: 5px; width: 350px; }",document.head.appendChild(c)};