Greasy Fork is available in English.

Преміум доступ

Необмежений доступ до розв'язків тестових завдань на zno.osvita.ua.

// ==UserScript==
// @name         Преміум доступ
// @namespace    http://tampermonkey.net/
// @version      2024-11-09
// @description  Необмежений доступ до розв'язків тестових завдань на zno.osvita.ua.
// @author       erxson
// @match        https://zno.osvita.ua/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=osvita.ua
// @grant        none
// ==/UserScript==

// Це жарт якийсь?
window.isPrem = function() { return true; };
window.showComment = function (commentId) {
  let testId = '';

  if (typeof window.test_id === 'undefined') {
    var locationParts = window.location.pathname.split('/');
    testId = locationParts[1];
  } else {
    testId = window.test_id;
  }

  let op = window.zrtt('comop_' + testId);

  document.getElementById('btn_show_' + commentId).style.display = 'none';
  document.getElementById('commentar_' + commentId).style.display = 'inline-block';

  if (typeof window.dataLayer !== 'undefined') {
    let eventData = { eventAction: 'openComment' };
    eventData.eventCategory = 'ЗНО-онлайн';
    eventData.eventLabel = 'showComment';
    eventData.event = testId + '|' + op + '|' + 1;
    window.dataLayer.push(eventData);
  }
};

/* index.html:
<script type="text/javascript">
window.onload = function () {
  if (window.zStat) {
    zStat()
  }
  setTimeout(function () {
    if (getCookie('ost') === undefined || getCookie('ost').length < 10) {
      $('.explanation')
        .html('<p>Коментарі для зареєстрованих користувачів!</p>')
        .hide()
    }
  }, 10000)
}
</script>
*/
if (window.getCookie('ost') === undefined || window.getCookie('ost').length < 10) {
    window.setCookie('ost', '00000000000000000000000000000000')
}