昇順で並び替え

提供:MeryWiki
2012年6月22日 (金) 17:56時点におけるAdmin (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動

編集中の文書の行を昇順で並べ替えます。

// -----------------------------------------------------------------------------
// 昇順で並べ替え
//
// Copyright (c) Kuro. All Rights Reserved.
// e-mail: admin@haijin-boys.com
// www:    http://www.haijin-boys.com/
// -----------------------------------------------------------------------------

if (document.selection.Text == "")
  document.selection.SelectAll();
document.selection.Text = document.selection.Text.split("\n").sort().join("\n");
document.selection.StartOfDocument();
スポンサーリンク