Wiktionary:Helferlein/rl-prüfen.js

Aus Wiktionary, dem freien Wörterbuch

// addLink (w:en:Wikipedia:WikiProject_User_scripts/Scripts)

function addLink(where, url, name, id, title, key, after){
   var na = document.createElement('a');
   na.href = url;
   na.appendChild(document.createTextNode(name));
   var li = document.createElement('li');
   if(id) li.id = id;
   li.appendChild(na);
   var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
   if(after) {
     tabs.insertBefore(li,document.getElementById(after));
   } else {
     tabs.appendChild(li);
   }
   if(id) {
     if(key && title) { ta[id] = [key, title]; }
     else if(key) { ta[id] = [key, ]; }
     else if(title) { ta[id] = [, title];}
   }
   akeytt();
   return li;
}

// Hilfreiche Links (w:en:Wikipedia:WikiProject_User_scripts/Scripts)

 addOnloadHook(function () {
   var title; // UTF-8
    if (!(title = document.getElementById('t-whatlinkshere') )) return;
    if (!(title = title.getElementsByTagName('a')[0] )) return;
    if (!(title = title.href )) return;
    if (!(title = title.replace(/^.*\/wiki\/Spezial:Whatlinkshere\//, '') )) return;
   var iTitle = title; // ISO-8859-1
    if (!(iTitle = iTitle.replace(/%C3%84/, "%C4") )) return; // Ä
    if (!(iTitle = iTitle.replace(/%C3%A4/, "%E4") )) return; // ä
    if (!(iTitle = iTitle.replace(/%C3%96/, "%D6") )) return; // Ö
    if (!(iTitle = iTitle.replace(/%C3%B6/, "%F6") )) return; // ö
    if (!(iTitle = iTitle.replace(/%C3%9C/, "%DC") )) return; // Ü
    if (!(iTitle = iTitle.replace(/%C3%BC/, "%FC") )) return; // ü
    if (!(iTitle = iTitle.replace(/%C3%9F/, "%DF") )) return; // ß
 
    addLink('p-navigation', 'http://www.copyscape.com/',
            'URV-Prüfung', 't-copyscape', 'URV-Test', 'U', null);
    addLink('p-navigation', 'http://de.wikipedia.org/wiki/'+title,
            'WikiPedia', 't-wp', 'Wikipedia-Suche', 'W', null);
    addLink('p-navigation', 'http://www.google.de/search?q=%22'+title+'%22',
            'Google', 't-google', 'Google-Suche', 'G', null);
    addLink('p-navigation', 'http://dict.leo.org/?search='+title+'&lang=de',
            'LEO', 't-leo', 'Leo.org-Suche', 'L', null);
    addLink('p-navigation', 'http://duden.xipolis.net/suche/trefferliste.php?suchbegriff[AND]='+title,
            'Duden', 't-duden', 'Duden-Suche', 'D', null);
    addLink('p-navigation', 'http://www.canoo.net/services/Controller?input='+iTitle+'&lang=de',
            'Canoo', 't-canoo', 'Canoo-Suche', 'C', null);
    addLink('p-navigation', 'http://www.wissen.de/xt/default.do?MENUNAME=Suche&query='+title+'&SEARCHTYPE=topic',
            'Wissen.de', 't-wissen', 'Wissen.de-Suche', 'I', null);
    addLink('p-navigation', 'http://wortschatz.informatik.uni-leipzig.de/cgi-bin/wort_www.exe?Wort='+iTitle+'&site=1&cs=1',
            'Wortschatz.Leipzig', 't-wortschatz', 'Wortschatz-Suche', 'S', null);
    addLink('p-navigation', '/wiki/Wiktionary:Referenzen',
            'Weitere Referenzen', 't-referenzen', 'DWDS, Grimm, etc.', 'R', null);
    addLink('p-navigation', 'http://de.altavista.com/web/results?q=link:de.wiktionary.org/wiki/'+title,
            'Netz-Rückverweise', 't-backlinks', 'Internet-Backlinks (AltaVista)', 'B', null);
    addLink('p-navigation', 'http://validator.w3.org/check?uri=http://de.wiktionary.org/wiki/'+title,
            'W3C-Prüfung', 't-w3c', 'XHTML-Auszeichnung prüfen', 'V', null);
    addLink('p-navigation', '/wiki/'+title+'?action=raw&ctype=text/css',
            'Roher Quelltext', 't-quell', 'raw', 'Q', null);
    addLink('p-navigation', '/wiki/'+title+'?action=purge',
            'ZwSpeicher leeren', 't-purge', 'Cache purgen', 'P', null);
 }); // Skriptende