2013-07-02 19 views
34

我正在使用此站點http://ostermiller.org/calc/encode.html來解碼代碼。我們可以使用Notepad ++解碼URL嗎?

http%3A%2F%2Fh.mysite.com%2F007%2FYRM-CD-9http://h.mysite.com/007/YRM-CD-9在該解碼站點上使用URL解碼。

我想知道這是否可以通過Notepad ++來完成。

+3

解決方法解決方案[此處](http://sourceforge.net/p/notepad-plus/discussion/331754/thread/5249d0f2#54f1) – PiLHA

+0

謝謝,我需要閱讀如何安裝它。 – Mowgli

+0

TextFX只提供'轉換/編碼URI組件' –

回答

21

感謝PiLHA。

  1. 下載jN插件。
  2. 將文件從Zip放到Notepad ++的Plugin文件夾的C:\Programs Files\Notepad++\plugins
  3. 將代碼保存爲URLENDECODE.js並保存到C:\Program Files\Notepad++\plugins\jN\includes
  4. 重新啓動記事本++。

代碼:

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; 
    } 
}); 
+1

作品如想? – PiLHA

+1

是的,謝謝。唯一的事它不會記錄宏。再次感謝。 – Mowgli

+0

只需要提一下,JN插件就會添加很多新的菜單項,所以如果你不喜歡,你可能想要避免它或者自定義JN。 – Anton

75

在記事本++下的插件/ MIME的工具,你會發現URL編碼和解碼。

+1

我知道我曾經在某處看過。 –

+6

這應該是可以接受的答案。 – Daniel

+0

當您通過MIME工具插件進行URL解碼時,加號不會轉換爲空格。 – Dima

相關問題