您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2022/4/18 12:38:58
当前为
// ==UserScript== // @name 给 p5js.org 加分段 // @namespace leizingyiu.net // @match http*://p5js.org/* // @grant none // @version 0.0.1 // @author leizingyiu // @description 2022/4/18 12:38:58 // @license GNU AGPLv3 // ==/UserScript== function yiu_styling_p5js_org(){ [...document.querySelectorAll('p')].map(p=>{ p.innerHTML=p.innerHTML.replace(/(•)/g,`<span class='yiu_br'></span>$1`); }); style_id='yiu_style'; style_innerHTML=` .yiu_br{ height:1em; width:100%; display:block; } p{ border-top: solid 1px #eee; margin-top: 1em; } .paramtype p { border-top: initial; margin-top: initial; } .paramtype p em{ display:block; margin-top:1em; } .paramname{ max-width: 25%; } `; if(document.getElementById(style_id)){ document.getElementById(style.id).innerHTML=style.innerHTML; }else{ let style=document.createElement('style'); style.id=style_id; style.innerHTML=style_innerHTML; document.head.appendChild(style); } } if(document.body){ main=String(yiu_styling_p5js_org); window.addEventListener('load',()=>{ setTimeout("eval('('+main+')()')",500); }); }