nure-ui-fix

виправлення для темної теми та деяких меню

当前为 2024-10-03 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         nure-ui-fix
// @icon         https://dl.nure.ua/pluginfile.php/1/theme_moove/favicon/1664384975/favicon.ico
// @namespace    https://tampermonkey.net/
// @version      7
// @description  виправлення для темної теми та деяких меню
// @author       sekomi
// @match        https://dl.nure.ua/*
// @run-at       document-end
// @noframes
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    /* global $ */

    function addCss(cssString) {
        const newCss = document.createElement("style");
        newCss.type = "text/css";
        newCss.innerHTML = cssString;
        document.body.appendChild(newCss);
    }

    var helpButton = document.getElementsByClassName("btn btn-icon bg-secondary icon-no-margin btn-footer-popover")[0];
    helpButton.style.display = "none";

    if (document.body.classList.contains('moove-darkmode'))
    {
    addCss
    (`
/* page */
body.moove-darkmode #page, body.moove-darkmode #region-main, body.moove-darkmode #page.drawers .main-inner {
  background-color: #151515;
}
body.moove-darkmode #page-footer, body.moove-darkmode div[role="main"] {
  background-color: #151515;
}
body.moove-darkmode .dashboard-card-deck .dashboard-card .dashboard-card-footer, body.moove-darkmode #region-main .section.main, body.moove-darkmode .course-content .single-section .sectionname, body.moove-darkmode .course-content .section .sectionname {
  background-color: #151515 !important;
}
.description .course-description-item {
  background-color: #1c1c1c;
}
div.description-inner {
  background-color: #1c1c1c;
}
.path-mod .activity-header:not(:empty) {
  background-color: #1c1c1c;
}
.activity-item .activity-completion button.btn, .activity-item .activity-completion a[role="button"].btn {
  color: #deeae7;
  background-color: #1f2022;
  border-color: #576470;
}
.activity-item {
  background-color: #1f2022;
}
.navbar-toggler-icon {
  background-color: darkslategray;
}
.course-section.hidden .section-item {
  background-color: #151515;
}

/* assignments */
.path-mod-assign td.submissionstatussubmitted, .path-mod-assign div.submissionstatussubmitted, .path-mod-assign a:link.submissionstatussubmitted {
  color: #deeae7;
  background-color: #0c3511;
}
.path-mod-assign td.submissiongraded, .path-mod-assign div.submissiongraded {
  color: #deeae7;
  background-color: #0c3511;
}
.path-mod-assign td.earlysubmission, .path-mod-assign div.earlysubmission {
  color: #deeae7;
  background-color: #0c3511;
}
.path-mod-assign td.latesubmission, .path-mod-assign a:link.latesubmission, .path-mod-assign div.latesubmission {
  color: #deeae7;
  background-color: #411313;
}
.path-mod-assign td.submissionnotgraded, .path-mod-assign div.submissionnotgraded {
  color: #deeae7;
}
.path-mod-assign td.submissionlocked, .path-mod-assign div.submissionlocked {
  color: #deeae7;
  background-color: #262434;
}

/* quizzes */
#page-mod-quiz-view table.quizattemptsummary tr.bestrow td {
  background-color: #092a0d;
}
.que .info {
  background-color: #1f2022;
  border: 1px solid #56595d;
}
.que .formulation {
  color: #e8eeed;
  background-color: #22262e;
  border-color: #a7b6b8;
}
#quiz-timer-wrapper #quiz-timer {
  border: 1px solid #ca3120;
  background-color: #1f2022;
}
.path-mod-quiz .qnbutton {
  border: 1px solid #bbb;
  background-color: #1c1c1c !important;
}
.path-mod-quiz .qnbutton {
  background: #1c1c1c;
    background-color: rgb(30, 30, 30);
    background-image: none;
}
.path-mod-quiz #mod_quiz_navblock .qnbutton.complete .trafficlight, .path-mod-quiz #mod_quiz_navblock .qnbutton.answersaved .trafficlight, .path-mod-quiz #mod_quiz_navblock .qnbutton.requiresgrading .trafficlight {
  background-color: #11691b;
}
.path-mod-quiz #mod_quiz_navblock .qnbutton.notyetanswered .trafficlight, .path-mod-quiz #mod_quiz_navblock .qnbutton.invalidanswer .trafficlight {
  background-color: #4a3e9e;
}
table.quizreviewsummary th.cell {
  background: #1f2022;
}
table.quizreviewsummary td.cell {
  background: #1f2022;
}
.qn-question {
  background-color: #1f2022;
}

/* notification colors */
.popover-region-container {
  border: 1px solid #757b7f;
}
body.moove-darkmode .message-app, body.moove-darkmode .navbar .popover-region-container {
  background-color: #1d1d1d;
}
.popover-region-notifications .popover-region-container .popover-region-content-container .content-item-container.unread {
  background-color: #1a1a1a;
}
.popover-region-notifications .popover-region-container .popover-region-content-container .content-item-container {
  background-color: #1a1a1a;
}
.content-item-container.unread {
  background-color: #1a1a1a;
}
.popover-region-notifications .popover-region-container .popover-region-content-container .content-item-container:hover {
  background-color: #1a1a1a;
  color: inherit;
}
.popover-region-footer-container {
  background-color: #202122;
}

.text-dark {
  color: #dfe6ed !important;
}

/* search button color */
.simplesearchform .btn-submit {
  background-color: #0f47ad;
}
.simplesearchform .btn-submit {
  border-color: #9facc0;
  color: #dfe6ed;
}

/* menu */
.dropdown-menu {
  background-color: #1f2022;
}

/* drawer */
.drawer {
  background-color: #1f2022;
}
.btn {
  color: #e1e6ec;
}
.courseindex .courseindex-item .courseindex-link, .courseindex .courseindex-item .courseindex-chevron {
  color: #e1e6ec;
}
.courseindex .courseindex-item.dimmed .courseindex-link, .courseindex .courseindex-item.dimmed .courseindex-chevron {
  color: #e1e6ec;
}

.moove-darkmode .courseindex-item:not(.pageitem):hover .icon, .btn.drawertoggle {
  color: #aaa !important;
}
.courseindex .courseindex-item:hover, .courseindex .courseindex-item:focus {
  color: #aaa !important;
}
.courseindex d-flex:hover .courseindex-item:hover .courseindex-link:hover, .courseindex .courseindex-item .courseindex-link:focus, .courseindex .courseindex-item .courseindex-chevron:hover, .courseindex .courseindex-item .courseindex-chevron:focus {
  color: #aaa !important;
}
a:hover {
  color: #aaa !important;
}
.courseindex .courseindex-item:hover .courseindex-link, .courseindex .courseindex-item:hover .courseindex-chevron, .courseindex .courseindex-item:focus .courseindex-link, .courseindex .courseindex-item:focus .courseindex-chevron {
  color: #aaa !important;
}
.fp-icon {
  background: #8ca7db;
}

/* calendar */
.maincalendar .calendarmonth .clickable:hover {
  background-color: #1f2022;
}
.modal-content {
  background-color: #1f2022;
}
.block .block-controls .dropdown-toggle {
  color: #deeae7;
}

/* grades */
.path-grade-report-user .user-grade thead th, .grade-report-user .user-grade thead th {
  background-color: #151515;
}
.path-grade-report-user .user-report-container, .grade-report-user .user-report-container {
  background-color: #151515;
}
.path-grade-report-user .user-grade th.category, .grade-report-user .user-grade th.category {
  background-color: #151515;
}
.path-grade-report-user .user-grade td, .grade-report-user .user-grade td {
  background-color: #151515;
}
.path-grade-report-user .user-grade .baggt, .path-grade-report-user .user-grade .baggb, .grade-report-user .user-grade .baggt, .grade-report-user .user-grade .baggb {
  background-color: #151515;
}
.path-grade-report-user .user-grade th.column-itemname:not(.header, .category, .baggt, .baggb), .grade-report-user .user-grade th.column-itemname:not(.header, .category, .baggt, .baggb) {
  background-color: #151515;
}
.path-grade-report-user .user-grade td.item, .grade-report-user .user-grade td.item {
  background-color: #151515;
}

/* general colors */
body {
  background-color: #151515 !important;
}
body.moove-darkmode .card, body.moove-darkmode #page-enrol-users #filterform, body.moove-darkmode .que .history, body.moove-darkmode .userprofile .profile_tree section, body.moove-darkmode .groupinfobox, body.moove-darkmode .well {
  background-color: #151515;
}
.btn-secondary {
  background-color: #1f2022;
}
#page.drawers {
  scrollbar-color: #6a737b #131317;
}
.generaltable tbody tr:nth-of-type(2n)
{
  background-color: #151515;
}
body.moove-darkmode {
  color: #dfe6ed;
}
body.moove-darkmode a {
  color: #79accf;
}
.custom-select:disabled {
  color: #dfe6ed;
  background-color: #1f2022;
}
.border {
  border: 1px solid #888 !important;
}
.generaltable th, .generaltable td {
  border-top: 1px solid #6c7175;
}
.table-bordered th, .table-bordered td {
  border: 1px solid #6c7175;
}
.dashboard-card {
  border: 1px solid #a7aeb4;
}
.forumpost.unread .row.header, .path-course-view .unread, span.unread
{
  background-color: #1f2022;
}
.page-link {
  background-color: #1f2022;
  border: 1px solid #888;
}
.page-link:hover {
  background-color: #afbbd240;
}
.page-item.disabled .page-link {
  color: #6a737b;
  background-color: #161719;
  border: 1px solid #888;
}
.generaltable tbody tr:hover {
  color: #646f7b;
}
.list-group-item {
  background-color: #1f2022;
}
[data-region="right-hand-drawer"].drawer .footer-container {
  background-color: #2a2929;
}
.moremenu .nav-link.active:focus, .moremenu .nav-link.active:hover {
  background-color: #222222;
}
.moremenu .nav-link:hover, .moremenu .nav-link:focus {
  background-color: #222222;
}
.card-header {
  background-color: rgba(127, 136, 151, 0.1);
}
.h-100.bg-white {
  background-color: #262626 !important;
}
.bg-light {
  background-color: #1f2022 !important;
}
.bg-white {
  background-color: #151515 !important;
}
.dropdown-item {
  color: #dfe6ed;
}
.path-mod-attendance table.allsessions tr.grouper td {
  background-color: #151515;
}
.moodle-dialogue-base .moodle-dialogue-wrap {
  background-color: #151515;
  border: 1px solid #565656;
}
.yui3-button {
  color: rgba(255, 255, 255, 0.8);
}
a.text-dark:hover, a.text-dark:focus {
  color: #fff !important;
}
.close {
  color: #fff;
  text-shadow: 0 1px 0 #aaa;
}
.close:hover {
  color: #ccc;
}
.custom-select {
  background: #1f2022 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center / 8px 10px no-repeat;
  color: #dfe6ed;
}
.btn-success {
  color: #deeae7;
  background-color: #0c3511;
  border-color: #0f3914;
}
a.dimmed, a.dimmed:link, a.dimmed:visited, a.dimmed_text, a.dimmed_text:link, a.dimmed_text:visited, .dimmed_text, .dimmed_text a, .dimmed_text a:link, .dimmed_text a:visited, .usersuspended, .usersuspended a, .usersuspended a:link, .usersuspended a:visited, .dimmed_category, .dimmed_category a {
  color: #747f88;
}
.tertiary-navigation .navitem-divider {
  background-color: #888;
}
.course-section .availabilityinfo {
  background-color: #2c3033;
}
.dropdown-menu {
  color: #dadcdf;
}
.btn.btn-icon:hover, .btn.btn-icon:focus {
  background-color: #aaaaaa00;
}
div[style]:has(p) {
  background-color: #151515 !important;
}
.pagelayout-frontpage .dashboard-card .course-contacts .contact p.role, .pagelayout-coursecategory .dashboard-card .course-contacts .contact p.role {
  color: #66717b;
}
.message-app .message.send .time {
  background-color: #3f4448 !important;
  color: #deeae7;
}
.message-app .message.send {
  background-color: #3f4448;
  color: #deeae7;
}
.message-app .icon {
  color: #deeae7;
}
.message-app .btn.btn-link.btn-icon:hover, .message-app .btn.btn-link.btn-icon:focus {
  background-color: #5e6164;
}
#MathJax_Zoom {
  background-color: #151515;
}
.bg-secondary {
  background-color: #162d44 !important;
}

/* layout changes */
.content-item-container .view-more {
  bottom: 2px;
  visibility: hidden;
}
.que .specificfeedback, .que .generalfeedback, .que .numpartscorrect .que .rightanswer, .que .im-feedback, .que .feedback, .que p {
  margin: 0 0 .1em;
}
#quiz-timer-wrapper {
  top: 12px;
}
@media (min-width: 768px) {
  .activity-item:not(.activityinline) {
    padding: 1rem;
    border: 1px solid #484d51;
  }
}
`);
    }
})();