Last active
September 10, 2020 18:57
-
-
Save martianyi/f4d172d7fffc43a959db4cf2fc0e8828 to your computer and use it in GitHub Desktop.
bookmarklet to add vConsole in mobile browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function() { | |
if (document.getElementById('__vconsole')) return; | |
function callback() { | |
var vConsole = new VConsole(); | |
} | |
var s = document.createElement("script"); | |
s.src = "https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js"; | |
if (s.addEventListener) { | |
s.addEventListener("load", callback, false) | |
} else if (s.readyState) { | |
s.onreadystatechange = callback | |
} | |
document.body.appendChild(s); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment