/venus

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/venus/

« back to all changes in this revision

Viewing changes to themes/asf/personalize.js

  • Committer: Sam Ruby
  • Date: 2008-09-29 20:20:01 UTC
  • Revision ID: rubys@intertwingly.net-20080929202001-a9rpw4nvp2g0qic1
HTML5 and Chrome fixes

Show diffs side-by-side

added added

removed removed

161
161
  if (!date.getTime()) return;
162
162
 
163
163
  var local = date.toLocaleString();
 
164
  if (element.parentNode.nodeName == 'a') local = date.toLocaleTimeString();
164
165
  var match = local.match(localere);
165
166
  if (match) { /* Firefox */
166
167
    element.innerHTML = match[4] + ' ' + match[5].toLowerCase();
169
170
    return days[date.getDay()] + ', ' + months[date.getMonth()] + ' ' +
170
171
      date.getDate() + ', ' + date.getFullYear();
171
172
  } else {
172
 
    local = local.replace(/GMT(-\d\d\d\d) \(.*\)$/, '$1'); /* Webkit */
 
173
    local = local.replace(/ GMT(-\d\d\d\d) \(.*\)$/, ''); /* Webkit */
173
174
    element.title = element.innerHTML + ' GMT';
174
175
    element.innerHTML = local;
175
176
    return days[date.getDay()] + ', ' + date.getDate() + ' ' +
241
242
  if (sidebar.currentStyle && sidebar.currentStyle['float'] == 'none') return;
242
243
  if (window.getComputedStyle && document.defaultView.getComputedStyle(sidebar,null).getPropertyValue('float') == 'none') return;
243
244
 
 
245
  var h1 = sidebar.previousSibling;
 
246
  while (h1.nodeType != 1) h1=h1.previousSibling;
 
247
  if (h1.nodeName.toLowerCase() == 'h1') h1.parentNode.removeChild(h1);
 
248
 
244
249
  var footer = document.getElementById('footer');
245
250
  var ul = footer.lastChild;
246
251
  while (ul.nodeType != 1) ul=ul.previousSibling;
288
293
}
289
294
 
290
295
// hook event
291
 
window.onload = personalize;
292
 
if (document.addEventListener) {
293
 
    onDOMLoad = function() {
294
 
      window.onload = undefined;
295
 
      personalize();
296
 
    };
297
 
    document.addEventListener("DOMContentLoaded", onDOMLoad, false);
298
 
}
 
296
document.addEventListener("DOMContentLoaded", personalize, false);