Forked from taizooo/search_unicode.bookmarklet.js
Last active
August 29, 2015 13:56
-
-
Save Boldewyn/9226678 to your computer and use it in GitHub Desktop.
Via @taizooo and http://d.hatena.ne.jp/mandel59/20091125/1259157800 adapted from fileformat.info to codepoints.net
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: | |
'search_unicode.bookmarklet.js', | |
(function(){ | |
var x='http://codepoints.net/U+'+(function(r){ | |
var n=r.startContainer, | |
p=r.startOffset, | |
u=(n.nodeType==3)?n.nodeValue.substr(p,2):n.childNodes[p].textContent.substr(0,2), | |
v=u.charCodeAt(0); | |
return 0xD800<=v&&v<=0xDB7F?((v&0x3FF)<<10|u.charCodeAt(1)&0x3FF)+0x10000:v; | |
})(getSelection().getRangeAt(0)).toString(16); | |
window.open(x); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment