mNo edit summary |
No edit summary |
||
(548 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | $('.WikiHeader').append('<span class="button" data-type="1"><a href="Special:RecentChanges"></a></span>'); |
||
− | |||
− | window.AdvancedOasisUI = { |
||
− | accountNavFollowedPages: false, |
||
− | accountNavWatchlist: false, |
||
− | categoryRedlink: true, |
||
− | RCHeader: false, |
||
− | DefaultSourceMode: true, |
||
− | lightbox: false, |
||
− | randomPageLimitedTo: 'Help', |
||
− | activity2RC: false, |
||
− | userLang: true, |
||
− | }; |
||
− | |||
− | var qtUserPageTemplate = '<div style="color:black;">{{:w:User:AmonFatalis}}</div>'; |
||
− | var qtEnableUserPageOverwrite = true; |
||
− | |||
− | var qtMessageWallGreetingTemplate = '{{w:User:AmonFatalis/MessageWallGreeting}}'; |
||
− | var qtEnableMessageWallGreetingOverwrite = true; |
||
− | |||
− | // AutoEditDropdown config |
||
− | window.AutoEditDropdownConfig = { |
||
− | expandedAreaContribute: true, |
||
− | expandedAreaEdit: true |
||
− | }; |
||
− | |||
importArticles({ |
importArticles({ |
||
− | type: |
+ | type: "script", |
articles: [ |
articles: [ |
||
− | + | 'u:dev:MediaWiki:UCXSearchBar.js', |
|
− | + | 'u:dev:MediaWiki:AnchoredRollback/code.js', |
|
− | + | 'u:dev:MediaWiki:AllPagesHideRedirect/code.js', |
|
− | + | 'u:dev:MediaWiki:RecentChangesMultiple/code.2.js', |
|
− | + | 'u:dev:MediaWiki:RedirectManagement/code.js', |
|
− | + | 'u:dev:MediaWiki:MultiUpload.js', |
|
− | + | 'u:dev:MediaWiki:AjaxEditPreview.js' |
|
− | 'u:dev:QuickCreateMessageWallGreeting/code.js', |
||
− | 'u:dev:AjaxRename/code.js', |
||
− | 'u:dev:AdvancedOasisUI/code.js', |
||
− | 'w:c:community:User:Monchoman45/ChatHacks.js' |
||
] |
] |
||
}); |
}); |
||
+ | //Quickbar and My Tools |
||
− | |||
⚫ | |||
− | /*jshint browser:true, jquery:true*/ |
||
+ | var c = mw.config.get([ 'wgPageName', 'wgScriptPath', 'wgCityId', 'wgSiteName' ]); |
||
− | /*global mediaWiki*/ |
||
+ | //Add links to My Tools |
||
− | |||
+ | $('<li><a href="' + c.wgScriptPath + '/wiki/Special:DoubleRedirects">DoubleRedirects</a></li>' + |
||
⚫ | |||
+ | '<li><a href="https://community.fandom.com/wiki/Special:MyPage/global.js">Global.js</a></li>' + |
||
− | |||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:ListGroupRights">ListGroupRights</a></li>' + |
||
− | 'use strict'; |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:Log/rights">Log/rights</a></li>' + |
||
− | |||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:ListUsers">ListUsers</a></li>' + |
||
− | var nsNr = mw.config.get( 'wgNamespaceNumber' ), |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:ListAdmins">ListAdmins</a></li>' + |
||
− | translations = { |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:WhatLinksHere/' + c.wgPageName + '">WhatLinksHere</a></li>').insertBefore('.WikiaBarWrapper .tools-menu li:first'); |
||
− | en: 'Refresh', |
||
+ | $('div.wiki-tools.wds-button-group > div > div.wds-dropdown__content.wds-is-not-scrollable.wds-is-right-aligned > ul').prepend |
||
− | es: 'Actualizar', |
||
+ | ('<li><a href="' + c.wgScriptPath + '/wiki/Special:Statistics">Statistics</a></li>' + |
||
− | de: 'Neu laden', |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:ImportJS">MediaWiki:ImportJS</a></li>' + |
||
− | fr: 'Actualiser', |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:JSPages">JSPages</a></li>' + |
||
− | hu: 'Frissítés', |
||
+ | //'<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Fandomdesktop.js">MediaWiki:Fandomdesktop.js</a></li>' + |
||
− | nl: 'Herladen', |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Fandomdesktop.css?action=edit">MediaWiki:Fandomdesktop.css?action=edit</a></li>' + |
||
− | pl: 'Odśwież', |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Wiki-navigation?action=edit">MediaWiki:Wiki-navigation?action=edit</a></li>' + |
||
− | ru: 'Обновить' |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Recentchangestext?action=history">MediaWiki:Recentchangestext?action=history</a></li>' + |
||
− | }, |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:Announcements">Announcement</a></li>'); |
||
− | theText = (typeof window.PurgeButtonText === 'string' && window.PurgeButtonText) || |
||
+ | //Additions to Quickbar |
||
− | translations[mw.config.get('wgContentLanguage')] || translations.en; |
||
+ | $('.tools').append('<li><a href="' + c.wgScriptPath + '/wiki/Special:PrefixIndex">Index</a></li>' + |
||
− | |||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:LongPages">Long</a></li>' + |
||
− | if ( nsNr < 0 || window.PurgeButtonsLoaded || document.getElementById( 'control_purge' ) ) { |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:ShortPages">Short</a></li>' + |
||
− | return; |
||
+ | '<li><a href="' + c.wgScriptPath + '/wiki/Special:Random">Random page</a></li>'); |
||
− | } |
||
⚫ | |||
− | |||
− | window.PurgeButtonsLoaded = true; // prevent duplicate running (but not dupe buttons from outside this code) |
||
− | |||
− | $( addPurgeButton ); |
||
− | |||
− | function purgePage () { |
||
− | var page = encodeURIComponent( mw.config.get( 'wgPageName' ) ); |
||
− | $.get( '/index.php?title=' + page + '&action=purge', function () { |
||
− | location.reload( true ); |
||
− | } ); |
||
− | $('html,body').css( { |
||
− | display: 'block', |
||
− | overflow: 'hidden' |
||
− | } ); |
||
− | $( '<div style="background: url(\'/skins/common/images/ajax.gif\') no-repeat fixed center center white;height: 100%;left: 0;opacity: 0.25;position: absolute;top: 0;width: 100%;z-index: 1000000000;"></div>' ).appendTo( document.body ) |
||
− | .css( 'height', $( window ).height() ); |
||
− | } |
||
− | |||
− | function addOasisPurgeButton () { |
||
− | var selector; |
||
− | switch (nsNr) { |
||
− | case 500: |
||
− | case 502: |
||
− | selector = $( '#WikiaUserPagesHeader' ); |
||
− | break; |
||
− | case 2: |
||
− | case 3: |
||
− | selector = $( '.UserProfileActionButton' ); |
||
− | if ( selector.length ) break; |
||
− | default: |
||
− | selector = $( '#WikiaPageHeader' ); |
||
− | } |
||
− | selector.find('.wikia-menu-button').first().find('ul') |
||
− | .append('<li><a id="purge" href="javascript:void(0)" title="Purge page">'+ theText + '</a></li>'); |
||
− | } |
||
− | |||
− | function addPurgeButton () { |
||
− | switch( mw.config.get( 'skin' ) ) { |
||
− | |||
− | case 'uncyclopedia': /* monobook clone, pass to monobook */ |
||
− | case 'wowwiki': /* monobook clone, pass to monobook */ |
||
− | case 'lostbook': /* monobook clone, pass to monobook */ |
||
− | case 'monobook': |
||
− | $('#p-cactions > .pBody > ul').append('<li id="ca-purge"><a id="purge" href="javascript:void(0)" title="Purge page">'+ theText + '</a></li>'); |
||
− | break; |
||
− | |||
− | case 'oasis': |
||
− | case 'wikia': |
||
− | addOasisPurgeButton(); |
||
− | break; |
||
− | } |
||
− | |||
− | $( '#purge' ).click( purgePage ); |
||
− | } |
||
⚫ | |||
− | |||
− | $('.wikia-header-mask').prepend('<li><a class="button" title="Special:Random/Help" href="/wiki/Special:Random/Help">Hilfe</a></li>'); |
Latest revision as of 06:00, 1 September 2022
importArticles({
type: "script",
articles: [
'u:dev:MediaWiki:UCXSearchBar.js',
'u:dev:MediaWiki:AnchoredRollback/code.js',
'u:dev:MediaWiki:AllPagesHideRedirect/code.js',
'u:dev:MediaWiki:RecentChangesMultiple/code.2.js',
'u:dev:MediaWiki:RedirectManagement/code.js',
'u:dev:MediaWiki:MultiUpload.js',
'u:dev:MediaWiki:AjaxEditPreview.js'
]
});
//Quickbar and My Tools
$(function() {
var c = mw.config.get([ 'wgPageName', 'wgScriptPath', 'wgCityId', 'wgSiteName' ]);
//Add links to My Tools
$('<li><a href="' + c.wgScriptPath + '/wiki/Special:DoubleRedirects">DoubleRedirects</a></li>' +
'<li><a href="https://community.fandom.com/wiki/Special:MyPage/global.js">Global.js</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:ListGroupRights">ListGroupRights</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:Log/rights">Log/rights</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:ListUsers">ListUsers</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:ListAdmins">ListAdmins</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:WhatLinksHere/' + c.wgPageName + '">WhatLinksHere</a></li>').insertBefore('.WikiaBarWrapper .tools-menu li:first');
$('div.wiki-tools.wds-button-group > div > div.wds-dropdown__content.wds-is-not-scrollable.wds-is-right-aligned > ul').prepend
('<li><a href="' + c.wgScriptPath + '/wiki/Special:Statistics">Statistics</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:ImportJS">MediaWiki:ImportJS</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:JSPages">JSPages</a></li>' +
//'<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Fandomdesktop.js">MediaWiki:Fandomdesktop.js</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Fandomdesktop.css?action=edit">MediaWiki:Fandomdesktop.css?action=edit</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Wiki-navigation?action=edit">MediaWiki:Wiki-navigation?action=edit</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/MediaWiki:Recentchangestext?action=history">MediaWiki:Recentchangestext?action=history</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:Announcements">Announcement</a></li>');
//Additions to Quickbar
$('.tools').append('<li><a href="' + c.wgScriptPath + '/wiki/Special:PrefixIndex">Index</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:LongPages">Long</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:ShortPages">Short</a></li>' +
'<li><a href="' + c.wgScriptPath + '/wiki/Special:Random">Random page</a></li>');
}) (this.jQuery, this.mediaWiki);