forked from 0x2620/pandora
use Ox.localStorage
This commit is contained in:
parent
691b1e98cc
commit
90a36cfa17
5 changed files with 22 additions and 20 deletions
|
|
@ -144,7 +144,7 @@ pandora.ui.mainMenu = function() {
|
|||
{ id: 'clearcache', title: 'Clear Cache'},
|
||||
{ id: 'reloadapplication', title: 'Reload Application'},
|
||||
{ id: 'resetui', title: 'Reset UI Settings'},
|
||||
{ id: 'debug', title: (localStorage.pandoraDebug?'Disable':'Enable')+' Debug Mode'},
|
||||
{ id: 'debug', title: (pandora.localStorage('debug')?'Disable':'Enable')+' Debug Mode'},
|
||||
{ id: 'triggererror', title: 'Trigger JavaScript Error'},
|
||||
] }
|
||||
]
|
||||
|
|
@ -293,12 +293,12 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.$ui.appPanel.reload();
|
||||
});
|
||||
} else if (data.id == 'debug') {
|
||||
if(localStorage.pandoraDebug) {
|
||||
delete localStorage.pandoraDebug;
|
||||
if(pandora.localStorage('debug')) {
|
||||
pandora.localStorage.delete('debug');
|
||||
} else {
|
||||
localStorage.pandoraDebug = 1;
|
||||
pandora.localStorage('debug', true);
|
||||
}
|
||||
that.setItemTitle('debug', (localStorage.pandoraDebug ? 'Disable' : 'Enable') + ' Debug Mode');
|
||||
that.setItemTitle('debug', (pandora.localStorage('debug') ? 'Disable' : 'Enable') + ' Debug Mode');
|
||||
} else if (data.id == 'triggererror') {
|
||||
var e = error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue