Cookies helfen uns bei der Bereitstellung von KiwiThek. Durch die Nutzung von KiwiThek erklärst du dich damit einverstanden, dass wir Cookies speichern. Weitere Informationen

Änderungen

Wechseln zu: Navigation, Suche

MediaWiki:Common.js

5.221 Bytes entfernt, 20 März
keine Bearbeitungszusammenfassung
/* Das folgende JavaScript wird für alle Benutzer geladen. */  /** Extra toolbar options ****************************************************** * * DescriptionMediaWiki: Adds extra buttons to the editing toolbar. * * To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobookCommon.js]]. * * Maintainers: [[User:MarkS]], [[User:Voice of All]], [[User:R. Koot]]
*/
// remove empty p-Tags & hide p-Tags only containing br-Tagsif $content = jQuery( '#content' );$content.remove( 'p:empty' );$content.find( 'p > br' ).each( function (mwCustomEditButtonsi, e ) { $br = jQuery( e ); if ( mwCustomEditButtons $br.pushsiblings({).length === 0 && "imageFile": "http://upload $br.parent().wikimediatext().org/wikipedia/en/1/13/Button_entertrim().png",length === 0 "speedTip": "Zeilenumbruch", ) { "tagOpen": "< $br />", "tagClose": "",.parent().hide() "sampleText": "" } });
// set language code
var languageCode = "de";
var urlParameterDeEasy = "einfach";
if ( window.location.href.indexOf( urlParameterDeEasy ) > -1 ) {
languageCode = "de-easy";
}
jQuery( '#mw-content-text' ).attr( 'lang', languageCode );
jQuery( 'body' ).attr( 'lang', languageCode );
mwCustomEditButtons.push({ "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.png",increase body height to match sidebar height "speedTip": "Bildergalerie einfügen", "tagOpen": "\n<gallery>\n", "tagClose": "\n</gallery>", "sampleText": "Image:Examplevar sidebarHeight = jQuery( '#mw-panel' ).jpg|Caption1\nImage:Example.jpg|Caption2" }outerHeight(); mwCustomEditButtons.pushvar bodyHeight = jQuery({ "imageFile": "http://upload'body.wikimediamediawiki' ).org/wikipedia/en/6/60/Button_insert_table.png",outerHeight(); "speedTip": "Tabelle if (3x3sidebarHeight > bodyHeight ) einfügen",{ "tagOpen": jQuery( '#footer'{| class="wikitable"\n|).css( ', "tagClose": "\n|}", "sampleText": "margin-\n! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1bottom', cell 3\n|sidebarHeight -\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3" }bodyHeight );} else { mwCustomEditButtons.push jQuery({ "imageFile": "skins/common/images/button_link.png", "speedTip": "Interner Link", "tagOpen": '<div class="intern">[[#mw-panel', "tagClose": "]]</div>", "sampleText": "Hier steht der interne Link" });  mwCustomEditButtons.pushheight( jQuery({ "imageFile": "images/Button_Farbe.PNG", "speedTip": "Farbe1", "tagOpen": '<span class="farbe1">body',).height() ) "tagClose": "</span>", "sampleText": "Hier steht der eingefärbte Text" });
mwCustomEditButtons// replace registration linkjQuery( '#pt-createaccount' ) .pushattr( 'id', 'pt-gettingstarted' );jQuery({'#pt-gettingstarted a' ) "imageFile": "images .attr( 'href', '/Ankerindex.png", "speedTip"php/Kiwithek: "Top Anker",Getting_Started' ) "tagOpen": .attr( '<div class="imagelink_anker">[[#top|&nbsp;]]</div>title', "tagClose": ""'Lies nach,wie du mit uns in Kontakt treten kannst um an der KiwiThek mitzuarbeiten.' ) "sampleText": "" } .text( 'Getting Started' );
mwCustomEditButtons.push({ "imageFile": "images/2SpaltenLayout.png",/ insert Bildinformationen template into uploaded file page "speedTip": "2SpaltenLayout", "tagOpen": var template = '{{2SpaltenLayoutBildinformationen\n' + '|TextBeschreibung =Bitte bearbeite mich und fülle die Bildinfos aus!\n' + '|BilderUrheber =\n',+ "tagClose": "}", '| Herausgeber =\n' + "sampleText": "}" });} //fix edit summary prompt for undo//this code fixes the fact that the undo function combined with the "no edit summary prompter" causes problems if leaving the//edit summary unchanged//this was added by [[User:Deskana]], code by [[User:Tra]]//see bug 8912addOnloadHook(function () { if (document.location.search.indexOf("undo '| QuelleText =") != -1\n' + && document.getElementsByName( 'wpAutoSummary| QuelleUrl =\n')[0]) {+ document.getElementsByName( 'wpAutoSummary')[0].value| LizenzText =\n'1+ '; }}) /** Edittools javascript loader ************************************************ * * Description: Pulls in [[MediaWiki:Edittools.js]]. Includes a cache-bypassing * version number in the URL in order to allow any changes to the edittools to * be rapidly deployed to users. * * Note that, by default, this function does nothing unless the element with * the ID "editpage-specialchars" (which contains the old edittools code in * [[MediaWiki:Edittools]], and will be retained as a placeholder in the new * implementation) has a class named "edittools-version-NNN", where NNN is a * number. If the class name has "test" before the number, the code will only * run for users who have set "window.testJsEdittools | LizenzUrl = true" in their user JS.\n' + * The "test" should be retained in the class name until the new edittools * implementation is ready and fully tested, and until at least 30 days have * passed since this loader stub was added (which will be in 27 June 2008). * * For compatibility with Alex Smotrov 's original implementation, on which this * code is loosely based (see [[mw:User talk:Alex Smotrov/edittools.js]]), this * loader can also be disabled by setting "window.noDefaultEdittools | Originaltitel = true".\n' + * * Maintainers: [[User:Ilmari Karonen]] */ addOnloadHook(function () { // needs to be deferred until the DOM has fully loaded var placeholder '| Bearbeitung = document.getElementById("editpage-specialchars");\n' + if (!placeholder | '| window.noDefaultEdittools) return; var match GeoLand = /(?:^| )edittools-version-(\dn' +)(?: '|$)/.exec(placeholder.className); // set window.testJsEdittools GeoRegion = true to enable testing before full deployment\n' + if (!match && window.testJsEdittools) match '| GeoGPSNorth = /(?:^| )edittools-version-(test\dn' +)(?: '|$)/.exec(placeholder.className); if (!match) return; var url GeoGPSEast = wgScript \n' + '?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache| Sonstiges =\n' + match[1]; importScriptURI '}}'jQuery(url'#wpUploadDescription' );}.val(template);
/** * * Modify Sidebar for special usergroups! * */ function ModifySidebar(action, section, name, link) { try { switch (section) { case "languages": var target = "p-lang"; break; case "toolbox": var target = "p-tb"; break; case "navigation"Badge:Page created by children var target = "p-navigation"; break; default: var target = "p-" + section; break; } if (action == "add") { var node hasCreatedByChildrenCategory = document.getElementById(target) .getElementsByTagNamejQuery('div#catlinks')[0] .getElementsByTagName('ul')[0]; var aNode = document.createElement text('a'); var liNode = document.createElement('li'); aNode.appendChild(document.createTextNode(name)); aNode.setAttribute indexOf('hrefSeiten von Schulteams', link); liNode.appendChild(aNode); liNode.className>='plainlinks';0 node.appendChild(liNode); } if (action == "remove"hasCreatedByChildrenCategory) { var list $pageByChildrenNode = document.getElementById(target) .getElementsByTagNamejQuery('<div')[0] .getElementsByTagName('ul')[0]; var listelements class= list.getElementsByTagName('li'); for (var i = 0; i "badge badge--children">< listelements.length; i++) { if (listelements[i].getElementsByTagName('a')[0].innerHTML img src== name || listelements[i].getElementsByTagName('a')[0].href == link) { list.removeChild(listelements[i]); } } } } catch(e) { // lets just ignore what's happened return; }} function CustomizeModificationsOfSidebar() { "/resources/removes [[Special:Specialsites]] from toolbox ModifySidebar("remove", "toolbox", "Spezialseiten", "assets/indexklassenseite_logo.php/Spezial:Spezialseitensvg");} function isObject(obj) { if (typeof obj =alt= "objectDiese Seite wurde von SchülerInnen erstellt" && obj !title= null) return true; else return false;} function isArray(obj) { if (isObject(obj)) { if (obj.constructor.toString().indexOf("ArrayDiese Seite wurde von SchülerInnen erstellt"></div>') == -1) return false; else return true; } else return false;} Array.prototype.Contains = function(element,strict) { for(i in this) { if(this[i] == element && !strict) return true; else if(this[i] === element) return true; } return false; }
if jQuery(isArray(wgUserGroups$pageByChildrenNode)) { if (!wgUserGroups.ContainsinsertAfter('sysop#firstHeading') && !wgUserGroups.Contains('bureaucrat') && !wgUserGroups.Contains('user') && !wgUserGroups.Contains('bot')) { addOnloadHook(CustomizeModificationsOfSidebar); }
}
jQuery('#footer-places-disclaimer').find('a') .attr('href', 'https://<lehrerweb.wien/source>footer-nav/impressum') .attr('target', '_blank')
1.858
Bearbeitungen

Navigationsmenü