Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
function updateFrontend(e, xml_req) { obj = document.getElementById("fe-light").object; if( xml_req.ready_state == 4 && xml_req.status == 200 ) { // Indicator goes light obj.setValue(1); } else { // Indicator goes red obj.setValue(20); } } var xml_request; function checkFrontend() { xml_request = new XMLHttpRequest(); xml_request.onload = function(e) {updateFrontend(e, xml_request);} xml_request.overrideMimeType("text/xml"); xml_request.open("GET", "http://mog.com/index.html"); xml_request.setRequestHeader("Cache-Control", "no-cache"); xml_request.send(null); }
This paste will be private.
From the Design Piracy series on my blog: