From 06ff6554d41b390c3d616ae507a6f59bbc8cd5ff Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 1 May 2016 10:34:05 -0400 Subject: [PATCH] return false for onsubmit --- contrib/js/backlink.js | 5 ++++- contrib/static/nntpchan.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/js/backlink.js b/contrib/js/backlink.js index 2db0160..582ba09 100644 --- a/contrib/js/backlink.js +++ b/contrib/js/backlink.js @@ -367,7 +367,10 @@ function init(prefix) { } e.onclick = postit; var f = document.querySelector("form"); - f.onsubmit = postit; + f.onsubmit = function() { + postit(); + return false; + } } diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index b5b7a47..15634e3 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -44,7 +44,7 @@ parent.backlink=true;}};parent.backlink=true;} function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx