Skip to content

Commit 6294b97

Browse files
committed
fix: 移除request formatter的打印
1 parent 73dabe0 commit 6294b97

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

src/formatter/request-formatter.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,6 @@ class RequestFormatter {
1818
const requestContext = scriptContext.requestContext;
1919
const language = getLanguage(getGlobalConfig().language);
2020

21-
// 提示词:
22-
// 我需要写一些console.log的样式打印在控制台上,接下来会陆陆续续给你一些写样式的任务,球球你帮帮我
23-
24-
const valueStyle = `color: black; background: #E50000; font-size: 12px; font-weight: bold;`;
25-
const normalStyle = `color: black; background: #FF6766; font-size: 12px;`;
26-
27-
const titleStyle = 'font-weight: bold; font-size: 16px; background: green; color: white; padding: 5px; border-radius: 3px;';
28-
29-
const length = 200;
30-
31-
const message = [
32-
normalStyle, fillToLength(`-------------------------------------------------- Script Hook Captured Request --------------------------------------------------`, length) + "\n",
33-
normalStyle, fillToLength(`${language.console.time}: ${new Date().toLocaleString()}`, length) + "\n",
34-
normalStyle, fillToLength(`${language.console.requestId}: ${scriptContext.requestId}`, length) + "\n",
35-
normalStyle, fillToLength(`${language.console.isJsonpRequest}: ${scriptContext.isJsonp()}`, length) + "\n",
36-
normalStyle, fillToLength(`${language.console.hostname}: ${requestContext.hostname}`, length) + "\n",
37-
normalStyle, fillToLength(`${language.console.path}: ${requestContext.path}`, length) + "\n",
38-
normalStyle, fillToLength(`${language.console.hash}: ${requestContext.hash}`, length) + "\n",
39-
normalStyle, fillToLength((() => {
40-
const paramTitle = `${language.console.param}(${requestContext.params.length})`;
41-
return paramTitle;
42-
})(), length) + "\n",
43-
44-
45-
// (() => {
46-
//
47-
// let paramTitle = `${indentSpace}`;
48-
// if (!this.params.length) {
49-
// paramTitle += " do not have param.";
50-
// }
51-
// msgs.push(paramTitle);
52-
// for (let param of this.params) {
53-
// msgs.push(param.toHumanReadable(indent + 4));
54-
// }
55-
//
56-
//
57-
// if (this.hash) {
58-
// msgs.push()
59-
// }
60-
//
61-
// return msgs.join("\n\n");
62-
// })()
63-
64-
];
65-
console.log(genFormatArray(message), ...message);
66-
6721
// 把参数以表格的形式打印
6822
// const data = this.convertParamsToTableData(language, requestContext.params);
6923
// console.table(data);

0 commit comments

Comments
 (0)