Friday, March 24th, 2006


I blogged earlier about creating a sidebar entry with all of the links in the current post. The following code snippet will do this:

function createPostLinksBox(){
    if (!getCurrentPost()) return "not a single post page";
    content = getByClass("post-content")[0];
    links = content.getElementsByTagName("A");
    if (!links.length) return "no links in post";
    var placeholder;
    if (!(placeholder=getPlaceholder("outlinks"))) return "no location for outlinks";
    var outlinks = document.createElement('h2');
    outlinks.innerHTML = "Links in this Post";
    var ul = document.createElement('ul');
    for (i=0;i<links.length;i++){
        li = document.createElement('li');
        li.appendChild(links[i].cloneNode(true));
        ul.appendChild(li);
    }
    replaceNode(outlinks,placeholder);
    outlinks.parentNode.insertAfter(ul,outlinks);
}

Note that this must be run after the DOM tree is finalised, and relies on a couple of other functions.

I’ve put <span id="outlinks"></span> into my template, so that this will appear wherever that is, if it’s a single post page with any links in it.

It will make it into the next update of my script.

View Comments (0)   RSS Feed for Comments on this Post

We ordered a heap of environmentally friendly wood oil, to do the floor with when we finally get around to it, and it came with a Free Magazine!

Unfortunately, it contains a whole lot of crap about various things that are total rubbish, not the least being homeopathy.

I’m not even going to detail how much crap it is, but just point you instead towards: Homeopathy: The Ultimate Fake.

I will put a couple of quotes from the articles about Homeopathy in there, however.

Homeopathic medicines are considered safe and free from serious adverse reactions since they are highly diluted.

So highly diluted, in fact, that to be sure to get even one molecule of the original chemical, you would need to take around 2 billions times the homeopathic medicine’s dose (at 30X).

The cost of consultations will depend on their duration, with inital consultations varying between $60 to $120.

For someone to give you a glass of water. Even if it is bottled water, it still ain’t worth that much.

As Barrett mentions in the linked article, Homeopathy is indistinguishable in effects from a placebo, because that is exactly what it is. A very complicated, expensive placebo.

Most major health funds provide cover for homeopathic treatment.

No wonder health insurance is so fucking expensive. I hope my insurer doesn’t!

I won’t be reading any other articles in Living Now. Straight to the recycling bin. Or maybe I’ll shred it so my local rubbish molester doesn’t get the wrong ideas about stuff.

View Comment (1)   RSS Feed for Comments on this Post

I got onto a bus today, and found a rather old (I actually didn’t realise it was this old until I just typed the date in) edition of one of the Jehovah’s Witnesses magazines, Awake! Published in 1993, it probably contains virtually the same stuff as a recently published edition. However, it is interesting to examine it in a little bit of detail.

The covers were missing, as were a couple of the outer pages, and the first “story” was A Composite Sign of Many Parts: The World’s End - How Near? Having read (and watched) White Teeth, by Zadie Smith, which deals in some detail with the continued prediction of the end of the world by the JWs, I thought this might be worth reading.

It starts out with the old parable about the six blind men who “saw” an elephant, and depending on which part of it’s body they touched, came away with a different idea about what an Elephant is like. Thus, only seeing part of the picture often paints a false image of the whole. I’m not sure if it was an acceptance that each other time they have predicted the end of the world they were wrong, but it sounds an awful lot like it.
(more…)

View Comments (0)   RSS Feed for Comments on this Post

I just thought of a great addition to a sidebar: links in this post. Thus, a user would see a list of all off-site (or even on-site) links, and be able to follow one or all of these without having to go through all of the post. Probably going to be more useful on posts that are really long.

Easy to do in JavaScript, but could be done in Smarty too.

View Comments (3)   RSS Feed for Comments on this Post

I think I might rewrite all of this site’s scripting using a framework.

Probably Yahoo’s stuff, that looks very cool: YUI.

View Comments (0)   RSS Feed for Comments on this Post

Apparently, the following command changes the scroll speed under MacOS X when using a scroll wheel mouse:

write -globalDomain com.apple.scrollwheel.scaling x.x

Where x.x is replaced by a float, I use 2.5

I’m not sure how much of a difference it makes, but I’ll keep playing with it. Maybe it only changes it after a login.

View Comments (0)   RSS Feed for Comments on this Post

I’ve just purchased, and started using a Logitech USB Optical mouse. It was pretty cheap, only AU$20, and I’ve wanted a scroll mouse for the iMac forever…

So, I installed it, and downloaded the Logitech driver, to see if I could configure it to make it a bit better. And it looks like I can - there is an option to accelerate the scroll, so that scrolling faster scrolls more than the same distance slower.

Then I looked in the readme:

Q: My LCC settings are gone after switching user with “Fast User Switching”, what happened?

A: LCC does not support “Fast User Switching”. In order to enjoy the different LCC configurations for multiple users, one has to log out and log in the system instead of using “Fast User Switching”. To log out and log in the system:

  • Select Apple Menu on the upper left corner.
  • Select “Log Out”.
  • Click “Log Out” button when prompted.
  • Select your log-in name or type in the log-in name. Then, enter your password.
  • Click “Log In”.

What is this crap? Are you that lazy that you didn’t bother building some sort of support for FUS into the system? Don’t you think that anyone actually uses FUS?

Uninstall. Very nearly take it back to the store to return it (doesn’t do what it says, isn’t fully supported under OS X), before deciding that that’s not worth the effort, and I was already pretty happy with how it works without the extra features!

Still, angry with Logitech.

View Comments (0)   RSS Feed for Comments on this Post