Skip to content

Commit

Permalink
Delete settings file function
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJaredWilcurt committed Jan 3, 2017
1 parent b397b97 commit ba524a0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions _scripts/app.js
Expand Up @@ -480,3 +480,17 @@ function runApp () {
}

} // end runApp();


window.deleteSettingsFile = function (bool) {
if (bool) {
var gui = require('nw.gui');
var path = require('path');
var settingsFile = path.join(gui.App.dataPath, 'uguisettings.json');

ugui.helpers.deleteAFile(settingsFile, function () {
var win = gui.Window.get();
win.reload();
});
}
};

0 comments on commit ba524a0

Please sign in to comment.