User:Pc3021/vector.js

//LINK AUF gWatch OBEN NACH "BEOBACHTEN" $(function { //funktion addPortletLink von wikibits.js wird verwendet! if (!(hist = document.getElementById('ca-watch') )) { if (!(hist = document.getElementById('ca-unwatch') )) return; }

var url; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return; addPortletLink('p-cactions', "javascript:addiframe;", "gWatch", 'ca-gwatch', 'Beobachten mit gWatch', 'b', hist.nextSibling);

});

//FUNKTION UM IFRAME HINZUZUFÜGEN function addiframe{

//alle attribute kreieren var pfad = document.createAttribute("src"); pfad.nodeValue = "http://tools.wikimedia.de/~luxo/gwatch/edit.php?action=addirfromwiki&page="+wgPageName+"&pageid="+wgArticleId+"&wiki=http:"+wgServer+"&username="+wgUserName;

var breite = document.createAttribute("width"); breite.nodeValue = "60%";

var scroll = document.createAttribute("scrolling"); scroll.nodeValue = "no";

var marginheight = document.createAttribute("marginheight"); marginheight.nodeValue = "0";

var marginwidth = document.createAttribute("marginwidth"); marginwidth.nodeValue = "0";

var frameborder = document.createAttribute("frameborder"); frameborder.nodeValue = "0";

var gWid = document.createAttribute("id"); gWid.nodeValue = "gWatchframe";

//element kreieren var myiframe = document.createElement("iframe");

//alle anhängen myiframe.setAttributeNode(pfad); myiframe.setAttributeNode(breite); myiframe.setAttributeNode(scroll); myiframe.setAttributeNode(marginheight); myiframe.setAttributeNode(frameborder);

//mit Center umfassen var mycenter = document.createElement("center"); mycenter.setAttributeNode(gWid);//ID anhängen

mycenter.appendChild(myiframe);//Einfügen

document.getElementById("bodyContent").insertBefore(mycenter, document.getElementById("siteSub")); setTimeout("hidegWatch", 10000); }

function hidegWatch{ document.getElementById("gWatchframe").style.display = 'none'; }