Load and setup Eruda, DOM plugin included
当前为
// ==UserScript==
// @name Eruda Loader
// @description Load and setup Eruda, DOM plugin included
// @namespace Eruda
// @author RainSlide
// @match *://*/*
// @exclude-match https://eruda.liriliri.io/*
// @version 1.0
// @require https://cdn.jsdelivr.net/npm/eruda
// @require https://cdn.jsdelivr.net/npm/eruda-dom
// @grant none
// @run-at document-idle
// @noframes
// ==/UserScript==
"use strict";
if ( !eruda._isInit ) {
eruda.init();
/*
eruda.init({
// container: containerElement,
// tool: [ "toolName1", "toolName2" ],
// useShadowDom: true,
// autoScale: true,
// defaults: {
// transparency: 1,
// displaySize: 80,
// theme: "themeName"
// }
});
*/
eruda.get("console").config.set(
"maxLogNum", 256
);
eruda.add(erudaDom);
(() => {
eruda._shadowRoot.appendChild(
document.createElement("style")
).textContent = `
/* Circlize the entry button */
.eruda-container .eruda-entry-btn {
border-radius: 50%;
}
.eruda-icon-tool::before {
vertical-align: middle;
}
`.trim();
})();
}