|
@@ -3,14 +3,16 @@
|
|
*/
|
|
*/
|
|
export function DebugProtectionFunctionCallTemplate (): string {
|
|
export function DebugProtectionFunctionCallTemplate (): string {
|
|
return `
|
|
return `
|
|
- var regExp1 = new RegExp('function *\\\\( *\\\\)');
|
|
|
|
- var regExp2 = new RegExp('_0x([a-f0-9]){4,6} *\\\\(\\\\+\\\\+ *_0x([a-f0-9]){4,6} *\\\\)');
|
|
|
|
- var result = {debugProtectionFunctionName}('init');
|
|
|
|
-
|
|
|
|
- if (!regExp1.test(result + 'chain') || !regExp2.test(result + 'input')) {
|
|
|
|
- result('0');
|
|
|
|
- } else {
|
|
|
|
- {debugProtectionFunctionName}();
|
|
|
|
- }
|
|
|
|
|
|
+ (function () {
|
|
|
|
+ var regExp1 = new RegExp('function *\\\\( *\\\\)');
|
|
|
|
+ var regExp2 = new RegExp('\\\\+\\\\+ *_0x([a-f0-9]){4,6}');
|
|
|
|
+ var result = {debugProtectionFunctionName}('init');
|
|
|
|
+
|
|
|
|
+ if (!regExp1.test(result + 'chain') || !regExp2.test(result + 'input')) {
|
|
|
|
+ result('0');
|
|
|
|
+ } else {
|
|
|
|
+ {debugProtectionFunctionName}();
|
|
|
|
+ }
|
|
|
|
+ })();
|
|
`;
|
|
`;
|
|
}
|
|
}
|