mirror of
https://github.com/liriliri/eruda.git
synced 2026-02-02 09:49:00 +08:00
doc: replace by cdn src if insert script
This commit is contained in:
@@ -74,7 +74,7 @@ The JavaScript file size is quite huge(about 100kb gzipped) and therefore not su
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
;(function () {
|
;(function () {
|
||||||
var src = 'node_modules/eruda/eruda.min.js';
|
var src = '//cdn.jsdelivr.net/npm/eruda';
|
||||||
if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
|
if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
|
||||||
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
||||||
document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>');
|
document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>');
|
||||||
|
|||||||
Reference in New Issue
Block a user