我们可以用Notepad ++解码URL吗?

Mow*_*gli 48 notepad++

我目前正在使用此网站http://ostermiller.org/calc/encode.html解码代码.

http%3A%2F%2Fh.mysite.com%2F007%2FYRM-CD-9 http://h.mysite.com/007/YRM-CD-9通过对解码站点URL解码.

我想知道这是否可以通过Notepad ++完成.

小智 110

在Notepad ++ under Plugins=>中,MIME Tools你会发现URL EncodeURL Decode.

  • 当您通过 MIME 工具插件进行 URL 解码时,加号似乎不会转换为空格。 (2认同)

Mow*_*gli 21

感谢PiLHA.

  1. 下载jN插件.
  2. 将文件从Zip放到Notepad ++的Plugin文件夹中C:\Programs Files\Notepad++\plugins.
  3. 将代码保存在下面URLENDECODE.js并保存到C:\Program Files\Notepad++\plugins\jN\includes.
  4. 重启Notepad ++.

码:

var URLDecoderEncoder = Editor.addMenu('URL-Encoding/Decoding');
URLDecoderEncoder.addItem({
    text: 'Encode',
    cmd: function() {
        var unencoded = Editor.currentView.text;
        var encoded = encodeURIComponent(unencoded);
        Editor.currentView.text = encoded;
    }
});
URLDecoderEncoder.addItem({
    text: 'Decode',
    cmd: function() {
        var encoded = Editor.currentView.text;
        var unencoded = decodeURIComponent(encoded);
        Editor.currentView.text = unencoded;
    }
});
URLDecoderEncoder.addItem({
    text: 'Decode multi-pass (7x)',
    cmd: function() {
        var encoded = Editor.currentView.text;
        var unencoded_pass1 = decodeURIComponent(encoded);
        var unencoded_pass2 = decodeURIComponent(unencoded_pass1);
        var unencoded_pass3 = decodeURIComponent(unencoded_pass2);
        var unencoded_pass4 = decodeURIComponent(unencoded_pass3);
        var unencoded_pass5 = decodeURIComponent(unencoded_pass4);
        var unencoded_pass6 = decodeURIComponent(unencoded_pass5);
        var unencoded = decodeURIComponent(unencoded_pass6);
        Editor.currentView.text = unencoded;
    }
});
Run Code Online (Sandbox Code Playgroud)

  • 顺便说一句,要删除所有不需要的菜单,您可以将脚本移动到'disabled'文件夹('plugins\jN\includes\disabled') (2认同)
  • 这个答案有点矫kill过正。如果您不需要jN添加的额外功能和菜单项,请参阅Jason69的内置解决方案答案。 (2认同)