Unhide eNotes

Unhide eNotes answers and articles!

Version vom 10.05.2022. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Unhide eNotes
// @namespace    https://naeembolchhi.github.io/
// @version      0.3
// @description  Unhide eNotes answers and articles!
// @author       NaeemBolchhi
// @license      GPL-3.0-or-later
// @match        https://www.enotes.com/*
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAkBQTFRF/////vz8+Ojl8tPP67qy46CV45+U5aed67y089XQ+ero//7++ezp6rau13VlzldEyEMtxz4oyUQvz1lG2Xxt7Ly1+Obj9uDd5aWbz1tIyEAqzlZD4ZiM+ejm/ff2562kzlVBxz8p0V9N7cK7/vz7+u7s3Yh6ykgzykg0/fj4/vv64ZeLyEEr3IV36bOq5KGW4ZaKykcyykk02Xts/fn47L620mJRy0w48c7J6K6kyEIt8c/K5aaczVM/z1pH+Ofk8tPOy0s21Wtb+u/u9t/b0F1L24N1/Pb11nBg3o2B/fb19NrWzVI+78nD6rat1W1c/PPx67uzyEIs13Rk02VUy0s389bRyUUv7sS93Yp93Yt+24R2y0o19NjT1GlY0F5M+u/t5KKX8tDL5qie8tHL56yj6rWt8MzG9+LfzVE94JOH4J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fQYINdDqw7XC1bQKCnbt279mLHqvEuUN1XyMQLN1PjuZRMAqGFAAAQRCVzMZUEeAAAAAASUVORK5CYII=
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    try {
        const hidden = document.querySelectorAll('div[class^="_"]');

        for (let x = 0; x < hidden.length; x++) {
            hidden[x].removeAttribute('class');
        }
    } catch {}

    try {
        const subscription = document.querySelectorAll('a[data-trackingaction="student_subscription"]');

        for (let x = 0; x < subscription.length; x++) {
            subscription[x].parentNode.parentNode.removeChild(subscription[x].parentNode);
        }
    } catch {}

    try {
        const trial = document.querySelectorAll('div[data-bp="grid container"] a[data-trackingaction="student_trial"]');

        for (let x = 0; x < trial.length; x++) {
            trial[x].parentNode.parentNode.parentNode.removeChild(trial[x].parentNode.parentNode);
        }
    } catch {}

    try {
        const empty = document.querySelectorAll('div[style*="height"]');

        for (let x = 0; x < empty.length; x++) {
            empty[x].parentNode.removeChild(empty[x]);
        }
    } catch {}

    try {
        const paywall = document.querySelector('#enotes-paywall');
        paywall.parentNode.removeChild(paywall);
    } catch {}

    try {
        const content = document.querySelector('header > h1').parentNode.parentNode;
        const answer = document.querySelector('#' + content.id + ' > div:last-of-type');
        const audio = document.querySelector('#' + content.id + ' > figure');
        if (audio) {
            answer.parentNode.innerHTML = content.children[0].innerHTML + content.children[1].innerHTML + audio.innerHTML + answer.innerHTML;
        } else {
            answer.parentNode.innerHTML = content.children[0].innerHTML + content.children[1].innerHTML + answer.innerHTML;
        }
    } catch {}

})();