mirror of
https://github.com/Kenshin/simpread.git
synced 2026-02-01 15:41:29 +00:00
Change focus.Verify to focus.Exist and optimize logic.
This commit is contained in:
parent
9124342104
commit
480145c824
@ -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 );
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user