Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Tampermonkey script for White Theme CE.org

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Web Development
View previous topic :: View next topic  
Author Message
Charkel
How do I cheat?
Reputation: 0

Joined: 30 Jan 2021
Posts: 7

PostPosted: Sun Mar 14, 2021 1:30 pm    Post subject: Tampermonkey script for White Theme CE.org Reply with quote

As you can see I am a new user of CE.org
My eyes was NOT pleased with trying to read black text on gray background.

So I made a quick Tampermonkey script to make it white.
Please note I do not know what I'm doing as I don't know javascript. But it works!

Please feel free to come with updates on the script.

Code:

// ==UserScript==
// @name         White Theme for CheatEngine.org
// @namespace    http://tampermonkey.net/
// @version      1
// @description  Feel free to change as you please
// @author       Charkel
// @match        *.cheatengine.org/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
var els = document.getElementsByTagName("*");
for(var i = 0, l = els.length; i < l; i++) {
  var el = els[i];
  el.innerHTML = el.innerHTML.replace(/939393/gi, 'ffffff');
  el.innerHTML = el.innerHTML.replace(/979797/gi, 'f2f2f2');
}
})();


Last edited by Charkel on Sun Sep 12, 2021 4:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8515
Location: 127.0.0.1

PostPosted: Sun Mar 14, 2021 5:15 pm    Post subject: Reply with quote

There are other extensions such as Stylebot, Stylus, etc. that will let you edit the CSS with a full-on editor with ease per-site that would be better suited for this kind of thing. TamperMonky and similar are fine, and work, but are more intended for major alterations/scripts than just CSS edits. It is also less performant to use a for loop like that. I'd suggest grabbing an extension specific to editing CSS instead.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Charkel
How do I cheat?
Reputation: 0

Joined: 30 Jan 2021
Posts: 7

PostPosted: Tue Mar 16, 2021 9:35 am    Post subject: Reply with quote

atom0s wrote:
There are other extensions such as Stylebot, Stylus, etc. that will let you edit the CSS with a full-on editor with ease per-site that would be better suited for this kind of thing. TamperMonky and similar are fine, and work, but are more intended for major alterations/scripts than just CSS edits. It is also less performant to use a for loop like that. I'd suggest grabbing an extension specific to editing CSS instead.

Nice idea should have thought of that.

But Tamper-/Greasemonkey is just so cool! I wanna learn more and saw my first project that was maybe actually doable Smile
Back to top
View user's profile Send private message
Bunny_Wabbit
Newbie cheater
Reputation: 0

Joined: 23 Sep 2017
Posts: 23
Location: United Kingdom

PostPosted: Fri Jun 04, 2021 7:29 am    Post subject: Reply with quote

Not bad! I've been toying around with Javascript too recently, trying to automate something on the platform we use for work, gave up though because for some reason the console wasn't detecting new elements.

You could try implementing a button at the top to toggle Dark Mode on or off!

I like your idea of selecting literally everything in the DOM and replacing every single instance of the two colours using Regex. There's probably a more formal way that doesn't require a loop, but hey it works!

Edit: Nevermind, just tried it in the console, it doesn't work, hah.
Back to top
View user's profile Send private message
Charkel
How do I cheat?
Reputation: 0

Joined: 30 Jan 2021
Posts: 7

PostPosted: Sun Sep 12, 2021 4:27 pm    Post subject: Reply with quote

Bunny_Wabbit wrote:
Not bad! I've been toying around with Javascript too recently, trying to automate something on the platform we use for work, gave up though because for some reason the console wasn't detecting new elements.

You could try implementing a button at the top to toggle Dark Mode on or off!

I like your idea of selecting literally everything in the DOM and replacing every single instance of the two colours using Regex. There's probably a more formal way that doesn't require a loop, but hey it works!

Edit: Nevermind, just tried it in the console, it doesn't work, hah.

Hah I was looking back on this and was like: Did I use a regex? I see no regex.
So I thought it might be an error and grabbed my script and replaced it. Still same color codes. What regex?

But the way it's made ofc it replaced the text in the codebox too so I didnt see the regex Laughing Laughing Laughing Laughing Yeah it might not be the best way of doing it.
Back to top
View user's profile Send private message
Kinuzo
How do I cheat?
Reputation: 0

Joined: 12 Jun 2011
Posts: 5
Location: Brazil

PostPosted: Mon Aug 22, 2022 4:46 am    Post subject: Reply with quote

Cool release brother.

I was almost getting blind with this gray background.

_________________
( ͠° ͟ʖ ͡°)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Web Development All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites