Created
August 31, 2010 08:17
-
-
Save rummelonp/558716 to your computer and use it in GitHub Desktop.
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() { | |
var url = "http://chasen.org/~taku/software/TinySegmenter/tiny_segmenter-0.1.js"; | |
var script = document.createElement('script'); | |
script.setAttribute('src', url); | |
script.setAttribute('type', 'text/javascript'); | |
var head = document.querySelector('head'); | |
if (head) { | |
head.appendChild(script); | |
} else { | |
return; | |
}; | |
var text = getSelection().toString(); | |
var segmenter = new TinySegmenter(); | |
var segs = segmenter.segment(text); | |
prompt('', segs.join('|')); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment