Cutting Kim Jong Un Down to Size

Fat Bloke who keeps the population of North Korea starving

I was mildy amused to read this week that the few people allowed to publish a Web site in North Korea are required to include a bit of code in their site that automatically makes any mention of Kim Jong Un appear slightly bigger. That's easy in the Web's style language CSS. You simply apply the rule font-size:bigger to the name.

So how about a script that automatically makes that ridiculous man's name smaller instead? It's not hard, just use this very short script:

function reduceTheDictator() {
var d = document.getElementsByTagName('p');
var searchFor = /(kim.jong.un)/gi;
var styleToApply = 'span.fatBloke {font-size:small}';

for (var i = 0; i < d.length; i++) {
d[i].innerHTML = d[i].innerHTML.replace(searchFor, "<span class=\"fatBloke\" title=\"Fat Bloke who keeps the population of North Korea starving\">$1</span>");

var styleNode = document.createElement('style');
styleNode.type = 'text/css';
if (!!(window.attachEvent && !window.opera)) {
styleNode.styleSheet.cssText = styleToApply;
} else {
var styleText = document.createTextNode(styleToApply);

window.onload = reduceTheDictator;

Also available at

Obviously you can edit this to do more interesting stuff. All this does is to look for paragraphs (<p> elements) that contain the words Kim Jong Un (case insensitive) and wraps a <span /> element around it with a class name of fatBloke (so you can play with the CSS) and a title for the span of Fat Bloke who keeps the population of North Korea starving which is what comes up if you mouseover the text.

There's loads more that could be done with this but the point is made. Demanding that Web sites include code that highlights the dictator's name is just another sign of how ridiculous the North Korean cult of personality around the (so far) three generations of odious dictators is. And how easy it is to make fun of it.