「昇順で並び替え」の版間の差分

MSY-07 (トーク | 投稿記録)
スペースからタブに変更
MSY-07 (トーク | 投稿記録)
ソースコードの最適化
13行目: 13行目:
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------


if (document.selection.Text == "") {
var sel = document.selection;
document.selection.SelectAll();
if (sel.Text == "") {
sel.SelectAll();
}
}
document.selection.Text = document.selection.Text.split("\n").sort().join("\n");
sel.Text = sel.Text.split("\n").sort().join("\n");
document.selection.StartOfDocument();
sel.StartOfDocument();
</syntaxhighlight>
</syntaxhighlight>
スポンサーリンク