「バイト数」の版間の差分
見出しの追加と修正 |
→Kuro 版: 省略された波括弧の追加 |
||
| 12行目: | 12行目: | ||
with (document) { | with (document) { | ||
var s = document.selection.Text; | var s = document.selection.Text; | ||
if (s == "") | if (s == "") { | ||
s = Text; | s = Text; | ||
} | |||
var j = 0; | var j = 0; | ||
var l = s.length; | var l = s.length; | ||
| 19行目: | 20行目: | ||
var c = s.charCodeAt(i); | var c = s.charCodeAt(i); | ||
if ((c >= 0x0 && c < 0x81) || (c == 0xf8f0) || | if ((c >= 0x0 && c < 0x81) || (c == 0xf8f0) || | ||
(c >= 0xff61 && c < 0xffa0) || (c >= 0xf8f1 && c < 0xf8f4)) | (c >= 0xff61 && c < 0xffa0) || (c >= 0xf8f1 && c < 0xf8f4)) { | ||
j += 1; | j += 1; | ||
else | } else { | ||
j += 2; | j += 2; | ||
} | |||
} | } | ||
window.status = ("" + j).match(/./g).reverse().join("") | window.status = ("" + j).match(/./g).reverse().join("") | ||
スポンサーリンク