//{{{
window.applyPageTemplate_orig_ads = window.applyPageTemplate;
window.applyPageTemplate = function(title) {
applyPageTemplate_orig_ads(title);
var box = document.getElementById('adsenseBox');
var bar = document.getElementById('adsenseBar');
var sidebar = document.getElementById('sidebar');
var displayArea = document.getElementById('displayArea');
var tiddlerDisplay = document.getElementById('tiddlerDisplay');
if (sidebar && box) {
sidebar.insertBefore(box,sidebar.childNodes[0]);
box.style.display = 'block';
}
if (displayArea && bar) {
//displayArea.insertBefore(bar,displayArea.childNodes[0]);
displayArea.appendChild(bar);
bar.style.display = 'block';
}
};
setStylesheet(
'#adsenseBox { background:#fff; }\n'+
'#adsenseBar { background:#fff; padding-left:1em; }\n'+
'',
'adsenseStyles');
// getting a bug with IE and a permission denied
// when the element is an iframe
// not sure why and not sure why it even is doing
// a refreshElements with the ad iframe there
// lazy fix:
window.refreshElements_orig_ads = window.refreshElements;
window.refreshElements = function(root,changeList) {
try {
refreshElements_orig_ads(root,changeList);
}
catch (ex) {
}
}
//}}}
window.applyPageTemplate_orig_ads = window.applyPageTemplate;
window.applyPageTemplate = function(title) {
applyPageTemplate_orig_ads(title);
var box = document.getElementById('adsenseBox');
var bar = document.getElementById('adsenseBar');
var sidebar = document.getElementById('sidebar');
var displayArea = document.getElementById('displayArea');
var tiddlerDisplay = document.getElementById('tiddlerDisplay');
if (sidebar && box) {
sidebar.insertBefore(box,sidebar.childNodes[0]);
box.style.display = 'block';
}
if (displayArea && bar) {
//displayArea.insertBefore(bar,displayArea.childNodes[0]);
displayArea.appendChild(bar);
bar.style.display = 'block';
}
};
setStylesheet(
'#adsenseBox { background:#fff; }\n'+
'#adsenseBar { background:#fff; padding-left:1em; }\n'+
'',
'adsenseStyles');
// getting a bug with IE and a permission denied
// when the element is an iframe
// not sure why and not sure why it even is doing
// a refreshElements with the ad iframe there
// lazy fix:
window.refreshElements_orig_ads = window.refreshElements;
window.refreshElements = function(root,changeList) {
try {
refreshElements_orig_ads(root,changeList);
}
catch (ex) {
}
}
//}}}