From f47b1812907bcb1dc32945af1be47cbeefebbcfe Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 2 Nov 2016 16:18:12 -0400 Subject: [PATCH] fix captcha reload for ukko page --- contrib/js/nntpchan/captcha-reload.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/js/nntpchan/captcha-reload.js b/contrib/js/nntpchan/captcha-reload.js index b88a137..da4141b 100644 --- a/contrib/js/nntpchan/captcha-reload.js +++ b/contrib/js/nntpchan/captcha-reload.js @@ -14,7 +14,10 @@ function reload(el) { } onready(function(){ - document.getElementById("captcha_img").onclick = function() { - reload(document.getElementById("captcha_img")); - }; + var e = document.getElementById("captcha_img"); + if (e) { + e.onclick = function() { + reload(document.getElementById("captcha_img")); + }; + } });