Merge branch '2.0' of github.com:s9y/Serendipity into 2.0

This commit is contained in:
Matthias Mees 2014-03-06 18:11:12 +01:00
commit 9c531401af
2 changed files with 14 additions and 14 deletions

View File

@ -279,7 +279,7 @@ if (parent.frames && parent.frames['tree']) {
tree.draw(); tree.draw();
} }
serendipity.addLoadEvent(treeInit); addLoadEvent(treeInit);
</script> </script>
{/if} {/if}
</body> </body>

View File

@ -41,19 +41,6 @@
return null; return null;
} }
// Some sort of onload wrapper? @onli says jQuery can help with this
serendipity.addLoadEvent = function(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
/** /**
* Based upon code written by chris wetherell * Based upon code written by chris wetherell
* http://www.massless.org * http://www.massless.org
@ -1204,4 +1191,17 @@ var AccessifyHTML5 = function (defaults, more_fixes) {
}); });
})(jQuery); })(jQuery);
// This is kept for older plugins. Use of $(document).ready() is encouraged.
// At some point, this will be removed.
addLoadEvent = function(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}