Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Javascript error on 'Go back to discussions'
Minisweeper
New
I dunno how easy this would be or how resource intensive (or whether you even think it's a good idea or core-worthy) but i just thought it might be nifty to have a javascript (or other) popup when the 'back to discussions' link was clicked at the bottom of the page *if* there was any text in the enter comments box incase some idiot (ok, just me) clicked it instead of 'add comments' or whatever.
Thoughts?
Thoughts?
0
This discussion has been closed.
Comments
function confirmGoBack() { var cb = document.getElementById('CommentBox') if (cb.value.length > 0) { if (confirm('You have not submitted your comments. Really go back?')) { window.location = 'http://wherever/'; } else { cb.focus(); } } }
and i'd add
onClick='confirmGoBack()'
in the Back to Discussions link.