aboutsummaryrefslogtreecommitdiff
path: root/underlays/javascript
Commit message (Collapse)AuthorAge
* Moved javascript files under the ikiwiki/ directory, to avoid cluttering the ↵Joey Hess2010-04-24
| | | | top of the web root. This is another things that requires a wiki rebuild on upgrade to this version.
* Improve javascript onload handling.Joey Hess2009-12-12
| | | | | | | | | I noticed the onload hook running twice sometimes when using chromium. Change from using arguments.callee.done to a onload_done variable fixed it. I guess that the callee differed in chromium. Probably the cause of the problem is that chrome supports both window.onload and document.addEventListener.
* relativedate: Deal with clock skew.Joey Hess2009-04-23
| | | | | | | | | | | If the server has a clock running a bit ahead of the web browsing client, relativedate could cause somewhat confusing displays like "3 seconds from now" for just posted things. As a hack, avoid displaying times in the future if they're less than a small slip forward. I chose 30 minutes because both client and server could be wrong in different directions, while it's still close enough that "just now" is not horribly wrong.
* use relativedate as the css class for dates that should display relativeJoey Hess2008-10-20
|
* partial support for calling onload once the DOM is readyJoey Hess2008-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for gecko and newer versions of opera to call onload once the DOM is ready, rather than waiting for all images in the page to load. Makes relativedate behave somewhat better. Dealing with this means jumping into the browser incompatability waters that I prefer to avoid. Full solutions for most of the major browsers are listed here: http://dean.edwards.name/weblog/2006/06/again/ However, no *license* is listed there, so I can't use that code. Also, the more involved code appears to have various issues (such as the inline IE code not working via https). So I only added the simple call to a hook needed for gecko/opera. It seems that the only standards-compliant way to do this is using the `defer` attribute to a `script` tag, using an external script that will be loaded once the DOM is ready, and can call onload. However, that has browser compatability issues of its own, since not all browsers honor `defer`. Perhaps I should really just be using one of the javascript frameworks, that include code to solve this for the major browsers. But something about them still puts me off, and this issue is minor enough that I'm willing to live with incomplete support for now.
* allow ikiwiki.js to be loaded twice w/o clobbering previous hooksJoey Hess2008-10-18
| | | | | Clearly it's suboptimal for it to be loaded twice, but this is a quick fix at least.
* relativedate: New javascript-alicious plugin that makes all dates display ↵Joey Hess2008-10-17
| | | | relative, in a very nice way, if I say so myself.
* Add an underlay for javascript, and add ikiwiki.js containing some utility code.Joey Hess2008-10-17
* Add an underlay for javascript, and add ikiwiki.js containing some utility code. * toggle: Stop embedding the full toggle code on each page using it, and move it to toggle.js in the javascript underlay.