/*
* @title 選択文字列の文字数カウント
* @description 選択文字列の文字数をカウントします
* @include http://*
* @license MIT License
* @require
*/
(function(){
var text = window.getSelection().toString();
var count = text.length;
if(count === 0){
alert("文字が選択されていません。\n文字列を選択してから実行してください。");
} else {
alert("選択された文字数: " + count + " 文字");
}
})();