Repository navigation
0.6, Ranger Able, 27th January 1951
Filters
In 0.6 release Evil Blocks become to be much more flexible. It core is very tiny and only finds blocks by selectors, sets @block property and calls init method. All other features (like event bindings or @$() method) was moved to filters and can be disabled or replaced.
With your own filters you can change Evil Blocks logic, add some new shortcuts or features like mixins. For example you can create filter, which will initialize blocks only when they become to be visible:
filter = (obj) ->
if not obj.block.is(':visible')
checking = ->
evil.block.vitalize(obj.block) if obj.block.is(':visible')
setTimeout(checking, 100);
return false
evil.block.filters.splice(0, 0, filter)You can read more about filters in documentation.
Other Changes
Listener load on window will call immediately, if page was already loaded.
