diff --git a/contrib/js/entry.js b/contrib/js/entry.js index 46f9b5d..b83183c 100644 --- a/contrib/js/entry.js +++ b/contrib/js/entry.js @@ -3,7 +3,8 @@ function onready(fnc) { onready_callbacks.push(fnc); } -function ready() { +function ready(prefix) { + configRoot = prefix || "/"; for (var i = 0; i < onready_callbacks.length; i++) { onready_callbacks[i](); } diff --git a/contrib/js/nntpchan/report.js b/contrib/js/nntpchan/report.js index 7490c11..ac5b0bd 100644 --- a/contrib/js/nntpchan/report.js +++ b/contrib/js/nntpchan/report.js @@ -93,6 +93,3 @@ function nntpchan_submit_censor(form, regular_url) { nntpchan_apicall(url, handle_result, null, "POST", formdata); } -onready(function() { - -}); diff --git a/contrib/templates/default/board.mustache b/contrib/templates/default/board.mustache index 6253bb0..ef537d4 100644 --- a/contrib/templates/default/board.mustache +++ b/contrib/templates/default/board.mustache @@ -76,8 +76,8 @@ var prefix = "{{board.Prefix}}"; var e = document.getElementById("nntpchan_banner"); nntpchan_inject_banners(e, prefix); - init(prefix); - ready(); + if(init) init(prefix); + ready(prefix);