Skip to content

Instantly share code, notes, and snippets.

@alej0varas
Created October 5, 2017 11:17
Show Gist options
  • Save alej0varas/d5da50d7ae54cd20990e4ddd6eba4ddb to your computer and use it in GitHub Desktop.
Save alej0varas/d5da50d7ae54cd20990e4ddd6eba4ddb to your computer and use it in GitHub Desktop.
URL decoder
<script>
function decodeURL() {
var uri_enc = document.getElementById("url").value;
var uri_dec = decodeURIComponent(uri_enc);
var text = document.getElementById("text");
text.textContent = uri_dec;
}
</script>
<input id="url">
<button onclick="decodeURL();">Decode</button>
<script>
document.getElementById("url").focus();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment