summaryrefslogtreecommitdiff
path: root/underlays/javascript
AgeCommit message (Collapse)Author
2010-05-27avoid insane use of javascript "array"Joey Hess
2010-04-24Moved javascript files under the ikiwiki/ directory, to avoid cluttering the ↵Joey Hess
top of the web root. This is another things that requires a wiki rebuild on upgrade to this version.
2009-12-12Improve javascript onload handling.Joey Hess
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.
2009-04-23relativedate: Deal with clock skew.Joey Hess
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.
2008-10-20use relativedate as the css class for dates that should display relativeJoey Hess
2008-10-19partial support for calling onload once the DOM is readyJoey Hess
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.
2008-10-18allow ikiwiki.js to be loaded twice w/o clobbering previous hooksJoey Hess
Clearly it's suboptimal for it to be loaded twice, but this is a quick fix at least.
2008-10-17relativedate: New javascript-alicious plugin that makes all dates display ↵Joey Hess
relative, in a very nice way, if I say so myself.
2008-10-17Add an underlay for javascript, and add ikiwiki.js containing some utility code.Joey Hess
* 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.