|
55 | 55 |
|
56 | 56 | <body> |
57 | 57 | <div id="app">Loading ...</div> |
58 | | - <script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1/index.js"></script> |
| 58 | + <script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1"></script> |
59 | 59 | <script> |
60 | 60 | // Set html "lang" attribute based on URL |
61 | 61 | var lang = location.hash.match(/#\/(de-de|es|ru-ru|zh-cn)\//); |
|
118 | 118 | '/zh-cn/': '搜索', |
119 | 119 | '/': 'Search', |
120 | 120 | }, |
121 | | - pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'] |
| 121 | + pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'], |
122 | 122 | }, |
123 | 123 | vueComponents: { |
124 | 124 | 'button-counter': { |
125 | 125 | template: |
126 | 126 | '<button @click="count += 1">You clicked me {{ count }} times</button>', |
127 | | - data: function() { |
| 127 | + data: function () { |
128 | 128 | return { |
129 | 129 | count: 0, |
130 | 130 | }; |
131 | 131 | }, |
132 | 132 | }, |
133 | 133 | }, |
134 | 134 | vueGlobalOptions: { |
135 | | - data: function() { |
| 135 | + data: function () { |
136 | 136 | return { |
137 | 137 | count: 0, |
138 | 138 | message: 'Hello, World!', |
|
145 | 145 | }; |
146 | 146 | }, |
147 | 147 | computed: { |
148 | | - timeOfDay: function() { |
| 148 | + timeOfDay: function () { |
149 | 149 | const date = new Date(); |
150 | 150 | const hours = date.getHours(); |
151 | 151 |
|
|
159 | 159 | }, |
160 | 160 | }, |
161 | 161 | methods: { |
162 | | - hello: function() { |
| 162 | + hello: function () { |
163 | 163 | alert(this.message); |
164 | 164 | }, |
165 | 165 | }, |
166 | 166 | }, |
167 | 167 | vueMounts: { |
168 | 168 | '#counter': { |
169 | | - data: function() { |
| 169 | + data: function () { |
170 | 170 | return { |
171 | 171 | count: 0, |
172 | 172 | }; |
|
175 | 175 | }, |
176 | 176 | plugins: [ |
177 | 177 | DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'), |
178 | | - function(hook, vm) { |
179 | | - hook.beforeEach(function(html) { |
| 178 | + function (hook, vm) { |
| 179 | + hook.beforeEach(function (html) { |
180 | 180 | if (/githubusercontent\.com/.test(vm.route.file)) { |
181 | 181 | url = vm.route.file |
182 | 182 | .replace('raw.githubusercontent.com', 'github.com') |
|
198 | 198 | '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>' |
199 | 199 | ); |
200 | 200 | }), |
201 | | - hook.afterEach(function(html) { |
| 201 | + hook.afterEach(function (html) { |
202 | 202 | if (vm.route.path === '/') { |
203 | 203 | return html; |
204 | 204 | } |
|
218 | 218 | <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-nginx.min.js"></script> |
219 | 219 | <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-php.min.js"></script> |
220 | 220 | <script> |
221 | | - (function() { |
222 | | - function loadJS(src, attrs) { |
223 | | - document.write( |
224 | | - '<script src="' + src + '" ' + (attrs || '') + '><\/script>' |
225 | | - ); |
226 | | - } |
227 | | - |
228 | | - // Public site only |
229 | | - if (/docsify/.test(location.host)) { |
230 | | - loadJS('//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js'); |
231 | | - loadJS('//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/matomo.min.js'); |
232 | | - } |
233 | | - })(); |
| 221 | + // Public site only |
| 222 | + if (/docsify/.test(location.host)) { |
| 223 | + document.write( |
| 224 | + '<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js"><\/script>' |
| 225 | + ); |
| 226 | + document.write( |
| 227 | + '<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/matomo.min.js"><\/script>' |
| 228 | + ); |
| 229 | + } |
234 | 230 | </script> |
235 | 231 | <script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script> |
236 | 232 | <!-- <script src="//cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script> --> |
|
0 commit comments