「重複行を削除」の版間の差分

MSY-07 (トーク | 投稿記録)
配列をarray = []に修正
MSY-07 (トーク | 投稿記録)
ソースコードの最適化
11行目: 11行目:
  */
  */


if (document.selection.Text == "") {
var sel = document.selection;
document.selection.SelectAll();
if (sel.Text == "") {
sel.SelectAll();
}
}
var lines = document.selection.Text.split("\n");
var lines = sel.Text.split("\n");
var lineMap = {};
var lineMap = {};
var newLines = [];
var newLines = [];
26行目: 27行目:
}
}


document.selection.Text = newLines.join("\n");
sel.Text = newLines.join("\n");
</syntaxhighlight>
</syntaxhighlight>


スポンサーリンク