瀏覽代碼

Fix rules-popup jquery issue.

pull/68/head
Michael Walker GitHub 7 年之前
父節點
當前提交
0426ec4011
共有 1 個檔案被更改,包括 6 行新增4 行删除
  1. +6
    -4
      js/rules-popup.js

+ 6
- 4
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)

$("<div id='rules-popup'>")
.prependTo("body");
$("body")
.prepend("<div id='rules-popup'>");

$("#rules-popup")
.append("<div class='rules-popup-top'>lainchan rule agreement</div>")
@@ -39,4 +40,5 @@ if (typeof localStorage.rulesAccepted === "undefined") {
$(".rules-popup-form")
.append("<input class='rules-popup-form-input' type='text' id='captcha' />")
.append("<input type='submit' value='ACCEPT' />");
}
}
})

Loading…
取消
儲存