|
@@ -15,6 +15,69 @@
|
|
|
<script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
{{include "/common/js.html"}}
|
|
|
<title>登录 - 剑鱼标讯</title>
|
|
|
+ <script>
|
|
|
+ function loadDev() {
|
|
|
+ function loadJS (url, success, inject) {
|
|
|
+ var scripts = document.getElementsByTagName('script')
|
|
|
+ for (var i = 0; i < scripts.length; i++) {
|
|
|
+ if (scripts[i].src && scripts[i].src.indexOf(url) > -1) {
|
|
|
+ if (success) success();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var domScript = document.createElement('script');
|
|
|
+ domScript.src = url;
|
|
|
+ typeof inject === 'function' ? inject(domScript) : null;
|
|
|
+ success = success || function () {};
|
|
|
+ domScript.onload = domScript.onreadystatechange = function () {
|
|
|
+ if (!this.readyState || 'loaded' === this.readyState || 'complete' === this.readyState) {
|
|
|
+ success();
|
|
|
+ this.onload = this.onreadystatechange = null;
|
|
|
+ //this.parentNode.removeChild(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ document.getElementsByTagName('head')[0].appendChild(domScript);
|
|
|
+ }
|
|
|
+
|
|
|
+ function injectDevTools () {
|
|
|
+
|
|
|
+ const devToolsAssets = [
|
|
|
+ 'https://pagespy.jydev.jianyu360.com/page-spy/index.min.js',
|
|
|
+ 'https://pagespy.jydev.jianyu360.com/plugin/data-harbor/index.min.js',
|
|
|
+ 'https://pagespy.jydev.jianyu360.com/plugin/rrweb/index.min.js',
|
|
|
+ ]
|
|
|
+ const waitStates = [false, false, false]
|
|
|
+ function checkLoadState () {
|
|
|
+ const result = !waitStates.some(v => !v)
|
|
|
+ if (result) {
|
|
|
+ console.log('注入远程调试依赖成功')
|
|
|
+ window.$harbor = new DataHarborPlugin();
|
|
|
+ window.$rrweb = new RRWebPlugin();
|
|
|
+
|
|
|
+ [window.$harbor, window.$rrweb].forEach(p => {
|
|
|
+ PageSpy.registerPlugin(p)
|
|
|
+ })
|
|
|
+
|
|
|
+ window.$pageSpy = new PageSpy();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function loadToolsSuccess (i) {
|
|
|
+ waitStates[i] = true
|
|
|
+ checkLoadState()
|
|
|
+ }
|
|
|
+ for (let i = 0; i < devToolsAssets.length; i++) {
|
|
|
+ loadJS(devToolsAssets[i], () => {
|
|
|
+ loadToolsSuccess(i)
|
|
|
+ }, (scriptDom) => {
|
|
|
+ scriptDom.crossorigin = 'anonymous'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ injectDevTools()
|
|
|
+ };
|
|
|
+ loadDev();
|
|
|
+ </script>
|
|
|
</head>
|
|
|
<style type="text/css">
|
|
|
body{
|