Optimize focus mode flow.

This commit is contained in:
Kenshin 2017-01-09 12:16:44 +08:00
parent 757ffab910
commit de76ccaaef

View File

@ -55,8 +55,10 @@ function focuseMode() {
var $focus = [],
sel, range, node, tag,
current = storage.Setcur( mode.focus ),
target = selector( current.site.include );
target;
if ( storage.current && $.isEmptyObject( storage.current ) ) storage.Setcur( mode.focus );
target = selector( storage.current.site.include );
// uniqueness verification
if ( !focus.Verify() ) return;
@ -89,7 +91,7 @@ function focuseMode() {
// add focus mode
focus.Render( fixFocus( $focus ), current.site.exclude, current.bgcolor );
focus.Render( fixFocus( $focus ), storage.current.site.exclude, storage.current.bgcolor );
}
/**