(function(){
"use strict";
exports.name = "statcounter";
exports.params = [];
/*
Run the macro
*/
exports.run = function(format) {
var sc_project=SOMENUMBER;
var sc_invisible=1;
var sc_security="SOMEALPHANUMERICALCODE";
var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" + scJsHost+ "statcounter.com/counter/counter.js'></"+"script>");
};
})();
In any case, list of tw's JavaScript code runs inside a sandbox , so maybe document is not what you think . Just try with window.document instead