Literotica Reader Dark (for Beta)

Dark Mode for situations where you don't want to destroy your night vision

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name             Literotica Reader Dark (for Beta)
// @namespace   [email protected]
// @description   Dark Mode for situations where you don't want to destroy your night vision
// @include          https://www.literotica.com/beta/s/*
// @version          1
// @grant              none
// @icon                https://speedy.literotica.com/authenticate/favicon-9238b3a65e563edb3cf7906ccfdc81bb.ico
// ==/UserScript==

function pageFullyLoaded () {

setTimeout(function(){

//Removes Ads
document.querySelector(".w_ew").remove();

//Dark Mode for situations where you don't want to destroy your night vision
document.querySelector('.aa_eQ.panel').insertAdjacentHTML('afterbegin', '<div id="dark" class="button button--brand" title="Dark Mode"><i class="icon icon-font undefined" style="color:black"></i>&nbsp;&nbsp;&nbsp;<i class="icon icon-arrow-right undefined" style="color:black"></i>&nbsp;&nbsp;&nbsp;<i class="icon icon-font undefined" style="color:#ffc200"></i></div><br><br>');

function toggledark() {
  var menu = document.getElementById("dark").getElementsByTagName('i')[1];
  var bg = document.querySelector(".page__main.page__main-wrapper.clearfix");
  var div1 = document.querySelector(".aa_eQ.panel");
  var var1 = div1.getElementsByTagName('p');
  var compStyles = window.getComputedStyle(div1);
  var bgcolor = compStyles.getPropertyValue('background-color').toString();
  var check = "rgb(47, 79, 79)";
  if(bgcolor == check) {
    menu.className = "icon icon-arrow-right undefined";
    bg.style.removeProperty('background-color');
    div1.style.removeProperty('background-color');
    for(var i = var1.length; i--;) {
      var1[i].style.removeProperty('color');
      var1[i].style.removeProperty('margin-left');
    }
  } else {
    menu.className = "icon icon-arrow-left undefined";
    bg.style.backgroundColor = "#2f2f2f";
    div1.style.backgroundColor = "#2f4f4f";
    for(var i = var1.length; i--;) {
      var1[i].style.color = "#ffc200";
      var1[i].style.marginLeft = "2%";
    }
  }
};

document.getElementById("dark").addEventListener('click', toggledark, false);

}, 1000);

};

window.addEventListener ("load", pageFullyLoaded);