forked from newthuhole/hole_thu_frontend
叠尼🐴呢?
This commit is contained in:
@@ -57,3 +57,8 @@
|
||||
border-bottom: 1px solid black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.easter-egg-dmm-disable {
|
||||
cursor: not-allowed;
|
||||
user-select: none !important;
|
||||
}
|
||||
@@ -62,6 +62,7 @@ export class HighlightedText extends PureComponent {
|
||||
rule==='pid' ? <a href={'##'+p} onClick={(e)=>{e.preventDefault(); this.props.show_pid(p);}}>{p}</a> :
|
||||
rule==='nickname' ? <span style={{backgroundColor: this.props.color_picker.get(p)}}>{p}</span> :
|
||||
rule==='search' ? <span className="search-query-highlight">{p}</span> :
|
||||
rule==='disable' ? <span className="easter-egg-dmm-disable">{p}</span> :
|
||||
p
|
||||
}</span>
|
||||
);
|
||||
|
||||
@@ -6,6 +6,9 @@ export function split_text(txt,rules) {
|
||||
// rules: [['name',/regex/],...]
|
||||
// return: [['name','part'],[null,'part'],...]
|
||||
|
||||
if(window.config.easter_egg && txt.indexOf('浏览器咑閞')!==-1)
|
||||
return [['disable',txt]];
|
||||
|
||||
txt=[[null,txt]];
|
||||
rules.forEach((rule)=>{
|
||||
let [name,regex]=rule;
|
||||
|
||||
Reference in New Issue
Block a user