From 0373db5e1775ccfbb5607675f03048497027d4e8 Mon Sep 17 00:00:00 2001 From: Milosz Kwiatkowski Date: Sun, 21 Aug 2016 18:15:36 +0100 Subject: move css to style.css and clear up element creation --- js/rules-popup.js | 56 +++++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 33 deletions(-) (limited to 'js/rules-popup.js') diff --git a/js/rules-popup.js b/js/rules-popup.js index 1702ff68..6b5c99ac 100644 --- a/js/rules-popup.js +++ b/js/rules-popup.js @@ -17,36 +17,26 @@ if (typeof localStorage.rulesAccepted === "undefined") { // generate a 7-character long random string captcha = Math.random().toString(36).substring(2, 9) - var d = $("
").prependTo("body").width("80%").height("80%") - .css("z-index", 9999).css("position", "fixed") - .css("top", "50%").css("bottom", 0).css("left", "50%").css("right", 0) - .css("margin-top", "-40vh").css("margin-left", "-40%") - .css("background", "black") - .css("text-align", "center").css("font-family", "sans-serif") - .css("font-size", "14px").css("color", "white") - - d.html("" + - - "
lainchan rule agreement
" + - - "
" + - "
" + - "
" + - "
" + - - "
" + - "
If you accept the rules, retype the captcha and press ACCEPT.
" + - "
" + captcha + "
" + - "
" + - "" + - "" + - "
" + - "
" + - "
" + - - ""); - - $("#rules-actual").load("rules.html"); -} + $("
") + .prependTo("body"); + + $("#rules-popup") + .append("
lainchan rule agreement
") + .append("
") + .append("
"); + + $(".rules-popup-content-wrapper") + .append("
"); + $("#rules-popup-content") + .load("rules.html"); + + $(".rules-popup-bottom") + .append("
If you accept the rules, retype the captcha and press ACCEPT.
") + .append("
"); + $(".rules-popup-captcha-wrapper") + .append("
" + captcha + "
") + .append("
"); + $(".rules-popup-form") + .append("") + .append(""); +} \ No newline at end of file -- cgit v1.3