Content deleted Content added
code for user:js/urldecoder |
corrections |
||
Line 6:
var bt = document.createElement('input')
bt.type = 'button'; bt.onclick = urlDecoderRun
bt.value = '
bt.title = 'Decode URL before cursor or all URLs in selected text
bt.style.cssText = 'background:#adbede; height:22px; vertical-align:top; padding:0'
tlb.appendChild(bt)
Line 107:
function decodeLink(url, name){ //name is optional
var parts, endingDots, result
if (name) name = name.replace(/^ +| +$/g,'') //trim spaces
//secure Wikimedia link into non-secure
Line 138:
if (linkPrefix[1] && (linkPrefix[1] != localPrefix[1])) prefixes += ':'+linkPrefix[1]
if (prefixes) prefixes += ':'
if (!prefixes && isColonNeeded(title))
//return result
result = '[\[' + prefixes + title
Line 227:
ns = ns.join('|').toLowerCase()
urlDecoderNS[wgContentLanguage] = ns
showMsg(
return ns
}
Line 241:
}
dv.innerHTML = htm; dv.style.display = ''
setTimeout(hideMsg,
}
|