(x, y, mark)
| 2507 | } //reJsValue |
| 2508 | |
| 2509 | function getQxReInfo(x, y, mark) { |
| 2510 | let noteK = isNoteK(x) |
| 2511 | let retype = /\surl\s+request-/i.test(x) ? 'request' : 'response' |
| 2512 | let jstype = 'http-' + retype |
| 2513 | let hdorbd = /\surl\s+re[^\s]+?-header\s/i.test(x) ? 'header' : 'body' |
| 2514 | let breakpoint = retype + '-' + hdorbd |
| 2515 | let jsptn = x.split(/\s+url\s+re/)[0].replace(/^#/, '') |
| 2516 | let jsname = /body/.test(hdorbd) ? 'replaceBody' : 'replaceHeader' |
| 2517 | let jsurl = /header/.test(hdorbd) |
| 2518 | ? 'https://raw.githubusercontent.com/Script-Hub-Org/Script-Hub/main/scripts/replace-header.js' |
| 2519 | : 'https://raw.githubusercontent.com/Script-Hub-Org/Script-Hub/main/scripts/replace-body.js' |
| 2520 | let rearg1 = x.split(breakpoint)[1].trim() |
| 2521 | let rearg2 = x.split(breakpoint)[2].trim() |
| 2522 | let jsarg = encodeURIComponent(rearg1 + '->' + rearg2) |
| 2523 | let rebody = /body/.test(hdorbd) ? 'true' : '' |
| 2524 | let size = /body/.test(hdorbd) ? '-1' : '' |
| 2525 | jsBox.push({ mark, noteK, jsname, jstype, jsptn, jsurl, rebody, size, timeout: '30', jsarg, ori: x, num: y }) |
| 2526 | } |
| 2527 | |
| 2528 | function getHn(x, arr, addMethod, toggleKey = '') { |
| 2529 | let hnBox2 = x |
no test coverage detected