/* * rules-popup.js * https://github.com/mkwia/lainchan/js/rules-popup.js * * Forces user to accept rules from /rules.txt on first welcome * * 2016 mkwia * * Usage: * $config['additional_javascript'][] = 'js/jquery.min.js'; * $config['additional_javascript'][] = 'js/rules-popup.js'; * */ $(function() { if (typeof localStorage.rulesAccepted === "undefined") + function(c) { 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.
" + "
" + c + "
" + "
" + "" + "" + "
" + "
" + "
" + ""); $("#rules-actual").load("/templates/rules.html"); }("faggotry1234"); });