Changeset 25288 for lang/javascript/vimperator-plugins
- Timestamp:
- 11/29/08 00:38:56 (6 weeks ago)
- Files:
-
- 1 modified
-
lang/javascript/vimperator-plugins/trunk/clock.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/clock.js
r25222 r25288 5 5 * @description-ja とけい。 6 6 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> 7 * @version 0.1 17 * @version 0.12 8 8 * @minversion 2.0pre 9 9 * @maxversion 2.0pre … … 21 21 * %d: day MM/DD 22 22 * %y: year YYYY 23 * %a: A abbreviation for the day of the week. 23 24 * clock_position: id of element that is marker of insert position. 24 25 * default is 'liberator-commandline-command' ( after commandline ) … … 91 92 return setInterval(function () label.setAttribute('value', time()), 100); 92 93 }, 94 a: function (label) { 95 return setInterval(function () label.setAttribute('value', wday()), 60 * 1000); 96 }, 93 97 d: function (label) { 94 98 return setInterval(function () label.setAttribute('value', day()), 60 * 1000); … … 105 109 l.setAttribute('value', time()); 106 110 let id = self._constants.driver.t(l); 111 return { 112 node: l, 113 intervalId: id, 114 }; 115 }, 116 a: function (self) { 117 let l = self._master.cloneNode(false); 118 l.setAttribute('id', self._constants.prefix + 'wday'); 119 l.setAttribute('value', weekDay()); 120 let id = self._constants.driver.a(l); 107 121 return { 108 122 node: l, … … 237 251 return hour + (now.getMilliseconds() < 400 ? ' ' : ':') + min; 238 252 } 253 function weekDay() { 254 const wdays = 'sun mon tue wed thu fri sat'.split(/%s/); 255 let now = new Date(); 256 return now.toLocaleFormat ? now.toLocaleFormat('%a') 257 : wdays[now.getDay()]; 258 } 239 259 function day() { 240 260 let now = new Date();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)