refactor(config) onChange: str -> regexp

This commit is contained in:
coderaiser 2015-03-13 05:43:57 -04:00
parent fc0b8bdba3
commit 3410a98f93

View file

@ -174,14 +174,10 @@ var CloudCmd, Util, DOM, io;
data = getValue(el);
if (type === 'checkbox')
if (el.id === 'localStorage')
if (/^(diff|buffer|dirStorage)$/.test(el.id))
onLSChange(el);
else if (el.id === 'localStorage')
onLocalStorageChange();
else if (el.id === 'diff')
onLSChange(el);
else if (el.id === 'buffer')
onLSChange(el);
else if (el.id === 'dirStorage')
onLSChange(el);
else if (el.id === 'auth')
onAuthChange(data);