Second, replace the response is specified in the string
1, add switch before OnBeforeResponse
Public static RulesOption (" replace the return value specifies the string ")
Var m_showReplaceString: Boolean=false;
2, add the following code within the OnBeforeResponse and save the js
//replace the response is specified in the string, quotes need to escape
//oSession. HostnameIs (" www.baidu.com "), the replacement for the specified domain name www.baidu.com
//ExistsAndContains (" the content-type ", "application/json") according to the Response headers to modify the value of the content-type
If (m_showReplaceString & amp; & OSession. HostnameIs (" www.baidu.com ") & amp; & OSession. OResponse. Headers. ExistsAndContains (" the content-type ", "application/json")) {
//to decode format decoding
OSession. UtilDecodeResponse ();
//replace former string
Var oReplaceStrings=new Array (" basketball ");
//replacement string (corresponding)
Var oNewStings=new Array (" soccer ");
Var iEach=0;
OSession [" UI - customcolumn "]=String. The Empty;
For (iEach; IEach
If (oSession. UtilReplaceInResponse (oReplaceStrings [iEach], oNewStings [iEach])) {
//color tag
OSession [" UI - color "]="# B03060";
//bold
OSession [" UI - bold "]="true";
//is replaced in the custom to identify the response string
OSession [" UI - customcolumn "] +=oReplaceStrings [iEach] + "; ";
}
}
}