2013-08-11 03:26:38 +04:00
|
|
|
// SUPER CHEAP TEMPLATES !
|
|
|
|
window._ctl = function (event) {
|
|
|
|
var iframe=event.target || event.srcElement, div=document.createElement("div");
|
|
|
|
div.innerHTML = iframe.contentWindow.document.body.innerHTML;
|
|
|
|
if (div.children.length == 1) div = div.children[0];
|
|
|
|
iframe.parentNode.replaceChild(div, iframe);
|
2013-08-12 09:31:09 +04:00
|
|
|
};
|
|
|
|
// cheap template prepare
|
|
|
|
window._ctp = function (event) {
|
|
|
|
var iframe=event.target || event.srcElement, script=document.createElement("script");
|
|
|
|
script.setAttribute("type", "text/html");
|
|
|
|
script.setAttribute("id", iframe.getAttribute("src"));
|
|
|
|
script.innerHTML = iframe.contentWindow.document.body.innerHTML;
|
|
|
|
iframe.parentNode.removeChild(iframe);
|
|
|
|
document.body.appendChild(script);
|
2013-08-11 03:26:38 +04:00
|
|
|
};
|