forked from zealotrunner/fancy-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Frank Kohlhepp
committed
Apr 18, 2011
1 parent
cf31be9
commit a036d5f
Showing
3 changed files
with
80 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,24 @@ | ||
window.addEvent("domready", function () { | ||
var settings = new FancySettings("My Extension"); | ||
//var settings = new FancySettings.initWithManifest("manifest.json"); | ||
// Option 1: Use the manifest: | ||
|
||
// Add your settings here | ||
// Example: | ||
// settings.create("Tab 1", "Group 1", "text", { | ||
// "label": "Enter your Birthday:", | ||
// "text": "e.g. \"18\"" | ||
// new FancySettings.initWithManifest("manifest.json", function (settings) { | ||
// settings.manifestOutput.button1.addEvent("action", function () { | ||
// alert("hello, here i am"); | ||
// }); | ||
// }); | ||
// | ||
// or use the manifest and replace the line above with | ||
// var settings = new FancySettings.initWithManifest("manifest.json"); | ||
|
||
|
||
|
||
// Option 2: Do everything manually: | ||
|
||
|
||
|
||
|
||
|
||
|
||
settings.create("General", "Behavior", "text", { | ||
"name": "label", | ||
"label": "GMail Label:", | ||
"text": "e.g. \"notifications\"" | ||
}); | ||
settings.create("test", "Behavior", "radioButtons", { | ||
"name": "open_emails_in", | ||
"label": "Open Emails in:", | ||
"options": [ | ||
{ | ||
"value": "new_tab", | ||
"text": "a new tab" | ||
}, | ||
{ | ||
"value": "new_window", | ||
"text": "a new window" | ||
}, | ||
{ | ||
"value": "gmail_tab", | ||
"text": "an already open GMail tab" | ||
}, | ||
{ | ||
"value": "active_tab", | ||
"text": "the active tab" | ||
} | ||
] | ||
}); | ||
|
||
settings.create("General", "Google Apps", "checkbox", { | ||
"name": "google_apps_enabled", | ||
"label": "Enable Google Apps" | ||
}); | ||
settings.create("General", "Google Apps", "text", { | ||
"name": "google_apps_domain", | ||
"label": "Domain:", | ||
"text": "e.g. \"example.com\"" | ||
}); | ||
// var settings = new FancySettings("My Extension"); | ||
// | ||
// var checkbox1 = settings.create("tabName", "groupName", "checkbox", { | ||
// "name": "checkbox1", | ||
// "label": "Enable this" | ||
// }); | ||
// | ||
// checkbox1.addEvent("action", function (value) { | ||
// alert("you toggled me: " + value); | ||
// }); | ||
}); |