No edit summary |
No edit summary |
||
Line 88: | Line 88: | ||
"speedTip": "Sig", |
"speedTip": "Sig", |
||
"tagOpen": "{{Rocketslime_1_1 Sig|", |
"tagOpen": "{{Rocketslime_1_1 Sig|", |
||
− | "tagClose": "| |
+ | "tagClose": "|<nowiki>~~~</nowiki>}}", |
"sampleText": "Insert text"}; |
"sampleText": "Insert text"}; |
||
} |
} |
Revision as of 19:08, 14 December 2013
importArticles({
type: 'script',
articles: [
'u:dev:PortableCSSPad/code.js',
'u:dev:FileUsageAuto-update/code.js',
'u:dev:OldFilePages/code.js'
]
});
importScriptPage('AjaxRC/code.js', 'dev');
var ajaxRefresh = 10000;
importArticles({
type: "script",
articles: [
"u:dev:ListFiles/code.js",
"w:c:dev:ReferencePopups/code.js",
]
});
importArticle({ type: 'script', article: 'w:c:pecoes:Demo2.js' });
// http://railgunscript.wikia.com/wiki/MediaWiki:RailgunClient.js
importScriptPage('MediaWiki:RailgunClient.min.js','railgunscript');
/* add a button that increases the content size and hides the rail */
function CreateContentResizeButton() {
var headerWidth = $('header#WikiaPageHeader.WikiaPageHeader details').width();
var contentWidth = $('article#WikiaMainContent.WikiaMainContent').width();
var catlinksWidth = $('div#catlinks.catlinks').width();
if(contentWidth < 1000) {
$('section article header ul.wikia-menu-button').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Volle Artikelbreite zur besseren Darstellung der Tabellen."> + </a></ul>');
$('section article header a.wikia-button').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> + </a></ul>');
$('section article header a.view-source').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> + </a></ul>');
if(wgCanonicalNamespace == 'User_blog') {
$('section article div#WikiaUserPagesHeader a.wikia-button').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> + </a></ul>');
}
}
}
addOnloadHook(CreateContentResizeButton);
function ExpandContent(headerWidth, contentWidth, catlinksWidth) {
$('header#WikiaPageHeader.WikiaPageHeader details').css({"width": '980px'});
$('article#WikiaMainContent.WikiaMainContent').css({"width": '1000px'});
$('div#catlinks.catlinks').css({"width": '1000px'});
$('div#WikiaRail.WikiaRail').css({"display": 'none'});
$('ul#resizeButton').replaceWith('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="CompressContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Compress the content area back to its original width, and restore the side rail."> >--< </a></ul>');
}
function CompressContent(headerWidth, contentWidth, catlinksWidth) {
$('header#WikiaPageHeader.WikiaPageHeader details').css({"width": headerWidth});
$('article#WikiaMainContent.WikiaMainContent').css({"width": contentWidth});
$('div#catlinks.catlinks').css({"width": catlinksWidth});
$('div#WikiaRail.WikiaRail').css({"display": 'block'});
$('ul#resizeButton').replaceWith('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> + </a></ul>');
}
/* End */
importScriptPage('User:Monchoman45/ChatHacks.js', 'c');
/* Quick Unused Image clean code */
/*
importScriptPage( 'FastDelete/code.js', 'dev' );
var fdButtons = [];
fdButtons[fdButtons.length] = {
'summary': 'Unused Image',
'label': 'Unused'
};
*/
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png",
"speedTip": "Redirect",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": "Insert text"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nintendo/en/images/3/36/Button_Link.png",
"speedTip": "Link",
"tagOpen": "[[",
"tagClose": "]]",
"sampleText": "Insert text"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/nintendo/en/images/3/36/Button_Link.png",
"speedTip": "Sig",
"tagOpen": "{{Rocketslime_1_1 Sig|",
"tagClose": "|<nowiki>~~~</nowiki>}}",
"sampleText": "Insert text"};
}