From 2fb8db1c88240aa4beccd3495f3a79c7d8d31f7a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 7 Jun 2012 18:51:58 +0900 Subject: [PATCH] use decodeURIComponent for easy read --- _keysnail.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index b1ab414..e47e109 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -168,15 +168,11 @@ ext.add("list-url", function(){ if (aa[i].text == "" && aa[i].hasChildNodes() && aa[i].childNodes[0].nodeType == Node.ELEMENT_NODE){ alt = aa[i].childNodes[0].getAttribute("alt"); - if (alt != null){ - text = aa[i].childNodes[0].nodeName + ": " + alt; - }else{ - text = ""; - } + text = " " + aa[i].childNodes[0].nodeName + (alt ? ": " + alt : ""); }else{ text = aa[i].text; } - urls.push([text, aa[i].href]); + urls.push([text, decodeURIComponent(aa[i].href)]); } prompt.selector(