User:FrViPofm/monobook.js

From OpenStreetMap Wiki
Jump to: navigation, search
addOnloadHook(function () {
  var target = "hidenIFrame";
  var frame = document.body.appendChild(document.createElement("iframe"));
  frame.setAttribute("style","display:none");
  frame.setAttribute("id",target);
  frame.setAttribute("name",target);
  var links0 = document.getElementById('bodyContent');
  var links = document.getElementById('bodyContent').getElementsByTagName('a');
  for(var a in links) {
    if(links[a].href && links[a].host == 'localhost:8111') {
      var h = links[a].host;
      links[a].setAttribute("target",target);
    }
  }
})