onready() instead of onload()
This commit is contained in:
parent
ad657916a0
commit
f444fa3b6e
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onload(function(){
|
onready(function(){
|
||||||
var link = document.getElementsByTagName('a');
|
var link = document.getElementsByTagName('a');
|
||||||
|
|
||||||
for(var i = 0; i < link.length; i++) {
|
for(var i = 0; i < link.length; i++) {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onload(function(){
|
onready(function(){
|
||||||
var iso8601 = function(s) {
|
var iso8601 = function(s) {
|
||||||
s = s.replace(/\.\d\d\d+/,""); // remove milliseconds
|
s = s.replace(/\.\d\d\d+/,""); // remove milliseconds
|
||||||
s = s.replace(/-/,"/").replace(/-/,"/");
|
s = s.replace(/-/,"/").replace(/-/,"/");
|
||||||
|
@ -53,5 +53,8 @@
|
|||||||
{{ boardlist.bottom }}
|
{{ boardlist.bottom }}
|
||||||
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2012 Tinyboard Development Group</p>
|
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2012 Tinyboard Development Group</p>
|
||||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||||
|
<script type="text/javascript">{% raw %}
|
||||||
|
ready();
|
||||||
|
{% endraw %}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -158,25 +158,18 @@ var RecaptchaOptions = {
|
|||||||
theme : 'clean'
|
theme : 'clean'
|
||||||
};
|
};
|
||||||
|
|
||||||
function onload(fnc) {
|
onready_callbacks = [];
|
||||||
if(typeof window.addEventListener != "undefined") {
|
function onready(fnc) {
|
||||||
window.addEventListener("load", fnc, false);
|
onready_callbacks.push(fnc);
|
||||||
} else if(typeof window.attachEvent != "undefined") {
|
}
|
||||||
window.attachEvent( "onload", fnc );
|
|
||||||
} else {
|
function ready() {
|
||||||
if (window.onload != null) {
|
for(var i = 0; i < onready_callbacks.length; i++) {
|
||||||
var oldOnload = window.onload;
|
onready_callbacks[i]();
|
||||||
window.onload = function (e) {
|
|
||||||
oldOnload(e);
|
|
||||||
window[fnc]();
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
window.onload = fnc;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onload(init);
|
onready(init);
|
||||||
|
|
||||||
{% endraw %}{% if config.google_analytics %}{% raw %}
|
{% endraw %}{% if config.google_analytics %}{% raw %}
|
||||||
|
|
||||||
|
@ -55,5 +55,8 @@
|
|||||||
{{ boardlist.bottom }}
|
{{ boardlist.bottom }}
|
||||||
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2012 Tinyboard Development Group</p>
|
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright © 2010-2012 Tinyboard Development Group</p>
|
||||||
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
|
||||||
|
<script type="text/javascript">{% raw %}
|
||||||
|
ready();
|
||||||
|
{% endraw %}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user