|
|
| Строка 47: |
Строка 47: |
| $li.append( $link ); | | $li.append( $link ); |
| $portlet.append( $li ); | | $portlet.append( $li ); |
| }
| |
|
| |
| function injectStyles() {
| |
| var css = [
| |
| '/* ==== Таблицы: сортируемые, инфобоксы, навбоксы ==== */',
| |
| 'body.darkmode-vector2010 .sortable,',
| |
| 'body.darkmode-vector2010 .infobox,',
| |
| 'body.darkmode-vector2010 .navbox,',
| |
| 'body.darkmode-vector2010 .wikitable.plainrowheaders,',
| |
| 'body.darkmode-vector2010 .mw-datatable,',
| |
| 'body.darkmode-vector2010 .wikitable {',
| |
| ' background: #222 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .sortable th,',
| |
| 'body.darkmode-vector2010 .sortable td,',
| |
| 'body.darkmode-vector2010 .mw-datatable th,',
| |
| 'body.darkmode-vector2010 .mw-datatable td {',
| |
| ' background: #222 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .sortable tr:nth-child(even) td,',
| |
| 'body.darkmode-vector2010 .mw-datatable tr:nth-child(even) td {',
| |
| ' background: #1e1e1e !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .sortable tr:hover td,',
| |
| 'body.darkmode-vector2010 .mw-datatable tr:hover td {',
| |
| ' background: #2a2a2a !important;',
| |
| '}',
| |
| '/* Стрелки сортировки */',
| |
| 'body.darkmode-vector2010 .sortable .headerSort,',
| |
| 'body.darkmode-vector2010 .sortable th[role="columnheader"] {',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .sortable .headerSort:after,',
| |
| 'body.darkmode-vector2010 .sortable .headerSort:before {',
| |
| ' filter: invert(1) hue-rotate(180deg);',
| |
| '}',
| |
| '/* ==== Панель редактирования (toolbar) ==== */',
| |
| 'body.darkmode-vector2010 #toolbar,',
| |
| 'body.darkmode-vector2010 #editButtons,',
| |
| 'body.darkmode-vector2010 #wpTextbox1 + .editButtons,',
| |
| 'body.darkmode-vector2010 .editButtons,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .toolbar,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .section,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .group,',
| |
| 'body.darkmode-vector2010 .wikiEditor-ui-toolbar,',
| |
| 'body.darkmode-vector2010 .wikiEditor-toolbar {',
| |
| ' background: #2a2a2a !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tabs,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tab,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tabspan,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .current,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tab.current {',
| |
| ' background: #333 !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #6cb6ff !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tab.current,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .current {',
| |
| ' background: #2a2a2a !important;',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar a,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tool,',
| |
| 'body.darkmode-vector2010 .editButtons a {',
| |
| ' color: #d0d0d0 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar a:hover,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tool:hover {',
| |
| ' background: #3a3a3a !important;',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| '/* Иконки тулбара (спрайты) — инвертируем, чтобы не светили */',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .tool-icon,',
| |
| 'body.darkmode-vector2010 #wikiEditor-ui-toolbar .oo-ui-iconElement-icon,',
| |
| 'body.darkmode-vector2010 .editButtons img,',
| |
| 'body.darkmode-vector2010 #toolbar img {',
| |
| ' filter: invert(1) hue-rotate(180deg);',
| |
| '}',
| |
| '/* Поле ввода wikitext */',
| |
| 'body.darkmode-vector2010 #wpTextbox1,',
| |
| 'body.darkmode-vector2010 textarea#wpTextbox1,',
| |
| 'body.darkmode-vector2010 .wikiEditor-ui-text textarea,',
| |
| 'body.darkmode-vector2010 .ve-ce-surface,',
| |
| 'body.darkmode-vector2010 .ve-ce-documentNode {',
| |
| ' background: #1a1a1a !important;',
| |
| ' color: #e0e0e0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| '/* Кнопки «Сохранить», «Предпросмотр», «Отмена» */',
| |
| 'body.darkmode-vector2010 .editOptions,',
| |
| 'body.darkmode-vector2010 #editpage-copywarn,',
| |
| 'body.darkmode-vector2010 .mw-editfooter-toggler,',
| |
| 'body.darkmode-vector2010 .editHelp,',
| |
| 'body.darkmode-vector2010 #editform,',
| |
| 'body.darkmode-vector2010 .mw-editform {',
| |
| ' background: #1a1a1a !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| '/* ==== Свежие правки: поля выбора и ввода ==== */',
| |
| 'body.darkmode-vector2010 select,',
| |
| 'body.darkmode-vector2010 input[type="text"],',
| |
| 'body.darkmode-vector2010 input[type="search"],',
| |
| 'body.darkmode-vector2010 input[type="number"],',
| |
| 'body.darkmode-vector2010 input[type="date"],',
| |
| 'body.darkmode-vector2010 textarea,',
| |
| 'body.darkmode-vector2010 .mw-ui-input,',
| |
| 'body.darkmode-vector2010 .oo-ui-inputWidget-input {',
| |
| ' background: #2a2a2a !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border: 1px solid #555 !important;',
| |
| ' border-radius: 3px !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 select,',
| |
| 'body.darkmode-vector2010 .oo-ui-dropdownWidget-handle,',
| |
| 'body.darkmode-vector2010 .oo-ui-inputWidget-input {',
| |
| ' -webkit-appearance: none !important;',
| |
| ' -moz-appearance: none !important;',
| |
| ' appearance: none !important;',
| |
| '}',
| |
| '/* Стрелочка у select */',
| |
| 'body.darkmode-vector2010 select {',
| |
| ' background-image: linear-gradient(45deg, transparent 50%, #6cb6ff 50%),',
| |
| ' linear-gradient(135deg, #6cb6ff 50%, transparent 50%) !important;',
| |
| ' background-position: calc(100% - 14px) center, calc(100% - 9px) center !important;',
| |
| ' background-size: 5px 5px, 5px 5px !important;',
| |
| ' background-repeat: no-repeat !important;',
| |
| ' padding-right: 24px !important;',
| |
| '}',
| |
| '/* Опции внутри select */',
| |
| 'body.darkmode-vector2010 select option,',
| |
| 'body.darkmode-vector2010 select optgroup {',
| |
| ' background: #2a2a2a !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 select option:checked,',
| |
| 'body.darkmode-vector2010 select option:hover {',
| |
| ' background: #3a3a3a !important;',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| '/* Чекбоксы и радиокнопки */',
| |
| 'body.darkmode-vector2010 input[type="checkbox"],',
| |
| 'body.darkmode-vector2010 input[type="radio"] {',
| |
| ' accent-color: #6cb6ff !important;',
| |
| ' background: #2a2a2a !important;',
| |
| ' border-color: #555 !important;',
| |
| '}',
| |
| '/* Кнопки в фильтрах */',
| |
| 'body.darkmode-vector2010 button,',
| |
| 'body.darkmode-vector2010 input[type="submit"],',
| |
| 'body.darkmode-vector2010 input[type="button"],',
| |
| 'body.darkmode-vector2010 .oo-ui-buttonElement-button,',
| |
| 'body.darkmode-vector2010 .mw-ui-button {',
| |
| ' background: #333 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border: 1px solid #555 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 button:hover,',
| |
| 'body.darkmode-vector2010 input[type="submit"]:hover,',
| |
| 'body.darkmode-vector2010 .oo-ui-buttonElement-button:hover,',
| |
| 'body.darkmode-vector2010 .mw-ui-button:hover {',
| |
| ' background: #444 !important;',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| '/* Обёртки вокруг полей (Label, FieldLayout) */',
| |
| 'body.darkmode-vector2010 .oo-ui-fieldLayout,',
| |
| 'body.darkmode-vector2010 .oo-ui-labelElement-label,',
| |
| 'body.darkmode-vector2010 label,',
| |
| 'body.darkmode-vector2010 legend {',
| |
| ' color: #d0d0d0 !important;',
| |
| '}',
| |
| '/* Выпадающие меню OOUI (свежие правки в новых версиях) */',
| |
| 'body.darkmode-vector2010 .oo-ui-dropdownWidget,',
| |
| 'body.darkmode-vector2010 .oo-ui-menuSelectWidget,',
| |
| 'body.darkmode-vector2010 .oo-ui-optionWidget {',
| |
| ' background: #2a2a2a !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #555 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .oo-ui-optionWidget-selected,',
| |
| 'body.darkmode-vector2010 .oo-ui-optionWidget-highlighted {',
| |
| ' background: #3a3a3a !important;',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| '/* ==== Загрузка файла: вкладки Файл/История/Использование ==== */',
| |
| 'body.darkmode-vector2010 #filetoc,',
| |
| 'body.darkmode-vector2010 #filetoc ul,',
| |
| 'body.darkmode-vector2010 .filehistory,',
| |
| 'body.darkmode-vector2010 .filehistory ul,',
| |
| 'body.darkmode-vector2010 #mw-imagepage-section-filehistory,',
| |
| 'body.darkmode-vector2010 #mw-imagepage-section-globalusage,',
| |
| 'body.darkmode-vector2010 #mw-imagepage-section-linkstoimage,',
| |
| 'body.darkmode-vector2010 .mw-imagepage-section {',
| |
| ' background: #222 !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #filetoc a,',
| |
| 'body.darkmode-vector2010 .filehistory a,',
| |
| 'body.darkmode-vector2010 #mw-imagepage-section-filehistory a,',
| |
| 'body.darkmode-vector2010 .mw-imagepage-section a {',
| |
| ' color: #6cb6ff !important;',
| |
| '}',
| |
| '/* Современная разметка (новые версии MediaWiki) */',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content,',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content ul,',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content li,',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content table {',
| |
| ' background: #222 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content th,',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content td {',
| |
| ' background: #1a1a1a !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-imagepage-content tr:hover {',
| |
| ' background: #2a2a2a !important;',
| |
| '}',
| |
| '/* ==== Изображения: рамка, подпись, увеличение ==== */',
| |
| 'body.darkmode-vector2010 .thumb,',
| |
| 'body.darkmode-vector2010 .thumbinner,',
| |
| 'body.darkmode-vector2010 figure[typeof~="mw:File/Thumb"],',
| |
| 'body.darkmode-vector2010 figure[typeof~="mw:File/Frame"],',
| |
| 'body.darkmode-vector2010 .mw-halign-none,',
| |
| 'body.darkmode-vector2010 .mw-halign-left,',
| |
| 'body.darkmode-vector2010 .mw-halign-right,',
| |
| 'body.darkmode-vector2010 .mw-halign-center {',
| |
| ' background: #222 !important;',
| |
| ' border-color: #444 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .thumbcaption,',
| |
| 'body.darkmode-vector2010 figcaption,',
| |
| 'body.darkmode-vector2010 .thumbcaption .magnify,',
| |
| 'body.darkmode-vector2010 figure > figcaption {',
| |
| ' background: #222 !important;',
| |
| ' color: #b8b8b8 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .thumbcaption a,',
| |
| 'body.darkmode-vector2010 figcaption a {',
| |
| ' color: #6cb6ff !important;',
| |
| '}',
| |
| '/* Лупа «увеличить» */',
| |
| 'body.darkmode-vector2010 .magnify a,',
| |
| 'body.darkmode-vector2010 .magnify img {',
| |
| ' filter: invert(1) hue-rotate(180deg);',
| |
| '}',
| |
| '/* Рамка вокруг самого изображения */',
| |
| 'body.darkmode-vector2010 .thumbimage,',
| |
| 'body.darkmode-vector2010 figure img {',
| |
| ' border-color: #444 !important;',
| |
| ' background: #111 !important;',
| |
| '}',
| |
| '/* Современная разметка <figure> */',
| |
| 'body.darkmode-vector2010 figure[typeof~="mw:File"] {',
| |
| ' background: #222 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 figure[typeof~="mw:File"] > figcaption {',
| |
| ' background: #222 !important;',
| |
| ' color: #b8b8b8 !important;',
| |
| '}',
| |
| '/* ==== Свежие правки: легенда ==== */',
| |
| 'body.darkmode-vector2010 .mw-changeslist-legend,',
| |
| 'body.darkmode-vector2010 .mw-specialpage-legend,',
| |
| 'body.darkmode-vector2010 .mw-changeslist-legend-inner,',
| |
| 'body.darkmode-vector2010 .rclistfrom,',
| |
| 'body.darkmode-vector2010 #mw-indicator,',
| |
| 'body.darkmode-vector2010 .mw-indicators {',
| |
| ' background: #222 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-changeslist-legend a,',
| |
| 'body.darkmode-vector2010 .mw-specialpage-legend a {',
| |
| ' color: #6cb6ff !important;',
| |
| '}',
| |
| '/* Плашка «Свежие правки за последние X дней» и фильтры */',
| |
| 'body.darkmode-vector2010 .mw-specialpage-summary,',
| |
| 'body.darkmode-vector2010 .mw-recentchanges-filters,',
| |
| 'body.darkmode-vector2010 .rcoptions,',
| |
| 'body.darkmode-vector2010 fieldset {',
| |
| ' background: #222 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 legend {',
| |
| ' color: #e0e0e0 !important;',
| |
| '}',
| |
| '/* Строки списка правок */',
| |
| 'body.darkmode-vector2010 .mw-changeslist-line,',
| |
| 'body.darkmode-vector2010 .mw-changeslist-line-inner,',
| |
| 'body.darkmode-vector2010 .special li,',
| |
| 'body.darkmode-vector2010 .mw-recentchanges-list li {',
| |
| ' background: #1a1a1a !important;',
| |
| ' border-color: #333 !important;',
| |
| '}',
| |
| '/* Подсветка «свежих» и «моих» правок */',
| |
| 'body.darkmode-vector2010 .mw-changeslist-line-watched,',
| |
| 'body.darkmode-vector2010 .mw-changeslist-line-not-watched {',
| |
| ' background: #1a1a1a !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-plusminus-pos { color: #7bd88f !important; }',
| |
| 'body.darkmode-vector2010 .mw-plusminus-neg { color: #ff7b7b !important; }',
| |
| 'body.darkmode-vector2010 .mw-plusminus-null { color: #b0b0b0 !important; }',
| |
| '/* ==== Ночная тема Vector 2010 ==== */',
| |
| 'body.darkmode-vector2010 {',
| |
| ' background: #1a1a1a !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #content,',
| |
| 'body.darkmode-vector2010 #mw-page-base,',
| |
| 'body.darkmode-vector2010 #mw-head-base {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 a { color: #6cb6ff !important; }',
| |
| 'body.darkmode-vector2010 a:visited { color: #b48cff !important; }',
| |
| 'body.darkmode-vector2010 a.new { color: #ff7b7b !important; }',
| |
| 'body.darkmode-vector2010 h1,',
| |
| 'body.darkmode-vector2010 h2,',
| |
| 'body.darkmode-vector2010 h3,',
| |
| 'body.darkmode-vector2010 h4,',
| |
| 'body.darkmode-vector2010 h5,',
| |
| 'body.darkmode-vector2010 h6 {',
| |
| ' color: #ffffff !important;',
| |
| ' border-bottom-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 hr { border-color: #444 !important; }',
| |
| 'body.darkmode-vector2010 table,',
| |
| 'body.darkmode-vector2010 th,',
| |
| 'body.darkmode-vector2010 td {',
| |
| ' background: #222 !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .wikitable > * > tr > th {',
| |
| ' background: #2d2d2d !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 code,',
| |
| 'body.darkmode-vector2010 pre,',
| |
| 'body.darkmode-vector2010 .mw-code {',
| |
| ' background: #111 !important;',
| |
| ' color: #e0e0e0 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 blockquote {',
| |
| ' background: #222 !important;',
| |
| ' border-left-color: #555 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #toc,',
| |
| 'body.darkmode-vector2010 .toc {',
| |
| ' background: #222 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #toc a,',
| |
| 'body.darkmode-vector2010 .toc a { color: #6cb6ff !important; }',
| |
| 'body.darkmode-vector2010 #p-personal a,',
| |
| 'body.darkmode-vector2010 #p-navigation a,',
| |
| 'body.darkmode-vector2010 #p-tb a,',
| |
| 'body.darkmode-vector2010 #p-search a { color: #6cb6ff !important; }',
| |
| 'body.darkmode-vector2010 #left-navigation,',
| |
| 'body.darkmode-vector2010 #right-navigation {',
| |
| ' background: #1a1a1a !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #simpleSearch input {',
| |
| ' background: #2a2a2a !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #555 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .thumbinner,',
| |
| 'body.darkmode-vector2010 .thumb {',
| |
| ' background: #222 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .thumbcaption { color: #b0b0b0 !important; }',
| |
| '/* Осветление SVG/PNG с прозрачностью */',
| |
| 'body.darkmode-vector2010 img.mw-invertable,',
| |
| 'body.darkmode-vector2010 .mw-invertable img {',
| |
| ' filter: invert(1) hue-rotate(180deg);',
| |
| '}',
| |
| '/* Инверсия формул Math */',
| |
| 'body.darkmode-vector2010 img.mwe-math-fallback-image-inline,',
| |
| 'body.darkmode-vector2010 img.mwe-math-fallback-image-display {',
| |
| ' filter: invert(1) hue-rotate(180deg);',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-warning,',
| |
| 'body.darkmode-vector2010 .errorbox,',
| |
| 'body.darkmode-vector2010 .successbox,',
| |
| 'body.darkmode-vector2010 .messagebox {',
| |
| ' background: #2d2d2d !important;',
| |
| ' color: #d0d0d0 !important;',
| |
| ' border-color: #555 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .catlinks {',
| |
| ' background: #222 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| '/* ==== Вкладки: Статья, Обсуждение, Читать, Правка и т.д. ==== */',
| |
| 'body.darkmode-vector2010 #left-navigation,',
| |
| 'body.darkmode-vector2010 #right-navigation,',
| |
| 'body.darkmode-vector2010 #p-views,',
| |
| 'body.darkmode-vector2010 #p-namespaces,',
| |
| 'body.darkmode-vector2010 #p-actions,',
| |
| 'body.darkmode-vector2010 .vectorTabs,',
| |
| 'body.darkmode-vector2010 .vectorMenu,',
| |
| 'body.darkmode-vector2010 .vector-menu,',
| |
| 'body.darkmode-vector2010 .mw-vector-tabs {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .vectorTabs ul,',
| |
| 'body.darkmode-vector2010 .vector-menu-content,',
| |
| 'body.darkmode-vector2010 .mw-vector-tabs ul {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .vectorTabs li,',
| |
| 'body.darkmode-vector2010 .vectorMenu li {',
| |
| ' background: #2a2a2a !important;',
| |
| ' background-image: none !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .vectorTabs li a,',
| |
| 'body.darkmode-vector2010 .vectorMenu h3 span,',
| |
| 'body.darkmode-vector2010 .vectorMenu h3 a,',
| |
| 'body.darkmode-vector2010 .mw-vector-tabs li a {',
| |
| ' color: #6cb6ff !important;',
| |
| ' background: transparent !important;',
| |
| ' background-image: none !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .vectorTabs li a:hover,',
| |
| 'body.darkmode-vector2010 .vectorMenu h3:hover span {',
| |
| ' color: #ffffff !important;',
| |
| ' background: #333 !important;',
| |
| '}',
| |
| '/* Активная вкладка (та, что сейчас открыта) */',
| |
| 'body.darkmode-vector2010 .vectorTabs li.selected,',
| |
| 'body.darkmode-vector2010 .vectorTabs li.selected a,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs .selected a {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #ffffff !important;',
| |
| ' border-bottom-color: #1a1a1a !important;',
| |
| '}',
| |
| '/* Иконки-«звёздочки» и стрелки меню */',
| |
| 'body.darkmode-vector2010 .vectorTabs li.icon a,',
| |
| 'body.darkmode-vector2010 .vectorMenu h3 span:after {',
| |
| ' filter: invert(1) hue-rotate(180deg);',
| |
| '}',
| |
| '/* Выпадающие меню (Ещё, Действия) */',
| |
| 'body.darkmode-vector2010 .vectorMenu .menu,',
| |
| 'body.darkmode-vector2010 .vectorMenu .vector-menu-content-list {',
| |
| ' background: #222 !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .vectorMenu .menu a {',
| |
| ' color: #6cb6ff !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .vectorMenu .menu a:hover {',
| |
| ' background: #333 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #footer {',
| |
| ' background: #1a1a1a !important;',
| |
| ' border-top-color: #444 !important;',
| |
| ' color: #a0a0a0 !important;',
| |
| '}',
| |
| '/* ==== Вкладки: универсальный блок ==== */',
| |
| 'body.darkmode-vector2010 .mw-portlet,',
| |
| 'body.darkmode-vector2010 .mw-portlet-body,',
| |
| 'body.darkmode-vector2010 .mw-portlet-views,',
| |
| 'body.darkmode-vector2010 .mw-portlet-namespaces,',
| |
| 'body.darkmode-vector2010 .mw-portlet-actions,',
| |
| 'body.darkmode-vector2010 .mw-portlet-cactions,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs,',
| |
| 'body.darkmode-vector2010 .vector-menu-content,',
| |
| 'body.darkmode-vector2010 .vector-menu-content-list {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-portlet h3,',
| |
| 'body.darkmode-vector2010 .mw-portlet .mw-portlet-heading,',
| |
| 'body.darkmode-vector2010 .vector-menu-heading {',
| |
| ' background: #2a2a2a !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #6cb6ff !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-portlet li,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs li,',
| |
| 'body.darkmode-vector2010 .vector-menu-content-list li {',
| |
| ' background: #2a2a2a !important;',
| |
| ' background-image: none !important;',
| |
| ' border-color: #444 !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-portlet li a,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs li a,',
| |
| 'body.darkmode-vector2010 .vector-menu-content-list li a,',
| |
| 'body.darkmode-vector2010 .mw-portlet a {',
| |
| ' color: #6cb6ff !important;',
| |
| ' background: transparent !important;',
| |
| ' background-image: none !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 .mw-portlet li a:hover,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs li a:hover {',
| |
| ' background: #333 !important;',
| |
| ' color: #ffffff !important;',
| |
| '}',
| |
| '/* Активная вкладка */',
| |
| 'body.darkmode-vector2010 .mw-portlet li.selected,',
| |
| 'body.darkmode-vector2010 .mw-portlet li.selected a,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs li.selected,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs li.selected a {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| ' color: #ffffff !important;',
| |
| ' border-color: #1a1a1a !important;',
| |
| '}',
| |
| '/* Ссылки внутри вкладок, которые ещё не созданы */',
| |
| 'body.darkmode-vector2010 .mw-portlet li a.new,',
| |
| 'body.darkmode-vector2010 .vector-menu-tabs li a.new {',
| |
| ' color: #ff7b7b !important;',
| |
| '}',
| |
| '/* Обёртки вокруг вкладок */',
| |
| 'body.darkmode-vector2010 #p-namespaces,',
| |
| 'body.darkmode-vector2010 #p-views,',
| |
| 'body.darkmode-vector2010 #p-cactions,',
| |
| 'body.darkmode-vector2010 #p-actions {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| '}',
| |
| 'body.darkmode-vector2010 #p-namespaces ul,',
| |
| 'body.darkmode-vector2010 #p-views ul,',
| |
| 'body.darkmode-vector2010 #p-cactions ul,',
| |
| 'body.darkmode-vector2010 #p-actions ul {',
| |
| ' background: #1a1a1a !important;',
| |
| ' background-image: none !important;',
| |
| '}',
| |
| ].join( '\n' );
| |
|
| |
| mw.util.addCSS( css );
| |
| } | | } |
|
| |
|
| // Инициализация | | // Инициализация |
| $( function () { | | $( function () { |
| injectStyles();
| |
| createButton(); | | createButton(); |
|
| |
|