Register for your free account! | Forgot your password?

Go Back   elitepvpers > General > Main
You last visited: Today at 21:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Dark Mode for Elitepvpers

Discussion on Dark Mode for Elitepvpers within the Main forum part of the General category.

Reply
 
Old   #1
 
elite*gold: 20
Join Date: Mar 2022
Posts: 123
Received Thanks: 48
Dark Mode for Elitepvpers

Hello, my eyes was hurting from ePvp's light theme. Normally I'm using an extension called Dark Reader but it messing up ePvp so I decided to make my own. I just learn javascript so pretty sure you can loop every item by their color, but it's still a thing tho. I know, the style is the worst, everything is black, I can improve the design if you guys want.

Download any kind of userscript manager from your favorite browser extension market.

Code:
    var div = document.querySelectorAll("div");
    for (i = 0; i < div.length; i++) {
        div[i].style.backgroundColor = "black";
        div[i].style.color = "#fff";
    }

    var table = document.querySelectorAll("table");
    for (i = 0; i < table.length; i++) {
        table[i].style.backgroundColor = "black";
        table[i].style.color = "#fff";
    }

    var a = document.querySelectorAll("a");
    for (i = 0; i < a.length; i++) {
        if (a[i].getAttribute('style') != 'color:BlueViolet;')
            a[i].setAttribute('style', 'color:White;');
    }

    var td = document.querySelectorAll("td");
    for (i = 0; i < td.length; i++) {
        td[i].setAttribute('style', 'background: black');
        td[i].style.color = "#fff";
    }

    alt2 = document.getElementsByClassName("alt2");
    for (i = 0; i < alt2.length; i++) {
        alt2[i].setAttribute('style', 'background: black;');
        alt2[i].style.color = "#fff";
    }

    strong = document.querySelectorAll("strong");
    for (i = 0; i < strong.length; i++) {
        strong[i].setAttribute('onmousehover', 'this.style.opacity = "70%";');
    }

    panel = document.getElementsByClassName("panel");
    for (i = 0; i < panel.length; i++) {
        panel[i].setAttribute('style', 'background: black !important');
    }

    li2 = document.querySelectorAll("li");
    for (i = 0; i < li2.length; i++) {
        li2[i].setAttribute('style', 'background: black !important; border: 1px solid #252525 !important;');
    }

    img = document.querySelectorAll("img");
    for (i = 0; i < img.length; i++) {
        if (img[i].classList.contains('fancybox-expandable') || img[i].classList.contains('fancybox-disabled'))
			if ((img[i].getAttribute('src')).substr(-1) != "?")
				img[i].setAttribute('style', 'filter: invert(1)');
    }
    
    pln = document.getElementsByClassName("pln");
    for (i = 0; i < pln.length; i++) {
        pln[i].setAttribute('style', 'color: wheat !important');
    }

const credit = document.createElement("li");
credit.innerHTML = "Dark Mode v1.02, by <a href='https://www.elitepvpers.com/forum/members/8325310-forfeitsol.html'>forfeitsol</a> ";

document.getElementById("userbaritems").appendChild(credit);
Preview:


Update Notes:

Tampermonkey version:
Quote:
Originally Posted by Zagith View Post

HTML Code:
// ==UserScript==
//  [MENTION=286917]name[/MENTION]         New Userscript
//  [MENTION=1005418]namespace[/MENTION]    [url]http://tampermonkey.net/[/url]
//  [MENTION=1805674]Version[/MENTION]      0.1
//  [MENTION=3833773]Description[/MENTION]  try to take over the world!
//  [MENTION=1332190]author[/MENTION]       You
//  [MENTION=340885]match[/MENTION]        [url]https://www.elitepvpers.com/*[/url]
//  [MENTION=283894]icon[/MENTION]         [url]https://www.google.com/s2/favicons?sz=64&domain=elitepvpers.com[/url]
//  [MENTION=551144]grant[/MENTION]        none
// ==/UserScript==

(function() {
    'use strict';
    var div = document.querySelectorAll("div");
    for (var i = 0; i < div.length; i++) {
        div[i].style.backgroundColor = "black";
        div[i].style.color = "#fff";
    }

    var table = document.querySelectorAll("table");
    for (i = 0; i < table.length; i++) {
        table[i].style.backgroundColor = "black";
        table[i].style.color = "#fff";
    }

    var a = document.querySelectorAll("a");
    for (i = 0; i < a.length; i++) {
        if (a[i].getAttribute('style') != 'color:BlueViolet;')
        {a[i].setAttribute('style', 'color:White;');}
        }

        var td = document.querySelectorAll("td");
        for (i = 0; i < td.length; i++) {
            td[i].setAttribute('style', 'background: black');
            td[i].style.color = "#fff";
        }

        var alt2 = document.getElementsByClassName("alt2");
        for (i = 0; i < alt2.length; i++) {
            alt2[i].setAttribute('style', 'background: black;');
            alt2[i].style.color = "#fff";
        }

        var strong = document.querySelectorAll("strong");
        for (i = 0; i < strong.length; i++) {
            strong[i].setAttribute('onmousehover', 'this.style.opacity = "70%";');
        }

        var panel = document.getElementsByClassName("panel");
        for (i = 0; i < panel.length; i++) {
            panel[i].setAttribute('style', 'background: black !important');
        }

        var li2 = document.querySelectorAll("li");
        for (i = 0; i < li2.length; i++) {
            li2[i].setAttribute('style', 'background: black !important; border: 1px solid #252525 !important;');
        }

        var img = document.querySelectorAll("img");
        for (i = 0; i < img.length; i++) {
            if (img[i].classList.contains('fancybox-expandable') || img[i].classList.contains('fancybox-disabled'))
            {
                if ((img[i].getAttribute('src')).substr(-1) != "?")
                {
                    img[i].setAttribute('style', 'filter: invert(1)');
                }
            }
        }

        var pln = document.getElementsByClassName("pln");
        for (i = 0; i < pln.length; i++) {
            pln[i].setAttribute('style', 'color: wheat !important');
        }

       const credit = document.createElement("li");
        credit.innerHTML = "Dark Mode v1.02, by <a href='https://www.elitepvpers.com/forum/members/8325310-forfeitsol.html'>forfeitsol</a> ";

        document.getElementById("userbaritems").appendChild(credit);
    })();
Thanks to @ for putting effort onto it!
forfeitsol is offline  
Thanks
11 Users
Old 03/30/2022, 06:15   #2
 
TrilogyMods's Avatar
 
elite*gold: 252
Join Date: Jan 2021
Posts: 17
Received Thanks: 4
Thanks it works well, much better on my eyes.
TrilogyMods is offline  
Old 03/30/2022, 15:12   #3
 
elite*gold: 20
Join Date: Mar 2022
Posts: 123
Received Thanks: 48
Quote:
Originally Posted by MrHoliday View Post
Thanks it works well, much better on my eyes.
You're welcome.
forfeitsol is offline  
Old 03/30/2022, 21:35   #4

 
ilikebacon's Avatar
 
elite*gold: 0
Join Date: Sep 2013
Posts: 2,060
Received Thanks: 623
Would be sick if Luke could make epvp a dark mode theme
ilikebacon is offline  
Old 03/31/2022, 16:33   #5
 
elite*gold: 20
Join Date: Mar 2022
Posts: 123
Received Thanks: 48
Quote:
Originally Posted by ilikebacon View Post
Would be sick if Luke could make epvp a dark mode theme
Would be much better if the website was IPboard instead of vbulletin..
forfeitsol is offline  
Old 04/01/2022, 11:22   #6




 
gotstyle's Avatar
 
elite*gold: 71
Join Date: Apr 2004
Posts: 7,153
Received Thanks: 3,072
Quote:
Originally Posted by ilikebacon View Post
Would be sick if Luke could make epvp a dark mode theme
Quote:
Originally Posted by forfeitsol View Post
Would be much better if the website was IPboard instead of vbulletin..
In the near future there will be something better than just a dark mode .
gotstyle is offline  
Thanks
11 Users
Old 04/01/2022, 15:55   #7
 
zerogott's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 2,265
Received Thanks: 556
Quote:
Originally Posted by gotstyle View Post
In the near future there will be something better than just a dark mode .
I hope its not a april fools joke or a blizz soon™
zerogott is offline  
Old 04/06/2022, 02:00   #8
 
Cooperjo77's Avatar
 
elite*gold: 0
Join Date: Dec 2021
Posts: 6
Received Thanks: 0
And i was confused why the site looked so shity... downloaded the reader a few days ago thanks for solving my issues
Cooperjo77 is offline  
Old 05/13/2022, 06:37   #9
 
elite*gold: 0
Join Date: Jan 2022
Posts: 32
Received Thanks: 9
I always use only dark themes where it is possible, it would be great if it was sewn into the functions of the site
Zubatque is offline  
Old 06/04/2022, 15:14   #10

 
JakeSeller's Avatar
 
elite*gold: 14
Join Date: Jan 2011
Posts: 84
Received Thanks: 10
I like the design very much, well done
JakeSeller is offline  
Old 09/06/2022, 19:42   #11
 
elite*gold: 123
Join Date: Mar 2016
Posts: 15
Received Thanks: 0
i like the looks very cool well done
Gepix is offline  
Old 10/18/2022, 16:30   #12
 
OldMunke's Avatar
 
elite*gold: 0
Join Date: Oct 2022
Posts: 3
Received Thanks: 0
My eyes thank you! I was getting such bad headaches...
OldMunke is offline  
Old 10/26/2022, 05:03   #13

 
wilvin0's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 464
Received Thanks: 88
lifesaver
wilvin0 is offline  
Old 10/26/2022, 15:34   #14

 
elite*gold: 2654
Join Date: Sep 2017
Posts: 140
Received Thanks: 98
Quote:
Originally Posted by OldMunke View Post
My eyes thank you! I was getting such bad headaches...
Quote:
Originally Posted by wilvin0 View Post
lifesaver
Should check this one out
Exit is offline  
Old 10/26/2022, 23:09   #15
 
Basizx's Avatar
 
elite*gold: 0
Join Date: Feb 2018
Posts: 56
Received Thanks: 16
Lifesaver, thank you so much for this!!
Basizx is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Selling] Steam Account /w Dark Souls, Dark Souls 2, Dark Souls 2: Scholar of the First Sin
05/27/2017 - Steam Trading - 1 Replies
Hallo, ich biete hier einen Account mit den im Titel genannten Spielen zum Verkauf an. Sämtliche Daten sind änderbar und Ihr seid die alleinigen Besitzer. Selbstverständlich helfe ich Euch bei der Änderung aller Daten und stehe Euch ebenfalls für Fragen zur Seite. Bitte mit realistischen Angeboten melden. Akzeptiert wird e'gold, Paypal und Banküberweisung.
Shadowgun Deadzone Trainer 1.0 - (Only for PC Mode )Ghost Mode - Fly Mode
07/26/2014 - Browsergames - 5 Replies
http://i61.tinypic.com/wlpw6e.jpg Open Shadowgun Trainer and open game . Easy to use. This trainer doesnt work very well on some maps .But its usefull :D
Shadowgun Deadzone Trainer 2.0 *Ghost Mode*Fly Mode* Walk and Shoot Through Wall Mode
07/24/2014 - Facebook - 18 Replies
http://www.hizliresimyukle.com/images/2014/07/03/2 0rqwjo.jpg http://www.hizliresimyukle.com/images/2014/07/03/ 25r12qw.jpg Ghost Mode You can use Ghoost Mode in every map. You cant shoot in ghost mode. Only you can kick players.
game mode 1, game mode 0???
03/12/2009 - Dekaron - 3 Replies
using shadow.txt does anyone know the difference between running the game in game mode one: " PackIO 1" or game mode 0 " PackIO 0"



All times are GMT +2. The time now is 21:49.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.