30 November 2007

Evel Knievel is dead and so is our laggy front page

I reduced the number of posts on the front page to 16 from 64.

Raise your hand if you had the 4th toy on this page.

Rock Ballads Quiz

6/10. They tricked me 3 times with duplicate songs for the artist that I knew or duplicate artists for the title I knew.

27 November 2007

He doesn't want a war



the best line: "Tupac Shakur, rest in peace (he was the best!)"

26 November 2007

DONT TALK, WATCH



apologies for the audio sync issues.

24 November 2007

greasemonkey pagination

when the front page gets really large, my long-suffering Titanium Powerbook develops significant responsiveness issues when viewing Anchorbutt in FireFox 2.

Here's a greasemonkey script I wrote this morning that adds a (particularly unbeautiful) sort of poor-man's DOM paginator. with this script in place, initial load and general mousing around is a lot faster:

// ==UserScript==
// @name Anchorbutt Pager
// @namespace anchorbutt
// @description Adds DHTML pagination to the entries on anchorbutt
// @include http://anchorbutt.blogspot.com/*
// ==/UserScript==

/**
* Constructor function, which destructively modifies the provided DOM element
* 'container'. 'container' is subdivided into pages, each containing 'pageSize'
* blog entries. The currently displayed page can be changed using a list of
* anchor elements added to the top of 'container'.
*/
function Paginator(container, pageSize) {

//'selector' contains links to select the currently displayed page.
var selector = document.createElement('div');
selector.setAttribute('class', 'page-selector');
selector.setAttribute('style', 'margin-bottom: 1em;');

selector.appendChild(document.createTextNode('Page '));
container.appendChild(selector);

var pageCount = 0;
var currentPage = null;

/** private function to create a new empty page in the paginator */
function addPage() {
++pageCount;

//the page container
var page = document.createElement('div');
page.setAttribute('class', 'page-container');

//add a title for the page to keep users oriented
var title = document.createElement('h2');
title.appendChild(document.createTextNode('Page ' + pageCount));
page.appendChild(title);

//create a new anchor to select this page.
var toggle = document.createElement('a');
toggle.setAttribute('style',
'margin-right: 1ex; cursor: pointer;');
toggle.appendChild(document.createTextNode(pageCount));

//when clicked, the anchor removes the previous page from the DOM,
//replacing it with this one.
toggle.addEventListener('click',
function() {
if (currentPage != page) {
if (currentPage) {
container.removeChild(currentPage);
}
currentPage = page;
container.appendChild(page);
}
return false;
},
false
);
selector.appendChild(toggle);

//if this is the first page, display it immediately.
if (!currentPage) {
currentPage = page;
container.appendChild(page);
}

return page;
}

//main constructor logic. we simply iterate container's children,
//partitioning them out into page elements we build using addPage()
//calls.
var entryCount = 0;
var page = addPage();

for (var child = container.firstChild;
child && child.className != 'page-selector'; ) {

//move element out of the original container and into
//the current page accumulator.
var next = child.nextSibling;
page.appendChild(child);


if (child.className && child.className.match(/post/)) {
if (++entryCount == pageSize) {
entryCount = 0;
//rollover to the next page.
if (next)
page = addPage();
}
}
child = next;
}
}

/**
* recursively search for the blog entry container in the DOM, starting at
* parent node 'root'.
*/
function findPostContainer(root) {

//base case: we take the parent for 'date-header' elements as
//our root element.
for (var child = root.firstChild; child; child = child.nextSibling) {
if (child.className && child.className.match(/date-header/))
return root;
}
//recursive case: descend on each child.
for (var child = root.firstChild; child; child = child.nextSibling) {
var ret = findPostContainer(child);
if (ret)
return ret;
}
return null;
}

//begin MAIN procedure.

//drive down to 'main', which is the center area of the main layout.
var main = document.getElementById('main');
if (main) {
//drill down further by finding the first date header, and
//selecting its parent
main = findPostContainer(main);
}

if (main) {
//we've found the main entry container. apply pagination to it.
new Paginator(main, 10);
} else {
//the DOM structure does not match our expectations. complain.
alert('GreaseMonkey / Anchorbutt script unable to find top-level ' +
'post container. ' +
'Maybe some clever person has changed the layout?');
}

21 November 2007

Paranoimia

Who remembers Max Headroom?



Come sweet slumber, enshroud me in thy purple cloak.

20 November 2007

I found some chick's online journal from 2001

and i started reading it... sad

Me Then You. Me Then You.

I'm getting exposed to a lot of Sesame Street these days, but here's some old school.

Cloverfield

Looks like they have a working title. Anybody else following this? Looks like something worth seeing.

16 November 2007

bad schmonz poetry

apologies in advance

Ninja Parade

14 November 2007

12 November 2007

07 November 2007

02 November 2007

Ahh... 70s Tv...

... commemorating 60s Tv.

I got this from Farty McTootlePants, who likely didn't post it because of its narrow regional focus (very cool to anyone who grew up in Cleveland).



However, there is a wider point of interest. At about 5:48 we see Ghoulardi's family, including a cute tyke in a tie -- who is, in all likelihood, PTA. Made me recall the Tom Cruise/Jason Robards relationship in Magnolia -- perhaps some real-life angst there?

01 November 2007

Moskau

Hi all, this is my first post on anchorbutt. Hope you enjoy!

In the 13th century, the Mongolian leader Genghis Khan (in German Dschinghis Khan) and his hoard of riders conquered a vast area of the world as it was known at that time. Centuries later, a colourful, historical and costumed music group from Munich did the same with a surprise attack on the world of music.



Here is an English interpretation of the lyrics.