From 0426ec4011cbd954274718c9339f7bfc3df2ab88 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Sun, 21 Aug 2016 20:37:09 +0100 Subject: [PATCH] Fix rules-popup jquery issue. --- js/rules-popup.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/rules-popup.js b/js/rules-popup.js index 515c5b71..36261b45 100644 --- a/js/rules-popup.js +++ b/js/rules-popup.js @@ -12,13 +12,14 @@ * */ -if (typeof localStorage.rulesAccepted === "undefined") { +$(window).ready(function() { + if (typeof localStorage.rulesAccepted === "undefined") { // generate a 7-character long random string captcha = Math.random().toString(36).substring(2, 9) - $("
") - .prependTo("body"); + $("body") + .prepend("
"); $("#rules-popup") .append("
lainchan rule agreement
") @@ -39,4 +40,5 @@ if (typeof localStorage.rulesAccepted === "undefined") { $(".rules-popup-form") .append("") .append(""); -} \ No newline at end of file + } +})