Hack Forums
Modern Purple Userscript - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88)
+---- Forum: Computing Lounge (https://hackforums.net/forumdisplay.php?fid=8)
+---- Thread: Modern Purple Userscript (/showthread.php?tid=5741345)



Modern Purple Userscript - Elitas - Oct 21, 2017

Hopefully this will stop people getting mad over the Purple Theme getting deleted lol.

I decided to spend a few minutes creating this script (more edits to be added soon, keep looking at this thread).

At the moment it replaces the logo with the halloween one and make the background the same as the modern purple one.

Will be changing the colors to be the same as modern purple, just need the hex code for it. :/

Requires: Tampermonkey/Greacemonkey.

Script:

Code
// ==UserScript==
// @name        Modern Purple
// @namespace   Elitas@HF
// @description Modern Purple Theme On Hack Forums
// @include     https://hackforums.net/*.php*
// @include     https://hackforums.net/
// @exclude     https://hackforums.net/apikey.php
// @version     1.0.0
// @grant       none
// ==/UserScript==

var image = document.querySelector("body");
image.style.backgroundImage = "url(https://hackforums.net/images/modern_pl/mosaic.png)";

let lookup_table = {
    'https://hackforums.net/images/avatars/Oldskool/OldskoolHF8.png': 'https://hackforums.net/images/logo.halloween-2017.png',
};

for (let image of document.getElementsByTagName('img')) {
    for (let query in lookup_table) {
        if (image.src == query) {
            image.src = lookup_table[query];
        }
    }
}

Any suggestions/recommendations would be appreciated. 🤝

Preview (Click to View)


* - Arrogance - Oct 21, 2017

The boss working to change the site and the users working to revert the changes in client-side fashion, jesus christ.


* - Armada - Oct 21, 2017

(Oct 21, 2017 11:46 AM)Arrogance Wrote:  The boss working to change the site and the users working to revert the changes in client-side fashion, jesus christ.

Sounds about right lol


* - Elitas - Oct 21, 2017

(Oct 21, 2017 11:46 AM)Arrogance Wrote:  The boss working to change the site and the users working to revert the changes in client-side fashion, jesus christ.

(Oct 21, 2017 11:48 AM)Armada Wrote:  Sounds about right lol

I'm all for change, and fully support what Omniscient is doing.

I only made this to stop people from getting mad over the changes he is doing, so that he can work in peace. If he doesn't appreciate it then I'll happily remove the thread.


* - Cylow - Oct 21, 2017

Please add a preview to the thread. Thanks for making this though. Will check it out tomorrow.


* - Elitas - Oct 21, 2017

(Oct 21, 2017 11:51 AM)Cylow Wrote:  Please add a preview to the thread. Thanks for making this though. Will check it out tomorrow.

Is there really a need for a preview? I think most of us know what modern purple looks like.

I'll add one anyway.


* - oRequiem - Oct 21, 2017

Pretty cool for you to make, well done my friend.
Hopefully it does make all the drama bs stop lol.


* - Riggs - Oct 21, 2017

(Oct 21, 2017 11:46 AM)Arrogance Wrote:  The boss working to change the site and the users working to revert the changes in client-side fashion, jesus christ.

Given the nature of the site, this doesn't really surprise me.


* - Bαker - Oct 21, 2017

Wrong Section - https://hackforums.net/forumdisplay.php?fid=247

Just an FYI.


* - Elitas - Oct 21, 2017

(Oct 21, 2017 11:55 AM)Riggs Wrote:  Given the nature of the site, this doesn't really surprise me.

Tbh, I was expecting a different response for this. I was getting bored of reading people giving out over the changes and thought this would solve it.

(Oct 21, 2017 11:56 AM)Bαker Wrote:  Wrong Section - https://hackforums.net/forumdisplay.php?fid=247

Just an FYI.

Yes, I noticed that. I had the lounge open because I was planning on creating a thread and got the 2 mixed up. Oh well.


* - Horus God - Oct 21, 2017

Thanks for doing this, works for me.


* - Grey - Oct 21, 2017

(Oct 21, 2017 11:46 AM)Arrogance Wrote:  The boss working to change the site and the users working to revert the changes in client-side fashion, jesus christ.

I really don't see the problem here. Userscripts have always been around and these are purely cosmetic changes.


* - Zexo - Oct 21, 2017

(Oct 21, 2017 11:46 AM)Arrogance Wrote:  The boss working to change the site and the users working to revert the changes in client-side fashion, jesus christ.

It's a technology forum what do you expect?


* - Elitas - Oct 21, 2017

Just updated the script for the last time. If there is a stronger interest from the community, then I may consider fixing it up to appear more like the Modern Purple theme.


RE: Modern Purple Userscript - Elitas - Oct 23, 2017

(Oct 22, 2017 07:48 PM)xadamxk Wrote:  On a side note, it isnt working for me.

Yes, the hooks I used to have set were changed with this new theme. Will wait to see where Omni goes in terms of the theme before changing it again.