Fix $.ready for Opera as it loads userscripts on window.onload and not document-start.

This commit is contained in:
Nicolas Stepien 2012-01-28 19:47:58 +01:00
parent 48afb6d880
commit 87c1fcc0fd
3 changed files with 5 additions and 2 deletions

View File

@ -312,7 +312,7 @@
$.extend($, {
ready: function(fc) {
var cb;
if (/interactive|complete/.test(d.readyState)) return fc();
if (/interactive|complete/.test(d.readyState)) return setTimeout(fc);
cb = function() {
$.off(d, 'DOMContentLoaded', cb);
return fc();

View File

@ -1,6 +1,7 @@
master
- Mayhem
Index Navigation and the See next/previous thread keybinds will not cycle through board pages anymore.
Fix archive redirection in Opera.
2.24.4
- ahokadesuka

View File

@ -223,7 +223,9 @@ $.extend = (object, properties) ->
$.extend $,
ready: (fc) ->
if /interactive|complete/.test d.readyState
return fc()
# Execute the functions in parallel.
# If one fails, do not stop the others.
return setTimeout fc
cb = ->
$.off d, 'DOMContentLoaded', cb
fc()