Last active
August 29, 2015 14:12
-
-
Save cnDelbert/64623ffae8d6462c37d2 to your computer and use it in GitHub Desktop.
Click the bookmark to generate the QrCode. Click on the image of the QrCode to destory it.
This file contains 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(){document.body.innerHTML=document.body.innerHTML+"<div%20id='MyQrCode'%20style='display:block;z-index:99999;position:fixed;top:0;right:0;'%20onclick='javascript:(function(){var%20MyQrCode=document.getElementById("MyQrCode");MyQrCode.parentNode.removeChild(MyQrCode);}())'><img%20src='http://png.2vma.theucd.com/chart?chl="+escape(document.location.href)+"&chs=200x200&cht=qr&chld=%7C1&choe=UTF-8'></div>";})()); |
This file contains 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(){document.body.innerHTML=document.body.innerHTML+"<div%20id='MyQrCode'%20style='display:block;z-index:99999;position:fixed;top:0;right:0;'%20onclick='javascript:(function(){var%20MyQrCode=document.getElementById("MyQrCode");MyQrCode.parentNode.removeChild(MyQrCode);}())'><img%20src='http://chart.googleapis.com/chart?chl="+escape(document.location.href)+"&chs=200x200&cht=qr&chld=%7C1&choe=UTF-8'></div>";})()); |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>二维码</title> | |
</head> | |
<body><p>将→ <a href="javascript:(function(){var%20d=document.createElement('div');var%20i=document.createElement('img');var%20b=document.getElementsByTagName('body')[0];d.appendChild(i);b.appendChild(d);i.src='http://png.2vma.theucd.com/chart?chl='+encodeURIComponent(document.location.href)+'&chs=200x200&cht=qr&chld=%7C1&choe=UTF-8';d.id='ATempQrCode';d.setAttribute('style','display:block;z-index:99999;position:fixed;top:0;right:0;');d.innerHTML=d.innerHTML+'<p>©2015%20Created%20by%20<a%20href="http://delbert.me">Delbert</a></p>';d.onclick=function(){var%20myqrcode=document.getElementById('ATempQrCode');myqrcode.parentNode.removeChild(myqrcode);}}());"/>QrCode</a> ←拖动到收藏夹栏</p> | |
<p>用法: 点击书签生成当前网址的QrCode,点击生成的QrCode消失。</p> | |
<p>Gist: <a href="https://gist.github.com/cnDelbert/64623ffae8d6462c37d2">https://gist.github.com/cnDelbert/64623ffae8d6462c37d2</a></p> | |
</body> | |
</html> | |
<!-- // 1st Edition Compressed | |
javascript:((function(){document.body.innerHTML=document.body.innerHTML+"<div%20id='MyQrCode'%20style='display:block;z-index:99999;position:fixed;top:0;right:0;'%20onclick='javascript:(function(){var%20MyQrCode=document.getElementById("MyQrCode");MyQrCode.parentNode.removeChild(MyQrCode);}())'><img%20src='http://png.2vma.theucd.com/chart?chl="+escape(document.location.href)+"&chs=200x200&cht=qr&chld=%7C1&choe=UTF-8'></div>";})()); | |
--> | |
<!-- // 2nd Edition | |
javascript:(function(){ | |
var%20d=document.createElement('div'); | |
var%20i=document.createElement('img'); | |
var%20b=document.getElementsByTagName('body')[0]; | |
d.appendChild(i); | |
b.appendChild(d); | |
i.src='http://png.2vma.theucd.com/chart?chl='+encodeURIComponent(document.location.href)+'&chs=200x200&cht=qr&chld=%7C1&choe=UTF-8'; | |
d.id='ATempQrCode'; | |
d.setAttribute('style','display:block;z-index:99999;position:fixed;top:0;right:0;'); | |
//d.style='display:block;z-index:99999;position:fixed;top:0;right:0;'; | |
d.innerHTML=d.innerHTML+'<p>©2015%20Created%20by%20<a%20href="http://delbert.me">Delbert</a></p>'; | |
d.onclick=function(){var%20myqrcode=document.getElementById("ATempQrCode");myqrcode.parentNode.removeChild(myqrcode);}; | |
}()); | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment