Change focus.Verify to focus.Exist and optimize logic.

This commit is contained in:
Kenshin 2017-01-11 14:01:42 +08:00
parent 9124342104
commit 480145c824
2 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ function focuseMode() {
target = selector( storage.current.site.include );
// uniqueness verification
if ( !focus.Verify() ) return;
if ( focus.Exist() ) return;
// get tag from chrome storage
if ( target ) $focus = $( "body" ).find( target );

View File

@ -87,12 +87,12 @@ var fcontrol = require( "controlbar" ),
/*
Verify ks-simpread-focus tag exit
*/
Focus.prototype.Verify = function() {
Focus.prototype.Exist = function() {
if ( $( "body" ).find( "." + focuscls ).length > 0 ) {
fcontrol.Click( "setting" );
return false;
} else {
return true;
} else {
return false;
}
}