love2wind

VOctober 12, 2020

EmEditor去除重复脚本

1.将上面的代码保存为*.jsee文件
2.在EmEditor宏菜单中将该文件导入
3.选中要去除重复的文本,执行此宏即可

var s = document.selection.Text;
var ss = s.split("\r\n");

var Out = "";
var i = 0, j = 0, FindIt = false;
var OutArray = new Object();

for ( i=0; i<ss.length; i++ ) {
    OutArray[ss[i]] = "";
}
for ( var key in OutArray ) {
    Out += key + "\r\n"
}

document.selection.Text = Out;

懒人下载: https://one.nie.ge/?/Code/%E5%8E%BB%E9%87%8D.jsee

本文来自投稿,不代表本站立场,如若转载,请注明出处:https://love2wind.cn/archives/2168.html
24

发表评论