MediaWiki:Common.js: Difference between revisions
From Armagetron Advanced
/me smacks self |
getting rid of that alert, but it works :) |
||
| Line 2: | Line 2: | ||
window.onload = function() { | window.onload = function() { | ||
var links = document.getElementsByTagName('a'); | var links = document.getElementsByTagName('a'); | ||
for(var i = 0; i < links.length; ++i) { | for(var i = 0; i < links.length; ++i) { | ||
Revision as of 18:30, 15 March 2007
/* Any JavaScript here will be loaded for all users on every page load. */
window.onload = function() {
var links = document.getElementsByTagName('a');
for(var i = 0; i < links.length; ++i) {
var link = links[i];
if(link.getAttribute('href') == "http://www.google.com/calendar/embed?src=davefancella.com_vlfi4psoqnf7ff07vlpdl6dmdk%40group.calendar.google.com") {
var iframe = document.createElement('iframe');
iframe.setAttribute('src', "http://www.google.com/calendar/embed?src=davefancella.com_vlfi4psoqnf7ff07vlpdl6dmdk%40group.calendar.google.com");
iframe.setAttribute('style', 'width:100%; height:40em;');
link.parentNode.replaceChild(iframe, link);
break;
}
}
}
