US anti-terror military death count JavaScript for your site

Monday, 24 September 2007

Put this in your page

<p>
<script type="text/javascript"
 src="http://sedition.com/js/casualties.js">
</script>
</p>

Get this

Only want the number?

<p style="text-align:center">
<script type="text/javascript"
 src="http://sedition.com/js/casualties.js?text=off">
</script>
</p>

Get this

And that, as they say, is that.

The data comes from iCasualties.org. The default display is the sum of their Iraq and Afghanistan numbers. You can set it to return just one or the other. The numbers link back to them, as they should. Those folks work hard on their site and getting it right. Here is their donations page.

The numbers displayed by the JavaScript are updated from them often. No guarantees but unless you are checking all day, our version is much more likely to reflect the current values at iCasualties than what you saw the last time you looked.

API, CSS, and placement

The (X)HTML it generates looks something like this (whitespace added)–

<span id="USmilBodyCount">
US military deaths in war on terror:
<b><a title="Iraq + Afghanistan casualties"
 href="http://icasualties.org/">[number]</a></b>
</span>

Text in a span with an id (in bold above) you can hook with your own style sheet if you choose. The generated (X)HTML is appended to the nodes of whatever parent it sits in. That means it might jump down somewhere you don’t expect or want. If that happens, just wrap it in <p>[script here]</p> to anchor it as a child, the only one, of that paragraph tag.

Content served as application/xhtml+xml will not be placed correctly. The script self-identification technique used only works if the script can see the DOM as it is loaded; streamlike. In application/xhtml+xml, as other XML, the DOM is only available, atomically, after it has all been loaded.

Allowed arguments in src querystring

no, the number of fatalities for which country
no=full, the default, shows both combined
no=a, for Afghanistan’s number only
no=i, for Iraq’s number only
text
text=on, the default
text=off, to only show the number
sep, the separator of the text and number; using it implies you want the text on
sep=:, the default, for a colon
sep=n, for an en-dash with whitespace
sep=m, for an em-dash without whitespace
sep=br, for an (X)HTML line break, <br/>

Two more examples

<p>
<script type="text/javascript"
 src="http://sedition.com/js/casualties.js?sep=n;no=a">
</script>
</p>

<p style="text-align:center">
<script type="text/javascript"
 src="http://sedition.com/js/casualties.js?text=off;no=i">
</script>
</p>

NB

There is no branding (Sedition·com) on it right now. If you want it to stay that way, make sure to mention us if you use it.

Now for some SEO missing above

US military fatalities, troops killed.

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

Happy birthday to It

Sunday, 23 September 2007

I just accidentally noticed that today is Sedition·com’s ninth anniversary. We’ll save a major retrospective for 10, or 20 if parole takes longer than I’d like. For now, nine years ago–

Writers and artists without bylines include Vivian Five VI, Barnaby “I rest my rectum” Hazen and Erich “I gave my sister all her ideas for the X-Men costumes” Mingenbach.

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

This week in the news #35

Sunday, 23 September 2007

MIT coed with fake bomb “art” arrested

Troopers arrested an MIT student at gunpoint Friday after she walked into Logan International Airport wearing a computer circuit board and wiring on her sweatshirt. Authorities call it a fake bomb; she called it art. Glen Johnson, AP

Dear Boston cops,

Since a couple of you were quite frank about having almost shot that young woman because her shirt blinked, here is an easy lesson. I hope it sticks.

How to identify an IED

“What’s the trick?” you ask. Well, it’s simple. Just ask any vet fresh off a highway patrol in Baghdad. The bomb looks like something besides a student electronics project so that it has a chance of actually killing someone you irretrievable imbeciles.

[Um… sorry in advance, Jen.]

Blogger “exposes” annoying quote abuse

Isn’t it “funny” how something can “really annoy” you for ages and then you discover via “the Internet” that the same thing “really annoys” thousands of “other people,” too? AP, regarding Bethany Keeley’s “blog”

Dear Y’all,

Quit biting my 2003 material unless you’re gonna do it better.

Sincerely,
–Grand Master Ash, the Furious Five

PS: Take note. The word sincerely above was entirely without quotation marks but the effect remains unchanged.

Ernie Chambers, hero to some

Nebraska state senator sues God

And we have a new hero at Sedition·com—Ernie Chambers. God even provided him with an impromptu halo for this photo to show He can be a good sport.

God is dead. Nietzsche
God is served. Pond

Giuliani: I’m Among Best Known Americans

“I’m probably one of the four or five best known Americans in the world,” Giuliani told [a bunch of nobodies whose names you’ll never know].

If you’d ever travelled without an entourage or bothered to meet any foreigner who is not rich enough to have a second home in New York City, asshat, you’d know the top five looks something like–

  1. Michael Jackson
  2. Madonna
  3. Brad Pitt
  4. Kenny G
  5. Ronald Reagan

You would not even crack the top 2,000, my poor deluded honkey. David Hasselhoff alone is so much better known than you that there are no punchlines to top it. I suspect you’d be mistaken for a Central Park gardener by 9,999 out of 10,000 citizens of any other country.

Tens of thousands of CCTV cameras, yet 80% of crime unsolved

In fact, four out of five of the boroughs with the most cameras have a record of solving crime that is below average. thisislondon.co.uk

Anyone who is surprised by this should be kicked in the gonads by every member of A.C. Milan.

OJ Simpson charged with kidnapping, armed robbery

Boy, that’s weird.

World should brace for possible war over Iran: France

World leaders should brace for possible domestic feedback delivered in staccato crescendo1.

Canadians celebrate loonie’s parity with US dollar

Well you should. Maybe start to wake up some folks down here that the only way to destroy America outside the masturbatory Islamofascist Chinese fire drills is to keep voting Democrat and Republican. Without a thriving economy, the US is nothing but a smaller version of Canada with better beaches.

Associated Press: Madonna: I’m an “ambassador for Judaism”

Sedition·com: Israel faces new insurmountable challenge, end of days begun.

Ass hole… Ass in a hole? Hole of the ass?

Firefighters save donkey trapped in well

I hate to give ammunition to my enemies but this photo is clear proof of God. Also proof that He is either dyslexic or just plain old funny.

1

Me: What?

Myself: Music joke. Bullets. Loud.

Me: I know. I get it. It’s just stupid. And why bother explaining it here?

Myself: Because now that I’ve had a taste of #1, I ain’t never going back.

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

Websites I’d like to visit when someone finally builds them

Saturday, 22 September 2007

  • DiscardedTrophyBrides.com
  • celebrity-relics.com/?q=Tom+Cruise&item=scapula
  • enronexecutiveexecutions.org
  • mail-a-turd.cx/?address=1600+Pennsylvania+Avenue
  • CongressionalPunch.org
  • www.fantasy-jihad-pool.net
digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

An email from the wif: priceless morning with babies Part I

Friday, 21 September 2007

From: _____________
Date: September 21, 2007 9:02:01 AM PDT
To: ___________________
Subject: priceless morning with babies Part I

Mater underwear: $4.99.

Purple potty seat: $9.99.

Waking up to your son screaming, “Mommy! Come and wipe my butt!!” at the top of his lungs: priceless.

“Cars” underwear

PS: Did you know the Middle English wif means both wife and a band for faggots? Fill in the musical punchline of your choice.

PPS: Did you know that post scripts are considered bad style and are only used by the least serious and most disorganized writers?

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

Quotes from the wilderness

Friday, 21 September 2007

All “what do I care” references on a discussion board are redundant.

Nobody cares.

son of parnas, Wednesday, November 02, 2005
digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

PS, Dear Scruggs

Thursday, 20 September 2007

Jesus, I haven’t had beer for breakfast in 10 years. What kind of life is that!?!

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

Say hello to my little friend

Thursday, 20 September 2007

Another jumping spider

Those lovely eyelashes are what originally drew me in.

If the face rings a bell…

Mr…?

Baba. Ponda Baba.

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

Finally caught the most recent X-Men movie on cable –or– BPHO

Wednesday, 19 September 2007

Am I the only one who found the ratings page for X-Men: Last Stand a little odd?

BPHO — Blue Pussy Hanging Out

digg stumbleupon del.icio.us reddit Fark Technorati Faves
· · ·

I SO TOTALLY WIN

Tuesday, 18 September 2007

The Biggest Asshole in the World, #1

All the rest of you: be honest with yourselves; it’s time for you to admit defeat.

digg stumbleupon del.icio.us reddit Fark Technorati Faves