forked from newthuhole/hole_thu_frontend
叠尼🐴呢?
This commit is contained in:
@@ -56,4 +56,9 @@
|
|||||||
.search-query-highlight {
|
.search-query-highlight {
|
||||||
border-bottom: 1px solid black;
|
border-bottom: 1px solid black;
|
||||||
font-weight: bold;
|
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==='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==='nickname' ? <span style={{backgroundColor: this.props.color_picker.get(p)}}>{p}</span> :
|
||||||
rule==='search' ? <span className="search-query-highlight">{p}</span> :
|
rule==='search' ? <span className="search-query-highlight">{p}</span> :
|
||||||
|
rule==='disable' ? <span className="easter-egg-dmm-disable">{p}</span> :
|
||||||
p
|
p
|
||||||
}</span>
|
}</span>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ export function split_text(txt,rules) {
|
|||||||
// rules: [['name',/regex/],...]
|
// rules: [['name',/regex/],...]
|
||||||
// return: [['name','part'],[null,'part'],...]
|
// return: [['name','part'],[null,'part'],...]
|
||||||
|
|
||||||
|
if(window.config.easter_egg && txt.indexOf('浏览器咑閞')!==-1)
|
||||||
|
return [['disable',txt]];
|
||||||
|
|
||||||
txt=[[null,txt]];
|
txt=[[null,txt]];
|
||||||
rules.forEach((rule)=>{
|
rules.forEach((rule)=>{
|
||||||
let [name,regex]=rule;
|
let [name,regex]=rule;
|
||||||
|
|||||||
Reference in New Issue
Block a user