User:Kofirs2634/common.js

// Bookmarks' config window.bookmarks = []; window.bookmarks[0] = { text: 'Edit Random Page', href: 'https://glitchtale.fandom.com/wiki/Special:Random?action=edit' }; window.bookmarks[1] = { text: 'Slender\'s Wall', href: 'https://glitchtale.fandom.com/wiki/Message_Wall:MasterSlenderTR' } window.bookmarks[2] = { text: 'GTW CSS', href: 'https://glitchtale.fandom.com/wiki/MediaWiki:Common.css' } window.bookmarks[3] = { text: 'Ru Glitchtale Wiki', href: 'https://glitchtale.fandom.com/ru/wiki/Special:WikiActivity' } // Bookmarks by Kofirs2634 $(function ($) {   if (window.BookmarksLoaded) {        return    };    window.BookmarksLoaded = true;    rawbookmarks = [];    for (i = 0; i < window.bookmarks.length; i++) {        rawbookmarks[i] = window.bookmarks[i] || { text: , href:  }    }    $('.wds-global-navigation__links').append(' Bookmarks         '); for (i = 0; i < rawbookmarks.length; i++) { if (rawbookmarks[i].text && rawbookmarks[i].href) { $('#bookmarks-list').append($('').append($('', {               text: rawbookmarks[i].text,                href: rawbookmarks[i].href            }))) }       else { console.warn('There aren\'t any properties for bookmark №' + i) } } });

// SourceCode Button by Kofirs2634 $(function ($) {   var forbiddenNs = [-1, 1, 6, 12];    if (window.SCBLoaded) {        return    }    window.SCBLoaded = true;    var mwdata = mw.config.get(['wgContentLanguage', 'wgPageName', 'wgNamespaceNumber']);    for (i = 0; i < forbiddenNs.length; i++) {        if (mwdata.wgNamespaceNumber != forbiddenNs[i]) {            $('.page-header__contribution-buttons .wds-dropdown__content .wds-list.wds-is-linked').append($('').append($('', { text: 'Source code', href: '/' + mwdata.wgContentLanguage + '/wiki/' + mwdata.wgPageName + '?action=raw', 'id': 'view-wt' })));           return        } else { return }    } })