Allow player to write digicode on DreadCast
目前為
// ==UserScript==
// @name DC - Digimobile
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Allow player to write digicode on DreadCast
// @author Ajira
// @match https://www.dreadcast.net/Main
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.getElementById("zone_lightBox").addEventListener('DOMNodeInserted', function() {
var digiInput = document.getElementById("lb_textinput_digicode");
if (digiInput == null) { return; }
var digiForm = digiInput.parentNode.parentNode;
if (digiForm == null) { return; }
if (digiForm.getAttribute("test") == "test") { return; }
digiInput.setAttribute("style", "border:1px solid red;");
digiForm.setAttribute("test", "test");
document.getElementById("zone_lightBox").appendChild(digiForm.cloneNode(true));
}, false);
})();