View previous topic :: View next topic |
Author |
Message |
Charkel How do I cheat?
Reputation: 0
Joined: 30 Jan 2021 Posts: 7
|
Posted: Sun Mar 14, 2021 1:30 pm Post subject: Tampermonkey script for White Theme CE.org |
|
|
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 |
|
 |
atom0s Moderator
Reputation: 204
Joined: 25 Jan 2006 Posts: 8580 Location: 127.0.0.1
|
Posted: Sun Mar 14, 2021 5:15 pm Post subject: |
|
|
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 |
|
 |
Charkel How do I cheat?
Reputation: 0
Joined: 30 Jan 2021 Posts: 7
|
Posted: Tue Mar 16, 2021 9:35 am Post subject: |
|
|
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
|
|
Back to top |
|
 |
Bunny_Wabbit Newbie cheater
Reputation: 0
Joined: 23 Sep 2017 Posts: 23 Location: United Kingdom
|
Posted: Fri Jun 04, 2021 7:29 am Post subject: |
|
|
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 |
|
 |
Charkel How do I cheat?
Reputation: 0
Joined: 30 Jan 2021 Posts: 7
|
Posted: Sun Sep 12, 2021 4:27 pm Post subject: |
|
|
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 Yeah it might not be the best way of doing it.
|
|
Back to top |
|
 |
Kinuzo How do I cheat?
Reputation: 0
Joined: 12 Jun 2011 Posts: 5 Location: Brazil
|
Posted: Mon Aug 22, 2022 4:46 am Post subject: |
|
|
Cool release brother.
I was almost getting blind with this gray background.
_________________
( ͠° ͟ʖ ͡°) |
|
Back to top |
|
 |
|