injected-notify
v1.0.1-0
Published
A lib to do callback when http site be injected by network operator
Downloads
2
Readme
injected-notify
http注入感知、防御工具 /A lib to do callback when http site be injected by network operator
Usage
npm i injected-notify --save
In AMD
const InjectedNotify = require('injected-notify');
InjectedNotify.init(['alicdn.com'], true, function(injectUrl) {
// injectUrl = ['xxx.com/xxx.js','xxx.cn/xxx.js']
});
In Browers
<head>
<script src="./injected-notify.js"></script>
<script>(function () {
window.global_injected_notify.init(['alicdn.com'], true, function(injectUrl) {
// injectUrl = ['xxx.com/xxx.js','xxx.cn/xxx.js']
});
})()
</script>
</head>