Last active
November 24, 2024 13:45
-
-
Save zobzn/a8ccfcd5b8e3ac765dbe0a769b4f1bb5 to your computer and use it in GitHub Desktop.
tampermonkey optima
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#toTop, | |
#page-footer, | |
#page-navbar, | |
#completionprogressid, | |
.activity-navigation, | |
/* nav.navbar.fixed-top, */ | |
[data-key="coursehome"], | |
[data-key="participants"], | |
[data-key="badgesview"], | |
[data-key="competencies"], | |
[data-key="grades"], | |
[data-key="734"], | |
[data-key="850"], | |
[data-key="273"], | |
[data-key="calendar"], | |
.tooltip.show, | |
.progressEventInfo.completion-progress--info, | |
[href*="/message/"], | |
[data-region="drawer-toggle"] ~ *, | |
.slider.week-schedule:first-child ~ *, | |
#block-region-side-pre > *:not(.block_weekschedule, .menu), | |
.block_course_teacher, | |
.learningapps { | |
display: none !important; | |
} | |
/* ------------------------- */ | |
:root { | |
--drawer-width: 400px; | |
} | |
body.drawer-open-left { | |
margin-left: var(--drawer-width); | |
} | |
nav.navbar { | |
width: auto; | |
right: auto; | |
padding: 5px; | |
} | |
nav.navbar .toggle-btn { | |
margin: 0; | |
} | |
#page { | |
margin-top: 0; | |
} | |
#nav-drawer { | |
width: var(--drawer-width); | |
} | |
#nav-drawer.closed { | |
left: -500px; | |
} | |
/* ------------------------- */ | |
[href*="/message/"] { | |
pointer-events: none; | |
display: none; | |
} | |
.course-content > .topics > .section[aria-label*="Консультації"], | |
.course-content > .topics > .section[aria-label*="Інформація"] { | |
display: none; | |
} | |
[href*="/user/profile.php"], | |
[href*="/user/view.php"] { | |
pointer-events: none; | |
} | |
.progressBarCell--attempted { | |
opacity: 0.25; | |
} | |
.progressBarCell--future ~ .progressBarCell--future { | |
opacity: 0.25; | |
pointer-events: none; | |
} | |
.activity:has(.icon[src*="/completion-auto-y"]), | |
.activity:has(.icon[src*="/completion-auto-n"]) | |
~ .activity:has(.icon[src*="/completion-auto-n"]) { | |
opacity: 0.25; | |
pointer-events: none; | |
} | |
/* ------------------------- */ | |
.h5p-container:has(.ui-slider-range[style*="100%"]) .h5p-play { | |
pointer-events: none; | |
opacity: 0.25; | |
} | |
.h5p-slider { | |
pointer-events: none; | |
} | |
.h5p-playbackRate, | |
.h5p-quality, | |
.h5p-fullscreen { | |
visibility: hidden; | |
pointer-events: none; | |
} | |
.h5p-minimal-overlay, | |
.h5p-splash-wrapper, | |
.h5p-splash-outer, | |
.h5p-splash, | |
.h5p-interactions-container, | |
.h5p-interaction { | |
display: none; | |
} | |
/* ------------------------- */ | |
.mozaweb-link { | |
display: none !important; | |
} | |
div > iframe[src*="https://view.genial.ly/"] | |
{ | |
pointer-events: none; | |
opacity: 0.1; | |
} | |
/* ------------------------- */ | |
/* попытка задизаблить кнопку повторного ответа на тест */ | |
/* | |
.singlebutton:nth-child(1):nth-last-child(2) button { | |
pointer-events: none; | |
opacity: 0.1; | |
} | |
*/ | |
/* ------------------------- */ | |
/* скрываем "Оцените как прошел урок" */ | |
.module-rating { | |
display: none; | |
} | |
/* ------------------------- */ | |
iframe { | |
display: none !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Optima | |
// @version 2024-11-24 | |
// @description try to take over the world! | |
// @author zobzn | |
// @namespace https://gist.githubusercontent.com/zobzn/a8ccfcd5b8e3ac765dbe0a769b4f1bb5 | |
// @updateURL https://gist.githubusercontent.com/zobzn/a8ccfcd5b8e3ac765dbe0a769b4f1bb5/raw/optima.user.js | |
// @downloadURL https://gist.githubusercontent.com/zobzn/a8ccfcd5b8e3ac765dbe0a769b4f1bb5/raw/optima.user.js | |
// @icon https://optima.school/favicon.ico | |
// @match https://b.optima-osvita.org/* | |
// @run-at document-end | |
// @grant unsafeWindow | |
// @grant window.close | |
// @grant window.focus | |
// @grant window.onurlchange | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @grant GM_setClipboard | |
// @grant GM_getResourceText | |
// @grant GM_addStyle | |
// @require https://code.jquery.com/jquery-3.7.1.min.js | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.min.js | |
// @resource optimaCSS https://gist.githubusercontent.com/zobzn/a8ccfcd5b8e3ac765dbe0a769b4f1bb5/raw/optima.user.css | |
// ==/UserScript== | |
(async () => { | |
"use strict"; | |
console.log(`'optima.user.js on "${location.href}"'`); | |
const link = document.createElement("link"); | |
link.rel = "stylesheet"; | |
link.type = "text/css"; | |
link.href = | |
"https://gist.githubusercontent.com/zobzn/a8ccfcd5b8e3ac765dbe0a769b4f1bb5/raw/optima.user.css?r=" + | |
Math.random(); | |
document.head.appendChild(link); | |
// GM_addStyle(GM_getResourceText("optimaCSS")); | |
window.$('a[href*="startlastseen=no"]:first').each((index, element) => { | |
location.href = element.getAttribute("href"); | |
}); | |
window | |
.$('.singlebutton button:contains("Спробувати знову")') | |
.closest(".singlebutton") | |
.remove(); | |
window | |
.$('.singlebutton button:contains("Відповіді")') | |
.closest(".singlebutton") | |
.remove(); | |
window | |
.$('.singlebutton button:contains("Answers")') | |
.closest(".singlebutton") | |
.remove(); | |
window | |
.$('.formatted-content h1:contains("Відповіді")') | |
.closest(".formatted-content") | |
.html(""); | |
window.$('.formatted-content:contains("Відповіді до")').html(""); | |
window.$('.formatted-content:contains("Suggested Answers")').html(""); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment