User:FrViPofm/monobook.js

From OpenStreetMap Wiki
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences
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);
    }
  }
})