Skip to content

Instantly share code, notes, and snippets.

@Yuffster
Created October 19, 2008 15:15
Show Gist options
  • Select an option

  • Save Yuffster/17867 to your computer and use it in GitHub Desktop.

Select an option

Save Yuffster/17867 to your computer and use it in GitHub Desktop.
<a onclick="if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);var s = document.createElement('input'); s.setAttribute('type', 'hidden'); s.setAttribute('name', 'authenticity_token'); s.setAttribute('value', '4e944db96e2da36bdf1af790b66bc5bfa67ef22b'); f.appendChild(s);f.submit(); };return false;" href="/bibliographies/1">Destroy</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment