Modified black template javascript.