User:Pvpby/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:RecentChangesMultiple/code.2.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:GlobalNavButtons.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:LinkPreview/code.js',    ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AddSideTool.js',    ] });

//добавить инструмент mw.hook('dev.addSideTool').add(function (addSideTool) { const sideTool = addSideTool('A'),    $button = sideTool.$button,    $tooltip = sideTool.$tooltip;

$tooltip.text('Click me!'); $button.on('click', function {   alert('hello, world');  }); });

//предпросмотр ссылки window.pPreview = $.extend(true, window.pPreview, {RegExp: (window.pPreview || {}).RegExp || {} }); window.pPreview.defimage = 'https://vignette.wikia.nocookie.net/borderlands/images/0/05/Ajax.gif/revision/latest/scale-to-width-down/350?cb=20170626182120&path-prefix=ru'; window.pPreview.noimage = 'https://vignette.wikia.nocookie.net/borderlands/images/f/f5/%D0%97%D0%B0%D0%B3%D0%BB%D1%83%D1%88%D0%BA%D0%B0.png/revision/latest/scale-to-width-down/200?cb=20160122074659&path-prefix=ru'; window.pPreview.tlen = 1000; window.pPreview.RegExp.iparents = ['.myclass', '#myid', 'div[data-ignore-me=1]'];

// глобальное свое меню window.globalNavButtons = [ {		text: 'fancent', url: 'https://fandom.com/fancentral/home', isMain: false, whoIsMain: false, shortName: '', icon: ' <path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M10.1919 3.81674C12.4627 2.01428 15.3046 1 18.2785 1H22.0312C22.5835 1 23.0314 1.44772 23.0314 2L23.0312 2.01776V5.75286C23.0312 8.72653 22.0171 11.5682 20.2149 13.8389L21.0104 17.8161C21.0759 18.1439 20.9733 18.4829 20.7369 18.7193L16.7338 22.7223C16.473 22.9831 16.0899 23.0792 15.7369 22.9723C15.384 22.8655 15.1185 22.573 15.0461 22.2114L14.3277 18.6192L13.5924 19.1345C13.4479 19.2425 13.2724 19.3127 13.0794 19.3291C12.8628 19.3476 12.6564 19.2955 12.4829 19.192C12.4055 19.1461 12.3336 19.0891 12.2696 19.0217C12.1797 18.9272 12.1078 18.8147 12.06 18.6896C12.0236 18.5945 12.0025 18.4957 11.9963 18.3967C11.698 15.0187 8.9947 12.3218 5.61395 12.0336C5.35417 12.0114 5.12608 11.8918 4.96259 11.7138C4.914 11.661 4.87187 11.6038 4.83641 11.5434C4.67563 11.2692 4.65214 10.928 4.78531 10.6299C4.81249 10.5689 4.84554 10.5113 4.88368 10.4578L5.4119 9.704L1.81991 8.9856C1.45827 8.91328 1.1658 8.64778 1.05893 8.29481C0.95206 7.94183 1.04814 7.55869 1.30892 7.29791L5.31197 3.29486C5.54839 3.05844 5.88733 2.95582 6.21519 3.02139L10.1919 3.81674ZM11.2142 5.56355C13.1699 3.92646 15.6632 3 18.2785 3H21.0312V5.75286C21.0312 8.36883 20.1044 10.8626 18.4666 12.8185C18.4051 12.8745 18.3509 12.9378 18.3052 13.0069C17.7283 13.665 17.0687 14.2584 16.3351 14.7703L13.6989 16.6176C12.8573 13.5736 10.4576 11.1741 7.41358 10.3326L9.25997 7.69779L9.26111 7.69617C9.77253 6.96328 10.3653 6.30423 11.0227 5.72767C11.0929 5.68137 11.1574 5.62626 11.2142 5.56355ZM8.43401 5.50476L6.34775 5.08751L4.04437 7.39089L6.66549 7.91511L7.62096 6.55165C7.87531 6.18722 8.14716 5.83751 8.43401 5.50476ZM17.4804 16.4099C17.845 16.1554 18.1941 15.884 18.5269 15.597L18.9442 17.6835L16.6409 19.9869L16.1166 17.3656L17.4804 16.4099Z"> <path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M1.9741 23.0613C4.23401 23.1177 7.23267 22.8381 8.68191 21.3889C10.3428 19.728 10.3428 17.0353 8.68191 15.3744C7.02107 13.7136 4.32831 13.7136 2.66747 15.3744C1.2242 16.8177 0.964618 19.8686 1.0036 22.0821C1.01303 22.6174 1.43892 23.048 1.9741 23.0613ZM5.23768 20.8289C6.30167 20.615 6.95406 20.2883 7.2677 19.9746C8.14749 19.0948 8.14749 17.6684 7.2677 16.7886C6.3879 15.9088 4.96147 15.9088 4.08168 16.7886C3.77942 17.0909 3.45534 17.7435 3.24194 18.8262C3.10182 19.5371 3.03277 20.3111 3.00942 21.0611C3.76285 21.0403 4.53315 20.9706 5.23768 20.8289Z"> ', hasBackground: false },	{		text: 'ВИКИ', url: '', isMain: true, whoIsMain: false, shortName: 'wiki', icon: '<path d="M2.499 3.042c-.645.111-1.105.356-1.603.854-.4.4-.6.717-.771 1.217L.02 5.42v11.16l.105.307c.171.5.371.817.771 1.217.401.4.718.601 1.217.771l.307.104 3.02.02c2.843.02 3.028.025 3.16.095.077.041.752.683 1.5 1.426.902.896 1.42 1.381 1.537 1.44a.8.8 0 0 0 .726 0c.117-.059.638-.548 1.537-1.44.748-.743 1.423-1.384 1.5-1.425.132-.071.31-.076 3.16-.096l3.02-.02.307-.104c.499-.17.816-.371 1.217-.771.4-.4.6-.717.771-1.217l.105-.307V5.42l-.105-.307c-.17-.5-.371-.817-.771-1.217-.418-.419-.781-.64-1.282-.784L21.5 3.02h-6.2l-.299.094c-.69.217-.87.349-2.031 1.501l-.97.961-.97-.961c-1.15-1.14-1.323-1.27-2.01-1.5l-.28-.094-3.02-.007c-1.661-.003-3.111.009-3.221.028M8.6 5.094c.077.041.648.58 1.27 1.2L11 7.419v11.154l-.47-.459c-.628-.612-.907-.797-1.51-.998l-.28-.094-3-.021c-3.325-.023-3.144-.008-3.427-.29a1.375 1.375 0 0 1-.216-.295c-.075-.151-.077-.305-.088-5.316-.008-3.551.002-5.214.031-5.333.083-.339.356-.625.686-.722.083-.024 1.203-.036 2.934-.032 2.638.007 2.808.011 2.94.081m12.816.003c.199.099.388.288.487.487.075.152.077.294.077 5.416 0 5.122-.002 5.264-.077 5.416-.043.086-.14.219-.216.295-.282.282-.105.267-3.407.291-3.305.025-3.133.011-3.745.302-.352.166-.591.352-1.125.87l-.41.398V7.418l1.152-1.149a53.568 53.568 0 0 1 1.17-1.15c.01 0 .09-.026.178-.058.135-.05.594-.057 2.96-.05 2.679.009 2.807.012 2.956.086M4.614 8.057a.814.814 0 0 0-.505.396c-.074.139-.089.231-.089.547 0 .331.013.403.1.558.11.197.294.34.515.401.087.024.835.041 1.865.041s1.778-.017 1.865-.041a.842.842 0 0 0 .515-.401c.087-.156.1-.226.099-.558-.001-.313-.017-.409-.089-.547-.104-.197-.267-.322-.519-.398-.257-.077-3.509-.075-3.757.002m11 0a.814.814 0 0 0-.505.396c-.074.139-.089.231-.089.547 0 .331.013.403.1.558.11.197.294.34.515.401.087.024.835.041 1.865.041s1.778-.017 1.865-.041a.842.842 0 0 0 .515-.401c.087-.156.1-.226.099-.558-.001-.313-.017-.409-.089-.547-.104-.197-.267-.322-.519-.398-.257-.077-3.509-.075-3.757.002m0 4a.814.814 0 0 0-.505.396c-.074.139-.089.231-.089.547 0 .331.013.403.1.558.11.197.294.34.515.401.087.024.835.041 1.865.041s1.778-.017 1.865-.041a.842.842 0 0 0 .515-.401c.087-.156.1-.226.099-.558-.001-.313-.017-.409-.089-.547-.104-.197-.267-.322-.519-.398-.257-.077-3.509-.075-3.757.002"> ', hasBackground: false },	{		text: 'Исследуйте вики', url: 'https://www.fandom.com/explore-ru?uselang=ru', isMain: false, whoIsMain: 'wiki', shortName: '' },	{		text: 'Вики Сообщества', url: 'https://community.fandom.com/ru/', isMain: false, whoIsMain: 'wiki', shortName: '' },	{		text: 'Tools', url: '', isMain: true, whoIsMain: false, shortName: 'Tools', icon: '', hasBackground: false },	{		text: 'Local JS', url: mw.util.getUrl('User:Pvpby/common.js'), isMain: false, whoIsMain: 'Tools', shortName: '' },	{		text: 'Global JS', url: 'https://community.fandom.com/wiki/Special:MyPage/global.js', isMain: false, whoIsMain: 'Tools', shortName: '' },	{		text: 'Local CSS', url: mw.util.getUrl('User:Pvpby/common.css'), isMain: false, whoIsMain: 'Tools', shortName: '' },	{		text: 'Global CSS', url: 'https://community.fandom.com/wiki/Special:MyPage/global.css', isMain: false, whoIsMain: 'Tools', shortName: '' },	{		text: 'Staff', url: '', isMain: true, whoIsMain: false, shortName: 'Staff', icon:'', hasBackground: true },	{		text: 'Theme Designer', url: mw.util.getUrl('Special:ThemeDesigner'), isMain: false, whoIsMain: 'Staff', shortName: 'TD' },       {		text: 'Recent Changes', url: mw.util.getUrl('Special:RecentChanges'), isMain: false, whoIsMain: 'Staff', shortName: 'RC', }, ];