Skip to content

Instantly share code, notes, and snippets.

@danpalmer
Created October 20, 2012 14:39
Show Gist options
  • Save danpalmer/3923444 to your computer and use it in GitHub Desktop.
Save danpalmer/3923444 to your computer and use it in GitHub Desktop.
function config() {
if (!Editor) {
return;
}
var window = new Sheet(Editor.current().window());
window.setFrame({x:0, y:0, width:355, height:130});
window.htmlPath = 'config.html';
window.buttons = ['Save', 'Cancel'];
window.onButtonClick = function(button) {
if (button == 'Save') {
saveConfig(window);
}
};
window.run();
}
function saveConfig(window) {
var settings = window.evalExpr('settings');
Alert.show('Debug', settings.toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment