Get this

Only want the number?

Get this

No scriptie, no shirtie.

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; they broke it and don’t have one you can link directly anymore so…

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

Anyone can double click to edit the block below. Its content is
not necessarily from Sedition·com or reviewed or approved by us. Your
chalkboard entry will stay there until someone else does the same or
the server cache is reset or expires in a week. Rules: you can use
basic Markdown or
XHTML
strict, no styles, no scripts, no <pre/>, no
attributes except href for links, 750-ish characters, and,
as usual, threats and abuse won’t be tolerated unless they’re very,
very funny.

Why would you want to do this? You can put an ad and link for your site there. You can put a “Sedition·sucks” there. It’s above the fold on the top page and it’s all yours until the next visitor comes along.

Why would we want to do this? 1) Free speech is fun. 2) Cross-pollination is fun. 3) A Web 2.0 résumé point is nice when poking the job market with a sharp stick.

Sedition·com is green

A Shepherd Boy tended his master’s Sheep near a dark forest not
far from the village. Soon he found life in the pasture very
dull. All he could do to amuse himself was to talk to his dog or
play on his shepherd’s pipe.

One day as he sat watching the Sheep and the quiet forest, and
thinking what he would do should he see a Wolf, he thought of a
plan to amuse himself.

His Master had told him to call for help should a Wolf attack the
flock, and the Villagers would drive it away. So now, though he
had not seen anything that even looked like a Wolf, he ran toward
the village shouting at the top of his voice, “Wolf! Wolf!”

As he expected, the Villagers who heard the cry dropped their
work and ran in great excitement to the pasture. But when they
got there they found the Boy doubled up with laughter at the
trick he had played on them.

A few days later the Shepherd Boy again shouted, “Wolf! Wolf!”
Again the Villagers ran to help him, only to be laughed at again.

Then one evening as the sun was setting behind the forest and the
shadows were creeping out over the pasture, a Wolf really did
spring from the underbrush and fall upon the Sheep.

In terror the Boy ran toward the village shouting “Wolf! Wolf!”
But though the Villagers heard the cry, they did not run to help
him as they had before. “He cannot fool us again,” they said.

The Wolf killed a great many of the Boy’s sheep and then slipped
away into the forest.