Browse Source

不用HTML的方式,而是以CSS的方式

tags/v9.1
枫谷剑仙 5 years ago
parent
commit
246acd5dad
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      script-universal_function.js
  2. +1
    -0
      style.css

+ 1
- 1
script-universal_function.js View File

@@ -525,7 +525,7 @@ function cardN(id){
function descriptionToHTML(str)
{
str = str.replace(/\n/ig,"<br>"); //换行
str = str.replace(/ /ig,"&nbsp;"); //换行
//str = str.replace(/ /ig,"&nbsp;"); //换行
str = str.replace(/\^([a-fA-F0-9]+?)\^([^\^]+?)\^p/igm,'<span style="color:#$1;">$2</span>'); //文字颜色
str = str.replace(/\%\{m([0-9]{1,4})\}/g,function (str, p1, offset, s){return cardN(parseInt(p1,10)).outerHTML;}); //怪物头像
return str;


+ 1
- 0
style.css View File

@@ -79,6 +79,7 @@ body{
box-sizing: border-box;
padding: 1px;
margin: 0;
white-space: pre-wrap;
}

.guide-mod .control-box>div.status


Loading…
Cancel
Save