Default widget html and javascript

Discussion in 'Jailbreaks and iOS Hacks' started by antisoma, Jun 15, 2011.

  1. antisoma macrumors regular

    Aug 29, 2010
    I haven't ever created my own lockscreen or homescreen widgets from scratch but have modified many to change them to my tastes.

    Usually, the javascript is written specifically for the individual theme or borrowed from a previous theme and changed to suit a specific purpose. Time and dates are often presented in a specific way, for example:

    document.getElementById("calendar").firstChild.nodeValue =
    this_weekday_name_array[this_weekday] + ", " + this_date + " " +
    Weather information is gathered and presented in a variety of ways.

    Okay, what am I getting at?

    What if we collaborated to produce default time, date, and weather code with designers in mind. Basically, thoughtful, flexible and well commented javascript/html that is easily and completely manipulated by a separate css file. Let the javascript produce an abundance of information (within reason), let the designers choose which of it to use. Allow each element to be individually manipulated, positioned or hidden with css. I know it is poor coding form create something that will not be used but in this case I think the benefits would outweigh costs.

    I am only just starting to think about this and have started playing around to produce flexible time output. I think providing separate year, month, date, 12 hour, 24 hour, minute, second, and am/pm is the right way to go. Obviously, default css would also need to be provided.

    My problem is that my javascript abilities are only a couple days old. Anyone interested? Is this worthwhile?
  2. Centsy macrumors regular

    Feb 9, 2011
    That would actually be kinda neat. I've downloaded a couple themes that were just terribly written and a pain to edit. It would be awesome to have a toolset to work with to make things much cleaner.

Share This Page