Skip to content

Instantly share code, notes, and snippets.

@DenimTornado
Created October 1, 2013 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DenimTornado/6777309 to your computer and use it in GitHub Desktop.
Save DenimTornado/6777309 to your computer and use it in GitHub Desktop.
var Anchors = document.getElementsByTagName("a");
for (var i = 0; i < Anchors.length ; i++) {
Anchors[i].addEventListener("click",
function (event) {
event.preventDefault();
if (confirm('Are you sure?')) {
window.location = this.href;
}
},
false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment