File size: 2,440 Bytes
4d70170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Vue Developer Tools</title>
  <style>
    #app,
    #intro {
      display: flex;
      flex-direction: column;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: 0;
      padding: 0;
    }

    #intro {
      z-index: 100000;
      justify-content: center;
      align-items: center;
      background-color: #fff;
      text-align: center;
      font-family: Roboto, sans-serif;
      color: #484848;
    }

    #intro.hidden {
      display: none;
    }

    #intro .logo {
      width: 120px;
    }

    #intro .title {
      margin: 30px 0;
      font-size: 26px;
    }

    #intro .content {
      width: 395px;
      font-size: 18px;
      line-height: 45px;
      text-align: center;
    }

    #intro .content-row {
      display: flex;
      align-items: center;
    }

    #intro .content-row label {
      flex-basis: 35px;
      text-align: right;
    }

    #intro .content-row input {
      flex: 1;
      height: 32px;
      padding: 0 10px;
      margin-left: 10px;
      border: 1px solid #cacaca;
      border-radius: 2px;
      text-align: center;
      font-size: 14px;
    }
  </style>
</head>
<body>
  <div id="intro">
    <img src="icons/128.png" alt="" class="logo">
    <h2 class="title">
      Waiting for connection...
    </h2>
    <div class="content">
      <div class="content-row">
        <label for="script-localhost">Add</label>
        <input type="text" id="script-localhost">
      </div>
      <div class="content-row">
        <label for="script-byip">Or</label>
        <input type="text" id="script-byip">
      </div>
      to the top of the page you want to debug.
    </div>
  </div>
  <div id="app">
  </div>
  <script>
    const port = process.env.PORT || 8098
    const localIp = require('ip').address();
    const $ = document.querySelector.bind(document)

    const $localhost = $('#script-localhost')
    const $byIp = $('#script-byip')

    $localhost.value = '<' + 'script src="http://localhost:' + port + '"><' + '/script>'
    $byIp.value = '<' + 'script src="http://' + localIp + ':' + port + '"><' + '/script>'

    function selectAll () {
      this.selectionStart = 0
      this.selectionEnd = this.value.length
    }

    $localhost.onclick = selectAll
    $byIp.onclick = selectAll
  </script>
  <script src="build/devtools.js"></script>
</body>
</html>