User:Fngplg/global.js

window.BackToTopSpeed=500; window.BackToTopStart=1;

//window.pPreview = window.pPreview || {}; //window.pPreview.debug = true;

/*importArticles({   type: "style",    articles: ["u:dev:LinkPreview/code.css"] });*/ mw.loader.load('http://dev.wikia.com/index.php?title=MediaWiki:LinkPreview/code.js&action=raw&ctype=text/javascript'); (function(window, $, mw) {   'use strict';    var translations = {        en:         'Go to bottom'    },    buttonStart = typeof window.JumpToBottomStart === 'number' ?        window.JumpToBottomStart :        0,    scrollSpeed = typeof window.JumpToBottomSpeed === 'number' ?        window.JumpToBottomSpeed :        600,    fadeSwitch = typeof window.JumpToBottomFade === 'number' ?        window.JumpToBottomFade :        600,    theText = (typeof window.JumpToBottomText === 'string' && window.JumpToBottomText) ||    translations['en'] || translations.en;    if (window.JumpToBottomLoaded) { return }    window.JumpToBottomLoaded = true;    $(addJumpToBottom);    function hideFade {        $("#jumptobottom").hide;        $(window).scroll(function { if ($(this).scrollTop > buttonStart) { switch (fadeSwitch) { case 0: $('#jumptobottom').show; break; default: $('#jumptobottom').fadeIn; break; }           } else { switch (fadeSwitch) { case 0: $('#jumptobottom').hide; break; default: $('#jumptobottom').fadeOut; break; }           }        });    }    $('body').on('click', '#jumptobottom', function(ev) { console.log('jtb click ev:', ev); $('body,html').animate({           scrollTop: $('#mw-content-text').height            }, scrollSpeed); return false; });   function addJumpToBottom {        if (skin == 'oasis') {            $(' ', { id: 'jumptobottom', style: 'float: right; margin-top: -1px; border-right: none' })           .append( $(' ', {                   type: 'button',                    style: 'height: 20px;',                    text: theText                }) )           .appendTo('#WikiaBarWrapper .toolbar > .tools');            hideFade;        }    } }(this, jQuery, mediaWiki)); /*,{   type: "script", articles:["u:dev:LinkPreview/code.js"] });*/ //$.getScript('http://ru.borderlands.wikia.com/index.php?title=MediaWiki:Common.js/pagePreview.js&action=raw&ctype=text/javascript'); //mw.loader.load('http://ru.borderlands.wikia.com/index.php?title=MediaWiki:Common.js/pagePreview.js&action=raw&ctype=text/javascript'); //mw.loader.load('http://ru.borderlands.wikia.com/index.php?title=MediaWiki:Common.js/emo.js&action=raw&ctype=text/javascript'); //mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript'); //mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css'); /* importScriptPage('BackToTopButton/code.js', 'dev'); //console.log('global'); //switch code editor to classic mode /* importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:CodeEditorSwitch/code.js' ] });