User:Lustiger seth/global.js
Appearance
From Meta, a Wikimedia project coordination wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Note: After publishing, 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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// copied from http://de.wikipedia.org/wiki/Benutzer:Olliminatore/monobook.js and modified functionimportPage(page,proj,lang,script_path){// all languages support ns='User:';// canonical name, works in all mediawikis if(!proj)proj='wikipedia'; if(!lang)lang=wgContentLanguage; if(!script_path)script_path=wgScriptPath;// e.g. "/w" if(typeof(mw)!=="undefined" &&typeof(mw.config)!=="undefined" &&mw.config.get('wgServer').indexOf('https://')===0 ){ script_path='/wikipedia/'+lang+script_path; lang='secure'; proj='wikimedia'; } page='//'+lang+'.'+proj+'.org'+script_path+'/index.php?title='+ns+page+ '&action=raw&ctype=text/javascript&smaxage=2678400'; returnmw.loader.load(page); } // == talk pages == // for signing unsigned posts importPage('lustiger_seth/unsigned.js','wikipedia','de','/w'); // clean talk pages importPage('lustiger_seth/clean_talk_page.js','wikipedia','de','/w'); // == sections == // edit section 0 importPage('lustiger_seth/editsection0.js','wikipedia','de','/w'); // section jumpers (needs fixes since 2022-12) //importPage('lustiger_seth/section_jumpers.js', 'wikipedia', 'de', '/w'); // == menu modifications == // modifications of the left hand sidebar menu importPage('lustiger_seth/left_menu_adaptions.js','wikipedia','de','/w'); // modifications of the top toolbar menu importPage('lustiger_seth/toolbar_adaptions.js','wikipedia','de','/w'); // == adding information == // change bg-color of edit-tab depending on protection state of page importPage('Jogo.obb/js/sperrstatus.js','wikipedia','de','/w'); // diff view: install [[w:en:user:Cacycle/wikEdDiff]] enhanced diff view using ajax importPage('Cacycle/wikEdDiff.js','wikipedia','en','/w'); // == logs == // convert log lists to tables importPage('lustiger_seth/list2table.js','wikipedia','de','/w'); // convert unlinked internal URLs in logs to linked URLS importPage('lustiger_seth/links_in_logs.js','wikipedia','de','/w'); // change table of [[special:PendingChanges]]: move last col to first importPage('lustiger_seth/mod_pending_changes.js','wikipedia','de','/w'); // == admin functions == importPage('lustiger_seth/admin_stuff.js','wikipedia','de','/w'); // export pages, see https://de.wikipedia.org/wiki/Wikipedia:Importwünsche/Versionsimport //importPage('Brackenheim/export.js', 'wikipedia', 'de', '/w'); // == non-important stuff == // replace "Benutzer" with "user:" in titles ;-p importPage('lustiger_seth/canonical_title.js','wikipedia','de','/w'); // remove spam addon // importPage('Mike.lifeguard/removeSpam.js', 'wikimedia', 'meta', '/w'); // check whether srf url is geoblocked (does not work, because of CORS) //importPage('lustiger_seth/check_geoblocked.js', 'wikipedia', 'de', '/w'); // show maintenance categories in watchlist if(typeofmw.libs.watchCategories!=="object"||!mw.libs.watchCategories){ mw.libs.watchCategories={}; } mw.libs.watchCategories.cats=[ "Wikipedia:Schnelllöschen", //"Benutzer:Statische_IP_(ungeschützt)", "Benutzer:Sperrprüfung" ]; importPage('PerfektesChaos/js/watchCategories/r.js','wikipedia','en','/w'); /* ================================================================================ * source: https://www.mediawiki.org/wiki/MediaWiki:Gadget-vector-headanchor.js * last sync: 2022年02月13日 */ /*! * Vector HeadAnchors gadget, from <https://mediawiki.org/wiki/MediaWiki:Gadget-vector-headanchor.js> * * Copyright 2013-2020 Timo Tijhof * @license MIT <https://opensource.org/licenses/MIT> */ mw.hook('wikipage.content').add(function($content){ $content.find('span.mw-headline').each(function(i,el){ varheading=el.parentNode; if(!el.id||heading.querySelector('.tpl-vheadanchor')){ // No anchor possible, or anchor already inserted return; } heading.classList.add('tpl-vheadanchor-heading'); // Insert anchor. anchor=document.createElement('a'); anchor.href='#'+el.id; anchor.textContent='#'; anchor.title='Link to this section'; anchor.className='tpl-vheadanchor'; heading.insertBefore(anchor,el.nextSibling); }); }); /* ================================================================================ */