User:Annabel/Interwiki.js

/* %InterwikiSuggest: a tool for listing interwikilinks for wiktionary. %  All pages with the same name, as well as interwikilinks on these %  pages are collected and listed. % %C 2008-2010, Annabel % %This is free software: you can redistribute it and/or modify %it under the terms of the GNU General Public License as published by %the Free Software Foundation, either version 3 of the License, or %(at your option) any later version. % %InterwikiSuggest is distributed in the hope that it will be useful, %but WITHOUT ANY WARRANTY; without even the implied warranty of %MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %GNU General Public License for more details. % %You should have received a copy of the GNU General Public License %along with this interwiki tool. If not, see . // var buttonIWText = "Interwiki list";

function GetIW {   var url2 = "http://tools.wikimedia.de/~annabel/InterwikiOnWikt.php?Lang=en&Article="; url2 += wgArticleId; var IWWindow = window.open (url2); }

function AddInterwikiBtn {   var navigationBox = document.getElementById('p-navigation'); var revBox = document.createElement("div"); var revBox = navigationBox.parentNode.insertBefore(document.createElement("div"),navigationBox); revBox.id = "p-rev"; revBox.className = "portlet"; revContent = revBox.appendChild(document.createElement("div")); revContent.id = "recRevContent"; revContent.className = "pBody"; revContent.style.padding = "0 .3em .3em .3em"; revContent.style.lineHeight = "1.2em"; revContent.style.fontFamily = "Verdana, sans-serif"; var divNode = revContent.appendChild(document.createElement("div")); divNode.id = "showButton"; divNode.style.textAlign = "center"; var button = divNode.appendChild(document.createElement("button")); button.innerHTML = buttonIWText; button.onclick = GetIW; button.style.fontSize = "90%"; button.style.marginTop = ".3em"; button.style.padding = "0"; }

if (wgNamespaceNumber >= 0) addOnloadHook(AddInterwikiBtn);

//