1. // JavaScript Document
  2.  
  3. //Font setup
  4. var font = "Georgia";
  5. var color = "White";
  6. var bodyText;
  7. function init()
  8. {
  9. document.body.style.width = 600;
  10. document.body.style.height = 200;
  11. }
  12. document.onreadystatechange = function()
  13. {
  14. if(document.readyState=="complete")
  15. {
  16. System.Gadget.settingsUI = "settings.html";
  17. System.Gadget.onSettingsClosed = settingsClosed;
  18. loadSettings();
  19. }
  20. };
  21.  
  22. function settingsClosed(event)
  23. {
  24. if(event.closeAction == event.Action.commit)
  25. {
  26. loadSettings();
  27. }
  28. }
  29.  
  30. function loadSettings()
  31. {
  32. var qoute = System.Gadget.Settings.read("qoute");
  33. if(qoute !== "")
  34. {
  35. showQoute(qoute);
  36. }
  37. else
  38. {
  39. Background.addTextObject("Could not read settings from loadSettings() function.", font, color ,0, 0);
  40. }
  41. }
  42. function showQoute(qoute)
  43. {
  44. Background.addTextObject(qoute, font, color, 0, 0)
  45. }
  46.  
  47.  
  48.