Skip to content

Commit 1d14a10

Browse files
authored
feat: DOM intercept (#97)
1 parent 7650c09 commit 1d14a10

File tree

9 files changed

+860
-132
lines changed

9 files changed

+860
-132
lines changed

package-lock.json

Lines changed: 434 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
"flat-options": "^0.1.3",
101101
"format-message": "^6.2.3",
102102
"from2": "^2.3.0",
103+
"html-select": "^2.3.24",
104+
"html-tokenize": "^2.0.1",
103105
"js-cookie": "^2.2.1",
104106
"jwt-decode": "^3.1.2",
105107
"libsodium-wrappers": "^0.7.8",
@@ -127,9 +129,10 @@
127129
"readable-stream": "^3.6.0",
128130
"robust-websocket": "^1.0.0",
129131
"stream-browserify": "^3.0.0",
132+
"through2": "^4.0.2",
130133
"typedarray-to-buffer": "^4.0.0",
131134
"url": "^0.11.0",
132135
"utf-8-validate": "^5.0.4",
133136
"uuid": "^8.3.2"
134137
}
135-
}
138+
}

src/channel/channel.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,14 +1018,15 @@ module.exports = class ZitiChannel {
10181018

10191019
// let str = String.fromCharCode.apply(null, bodyView).substring(0, bodyView.length);
10201020

1021-
// str = str.replace('var openMe = (window.parent', 'debugger; var openMe = (window.parent');
1021+
// // str = str.replace('var openMe = (window.parent', 'debugger; var openMe = (window.parent');
10221022

1023-
// // str = str.replace('document.cookie = a;', 'document.cookie = a; debugger');
1023+
// if (str.indexOf( '/api/extplugins/config' ) !== -1) {
1024+
// debugger
1025+
// }
10241026

1025-
// // this._ctx.logger.debug("============== DEBUG INJECT: %s", str);
1027+
// this._ctx.logger.debug("============== DEBUG INJECT: %s", str);
10261028

10271029
// bodyView = new TextEncoder("utf-8").encode(str);
1028-
// }
10291030

10301031
// }
10311032

0 commit comments

Comments
 (0)