1.0.1-0 • Published 6 years ago

injected-notify v1.0.1-0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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>