Benutzer:Ricardo02/monobook.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Inhalt hinzugefügt Inhalt gelöscht
KKeine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
(10 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
+ 'MediaWiki:Gadget-Extra-Editbuttons.js&action=raw&ctype=text/javascript"><\/script>') |
+ 'MediaWiki:Gadget-Extra-Editbuttons.js&action=raw&ctype=text/javascript"><\/script>') |
||
var rmEditButtons = [6,7,10] |
var rmEditButtons = [6,7,10] |
||
− | customEditButtons = "A3,R1,T,H,K" |
+ | customEditButtons = "A3,R1,T,H,K,J1,S" |
+ | var usersignature = '\~\~\~\~' |
||
− | /* |
||
+ | |||
− | Integration vieler externer Hilfsfunktionen vor allem des Toolservers in die Oberfläche der Wikipedia |
||
+ | function addFastLinks() { |
||
− | mittels zusätzlicher Karteireiter an geeigneten Stellen abhängig vom Kontext der gerade dargestellten |
||
+ | var div = document.createElement('div'); |
||
− | Seite (Artikel, Bildseite, Benutzerseite, Kategorie...). |
||
+ | div.className = "generated-sidebar portlet"; |
||
− | Dieses Skript basiert auf http://commons.wikimedia.org/wiki/MediaWiki:Extra-tabs.js, welches dort für |
||
+ | var h5 = document.createElement('h5'); |
||
− | die Toolserverintegration sorgt, siehe http://de.wikipedia.org/wiki/Wikipedia:Helferlein/Toolserver-Integration. |
||
+ | h5.appendChild(document.createTextNode('Schnelllinks')); |
||
− | |||
+ | div.appendChild(h5); |
||
− | Dieses Skript wurde mit Konqueror 3.5 and Firefox 1.5 getesten. Opera und Internet Explorer werden |
||
+ | var divi = document.createElement('div'); |
||
− | ebenfalls unterstützt. Bitte Ergänzungen sorgfältig testen (Skripte, die nur im Firefox laufen, sind |
||
+ | divi.className = "pBody"; |
||
− | blöd!) |
||
+ | var ul = document.createElement('ul'); |
||
− | */ |
||
+ | var li = document.createElement('li'); |
||
− | |||
+ | var a = document.createElement('a'); |
||
− | // works only in monobook skin |
||
+ | a.href = "/wiki/DCW:TB"; |
||
− | if (skin == 'monobook') |
||
+ | a.appendChild(document.createTextNode('Bilder')); |
||
− | { |
||
+ | li.appendChild(a); |
||
− | |||
+ | li.appendChild(document.createElement('br')); |
||
− | // project URL without protocol handler |
||
+ | var a = document.createElement('a'); |
||
− | var tab_project = wgServer.replace("http://", ""); |
||
+ | a.href = "/wiki/DetektivConan-Wiki Diskussion:Team Bilder"; |
||
− | var tab_language = tab_project.split(".")[0]; |
||
+ | a.appendChild(document.createTextNode('Diskussion:Team Bilder')); |
||
− | var tab_base = tab_project.split(".")[1]; |
||
+ | li.appendChild(a); |
||
− | |||
+ | li.appendChild(document.createElement('br')); |
||
− | // Translations (variables for internationalisation and localisation): |
||
+ | var a = document.createElement('a'); |
||
− | |||
+ | a.href = "/wiki/Kategorie:DC-Wiki:Team_Bilder"; |
||
− | // namespace names (there is only wgCanonicalNamespace variable; although not a |
||
+ | a.appendChild(document.createTextNode('Team Bilder Bausteine')); |
||
− | // problem for Commons but for non-english wikis, we make it easier for them |
||
+ | li.appendChild(a); |
||
− | // reusing the script with these variables) |
||
+ | li.appendChild(document.createElement('br')); |
||
− | var tab_ns_image = 'Datei:'; |
||
+ | var a = document.createElement('a'); |
||
− | var tab_ns_user = 'Benutzer:'; |
||
+ | a.href = "/wiki/DCW:MB"; |
||
− | var tab_ns_special = 'Spezial:'; |
||
+ | a.appendChild(document.createTextNode('Meinungsbilder')); |
||
− | |||
+ | li.appendChild(a); |
||
− | // Interface strings, translations get defined in the /<ISO-Code> sub pages |
||
+ | li.appendChild(document.createElement('br')); |
||
− | var tab_fist = 'image search'; |
||
+ | var a = document.createElement('a'); |
||
− | var tab_check_usage = 'check usage'; |
||
+ | a.href = "/wiki/DetektivConan-Wiki:Team_Inhalt/Status_der_Kapitel-Artikel"; |
||
− | var tab_log = 'log'; |
||
+ | a.appendChild(document.createTextNode('Status der Kapitel')); |
||
− | var tab_gallery = 'gallery'; |
||
+ | li.appendChild(a); |
||
− | var tab_orphans = 'orphans'; |
||
+ | li.appendChild(document.createElement('br')); |
||
− | var tab_untagged = 'untagged'; |
||
+ | var a = document.createElement('a'); |
||
− | var tab_catscan = 'CatScan'; |
||
+ | a.href = "/wiki/DetektivConan-Wiki:Team_Inhalt/Status_der_Episoden-Artikel"; |
||
− | var tab_diff = 'diff to me'; |
||
+ | a.appendChild(document.createTextNode('Status der Episoden')); |
||
− | var tab_mediasearch = 'file overview'; |
||
+ | li.appendChild(a); |
||
− | var tab_commonshelper = 'move to Commons'; |
||
+ | ul.appendChild(li); |
||
− | var tab_templatetiger = 'evaluation'; |
||
+ | li.appendChild(document.createElement('br')); |
||
− | var tab_wscan = 'new copyvio candidates'; |
||
+ | var a = document.createElement('a'); |
||
− | var tab_autoreviewer = 'troubleshooting'; |
||
+ | a.href = "/wiki/DCW:TI"; |
||
− | |||
+ | a.appendChild(document.createTextNode('Inhalt')); |
||
− | document.write('<script type="text/javascript" src="' + wgScript + '?title=' |
||
+ | li.appendChild(a); |
||
− | + 'MediaWiki:Gadget-toolserver-integration.js/' + wgUserLanguage |
||
+ | li.appendChild(document.createElement('br')); |
||
− | + '&action=raw&ctype=text/javascript"><\/script>'); |
||
+ | var a = document.createElement('a'); |
||
− | |||
+ | a.href = "/wiki/DCW:TK"; |
||
− | function append_tab(url, name, id) |
||
+ | a.appendChild(document.createTextNode('Korrektur')); |
||
− | { |
||
− | + | li.appendChild(a); |
|
+ | li.appendChild(document.createElement('br')); |
||
− | na.setAttribute('href', url); |
||
+ | var a = document.createElement('a'); |
||
− | |||
+ | a.href = "/wiki/DetektivConan-Wiki:Kandidaturen"; |
||
− | var txt = document.createTextNode(name); |
||
− | + | a.appendChild(document.createTextNode('Kandidaturen')); |
|
+ | li.appendChild(a); |
||
− | |||
− | + | li.appendChild(document.createElement('br')); |
|
+ | var a = document.createElement('a'); |
||
− | if(id) li.id = id; |
||
+ | a.href = "/wiki/DetektivConan-Wiki:Beförderungen"; |
||
− | li.appendChild(na); |
||
+ | a.appendChild(document.createTextNode('Beförderungen')); |
||
− | |||
+ | li.appendChild(a); |
||
− | // Grab the element we want to append the tab and append the tab to it. |
||
− | + | li.appendChild(document.createElement('br')); |
|
+ | var a = document.createElement('a'); |
||
− | var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0]; |
||
+ | a.href = "/wiki/Benutzer:Ricardo02/Test"; |
||
− | tabs.appendChild(li); |
||
+ | a.appendChild(document.createTextNode('Testseite')); |
||
− | } |
||
+ | li.appendChild(a); |
||
− | |||
+ | ul.appendChild(li); |
||
− | function add_article_tabs(article) |
||
+ | divi.appendChild(ul); |
||
− | { |
||
+ | div.appendChild(divi); |
||
− | append_tab('http://toolserver.org/~magnus/fist.php?doit=1&language=' + tab_language + '&project=' + tab_base + '&data=' + article + '&datatype=articles¶ms[catdepth]=0¶ms[random]=50¶ms[ll_max]=5¶ms[free_only]=1¶ms[commons_max]=5¶ms[commonsense]=on' + '¶ms[flickr_max]=5¶ms[flickr_new_name_from_article]=1¶ms[wts_max]=5¶ms[gimp_max]=5¶ms[esp_max]=5¶ms[esp_skip_flickr]=1' + '¶ms[forarticles]=all¶ms[lessthan_images]=3¶ms[jpeg]=1¶ms[png]=1¶ms[gif]=1¶ms[svg]=1¶ms[min_width]=80' + '¶ms[min_height]=80&sources[languagelinks]=1&sources[commons]=1&sources[flickr]=1&sources[wts]=1&sources[gimp]=1&sources[everystockphoto]=1', tab_fist, 'ca-fist'); |
||
+ | document.getElementById('column-one').insertBefore(div,document.getElementById('p-Navigation')); |
||
− | |||
− | append_tab('http://toolserver.org/~timl/cgi-bin/wikilint?url=' + wgServer + '/wiki/' + article + '&remove_century=ON&do_typo_check=ON&l=' + tab_language + '&Go%21=Go%21&.cgifields=rnd&.cgifields=testpage&.cgifields=remove_century&.cgifields=do_typo_check', tab_autoreviewer, 'ca-autoreviewer'); |
||
− | } |
||
− | |||
− | function add_image_tabs(imagetitle) |
||
− | { |
||
− | // show only if local image |
||
− | if (wgArticleId != 0) |
||
− | { |
||
− | // TODO: add '&reallydirectupload=1' when commonshelper provides a preview prior to direct upload |
||
− | append_tab('http://toolserver.org/~magnus/commonshelper.php?interface=' + wgUserLanguage + '&language=' + tab_language + '&image=' + imagetitle + '&newname=&project=' + tab_base + '&username=&commonsense=1&doit=Get+text' , tab_commonshelper, 'ca-commonshelper'); |
||
− | } |
||
− | |||
− | append_tab('http://toolserver.org/~daniel/WikiSense/CheckUsage.php?i=' + imagetitle + '&w=_100000', tab_check_usage, 'ca-checkusage'); |
||
− | append_tab('/w/index.php?title=' + tab_ns_special + 'Log&page=' + tab_ns_image + imagetitle, tab_log, 'ca-log'); |
||
− | } |
||
− | |||
− | function add_template_tabs(template) |
||
− | { |
||
− | append_tab('http://toolserver.org/~kolossos/templatetiger/tt-table4.php?lang=' + tab_language + '&template=' + template + '&offset=0&limit=30' , tab_templatetiger, 'ca-templatetiger'); |
||
− | } |
||
− | |||
− | function add_user_tabs(username) |
||
− | { |
||
− | append_tab('http://toolserver.org/~daniel/WikiSense/Gallery.php?wiki=' + tab_project + '&img_user_text=' + username , tab_gallery, 'ca-gallery'); |
||
− | append_tab('http://toolserver.org/~daniel/WikiSense/OrphanImages.php?wiki=' + tab_project + '&img_user_text=' + username , tab_orphans, 'ca-orphans'); |
||
− | append_tab('http://toolserver.org/~daniel/WikiSense/UntaggedImages.php?wiki=' + tab_project + '&img_user_text=' + username , tab_untagged, 'ca-untagged'); |
||
− | } |
||
− | |||
− | function add_category_tabs(category) |
||
− | { |
||
− | append_tab('http://toolserver.org/~daniel/WikiSense/CategoryIntersect.php?wiki=' + tab_project + '&basecat=' + category , tab_catscan, 'ca-catscan'); |
||
− | } |
||
− | |||
− | function add_special_tabs() |
||
− | { |
||
− | switch(wgCanonicalSpecialPageName) |
||
− | { |
||
− | case 'Contributions': |
||
− | var username = document.getElementById('contentSub').getElementsByTagName('a')[0].firstChild.nodeValue; |
||
− | add_user_tabs(username); |
||
− | break; |
||
− | case 'Newpages': |
||
− | case 'Recentchanges': |
||
− | append_tab('http://toolserver.org/~revvar/urv.php' , tab_wscan, 'ca-wscan'); |
||
− | break; |
||
− | default: |
||
− | // nothing |
||
− | } |
||
− | } |
||
− | |||
− | function add_default_tabs(title) |
||
− | { |
||
− | append_tab('http://toolserver.org/~daniel/WikiSense/MyDiff.php?wiki=' + tab_project + '&title=' + title + '&user=' + wgUserName, tab_diff, 'ca-mydiff'); |
||
− | } |
||
− | |||
− | function do_onload() |
||
− | { |
||
− | // show tabs only on certain user actions |
||
− | switch(wgAction) |
||
− | { |
||
− | case 'view': |
||
− | case 'edit': |
||
− | case 'submit': |
||
− | // title without namespace name |
||
− | var title = wgTitle; |
||
− | // Namespace numbers are (see [[m:Help:Variables]]): |
||
− | // -1: Special |
||
− | // 2: User |
||
− | // 3: User_talk |
||
− | // 6: Image |
||
− | // 7: Image_talk |
||
− | // 14: Category |
||
− | switch(wgNamespaceNumber) |
||
− | { |
||
− | case -1: |
||
− | // Tabs not useful for anon users (IPs). On contributions we can grab the (de.wikipedia custom) |
||
− | // [[MediaWiki:Sp-contributions-footer-anon]] id in order to determine if it is an anon user or not. |
||
− | if (!document.getElementById('sp-contributions-footer-anon')) |
||
− | { |
||
− | add_special_tabs(); |
||
− | } |
||
− | break; |
||
− | case 0: |
||
− | add_article_tabs(title); |
||
− | break; |
||
− | case 2: |
||
− | case 3: |
||
− | // Tabs not useful for anon users (IPs). On user pages we can check if the log link (t-log id) exists. |
||
− | // Anon (and not existing, aka "fake") users don't have a toolbox link into the log. |
||
− | if (document.getElementById('t-log')) |
||
− | { |
||
− | add_user_tabs(title); |
||
− | } |
||
− | break; |
||
− | case 6: |
||
− | case 7: |
||
− | add_image_tabs(title); |
||
− | break; |
||
− | case 10: |
||
− | add_template_tabs(title); |
||
− | break; |
||
− | case 14: |
||
− | add_category_tabs(title); |
||
− | break; |
||
− | default: |
||
− | // nothing |
||
− | } |
||
− | break; |
||
− | |||
− | case 'history': |
||
− | // title with namespace name |
||
− | title = wgPageName; |
||
− | switch(wgNamespaceNumber) |
||
− | { |
||
− | case -1: |
||
− | break; |
||
− | default: |
||
− | add_default_tabs(title); |
||
− | } |
||
− | break; |
||
− | |||
− | default: |
||
− | // nothing; |
||
− | } |
||
− | } |
||
− | |||
− | addOnloadHook( do_onload ); |
||
− | |||
} |
} |
||
+ | addOnloadHook(addFastLinks); |
Aktuelle Version vom 3. Mai 2010, 18:40 Uhr
document.write('<script type="text/javascript" src="http://de.wikipedia.org/w/index.php?title=' + 'MediaWiki:Gadget-Extra-Editbuttons.js&action=raw&ctype=text/javascript"><\/script>') var rmEditButtons = [6,7,10] customEditButtons = "A3,R1,T,H,K,J1,S" var usersignature = '\~\~\~\~' function addFastLinks() { var div = document.createElement('div'); div.className = "generated-sidebar portlet"; var h5 = document.createElement('h5'); h5.appendChild(document.createTextNode('Schnelllinks')); div.appendChild(h5); var divi = document.createElement('div'); divi.className = "pBody"; var ul = document.createElement('ul'); var li = document.createElement('li'); var a = document.createElement('a'); a.href = "/wiki/DCW:TB"; a.appendChild(document.createTextNode('Bilder')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DetektivConan-Wiki Diskussion:Team Bilder"; a.appendChild(document.createTextNode('Diskussion:Team Bilder')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/Kategorie:DC-Wiki:Team_Bilder"; a.appendChild(document.createTextNode('Team Bilder Bausteine')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DCW:MB"; a.appendChild(document.createTextNode('Meinungsbilder')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DetektivConan-Wiki:Team_Inhalt/Status_der_Kapitel-Artikel"; a.appendChild(document.createTextNode('Status der Kapitel')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DetektivConan-Wiki:Team_Inhalt/Status_der_Episoden-Artikel"; a.appendChild(document.createTextNode('Status der Episoden')); li.appendChild(a); ul.appendChild(li); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DCW:TI"; a.appendChild(document.createTextNode('Inhalt')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DCW:TK"; a.appendChild(document.createTextNode('Korrektur')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DetektivConan-Wiki:Kandidaturen"; a.appendChild(document.createTextNode('Kandidaturen')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/DetektivConan-Wiki:Beförderungen"; a.appendChild(document.createTextNode('Beförderungen')); li.appendChild(a); li.appendChild(document.createElement('br')); var a = document.createElement('a'); a.href = "/wiki/Benutzer:Ricardo02/Test"; a.appendChild(document.createTextNode('Testseite')); li.appendChild(a); ul.appendChild(li); divi.appendChild(ul); div.appendChild(divi); document.getElementById('column-one').insertBefore(div,document.getElementById('p-Navigation')); } addOnloadHook(addFastLinks);