Planetarion Forums

Planetarion Forums (https://pirate.planetarion.com/index.php)
-   Planetarion Suggestions (https://pirate.planetarion.com/forumdisplay.php?f=95)
-   -   Clean up the HTML (https://pirate.planetarion.com/showthread.php?t=200923)

MrLobster 15 May 2015 08:58

New Skins / Clean up the HTML
 
Premise
As some of you may remember, I always miss the old skins from PA, and every once in a while I remake them for the current round. They never get used because of "reasons".

Here are a few screens.

https://www.dropbox.com/sh/4gyp3x7vl...HZN3AKQxa?dl=0

The CSS is not the best, as the html is a little backward in places.

The whole PA html needs a clean up and rewrite, some pages follow a "tab_container" class while others just use divs.

I would love to help PA crew to fix design issues, if your interested.

NOTE: the portal redesign was from a while ago so needs an update.

UPDATE #1:

Right then, so I think its in a good enough state that I will release it.

Word of warning, PA HTML is a little hap hazard, so dont expect miracles...

UPDATE #2:
Did a few house cleaning things to ready for the R3 skin, you may need to remove the old version and install again.

Update #3:
95% done on the Round 3 skin
Currently thinking of doing a few R6 skins, cathaar in particular.
Also will do a batch of cleaning up with the current skins, certain places font size go crazy.

installation:

1) Install TamperMonkey from the chrome webstore.

2) select one of the below (or both you can disable/enable at anytime, by clicking the tampermonkey icon)and it should load up the code into tampermonkey (less than 20 lines of code),.

3) You can now view the code to see that it has no spyware,etc, and click install.

4) Refresh the PA page and it should be using the new skin.

Note: If you have problems with the old skin flashing up, then change skin in the pa prefs to text only (you could increase the order that this script occurs too).

Mzyxptlk 15 May 2015 10:12

Re: Clean up the HTML
 
Until then, you could use a GreaseMonkey script to get rid of all CSS styling:

Code:

for (let s of document.querySelectorAll('style')) {
    s.parentNode.removeChild(s);
}
for (let t of document.querySelectorAll('[style]')) {
    t.removeAttribute('style');
}

Alternatively, use a stylesheet to reset all CSS values to their defaults before loading your stylesheet.

MrLobster 15 May 2015 12:25

Re: Clean up the HTML
 
Your code didnt work for me, however I did find tamper monkey code that just removed the "link" to the pa style sheet, then point to my own without needing stylish.

So now i'm redoing the CSS with a fresh canvas.

To use this skin should be as straight forward as downloading tampermonkey, and paste about 10 lines of code.

Still waiting on my hosting though, DNS change and all that.

Mzyxptlk 15 May 2015 13:33

Re: Clean up the HTML
 
Oh, sorry, 'let' is still only supported on Firefox. I keep forgetting. Replace 'let' with 'var', and it should work.

Anyway, using TamperMonkey/GreaseMonkey and pasting some Javascript is no easier or harder than using Stylish and pasting some CSS. And TM/GS is less safe to boot, because it can do a whole lot more than just inserting some CSS.

MrLobster 15 May 2015 14:04

Re: Clean up the HTML
 
TM is easier for me to host the CSS / images, and I can update+fix if the need arises.

But thanks for the help :)

MrLobster 26 May 2015 20:49

Re: Clean up the HTML
 
Posy added to the top.

Blue_Esper 27 May 2015 04:08

Re: Clean up the HTML
 
awesome! thanks heaps!

MrLobster 28 May 2015 17:01

Re: Clean up the HTML
 
Also if anyone wants to they can host it themselfs, I can copy it to a zip file and you just have to modify the script to point to a new location.

MrLobster 30 May 2015 22:19

Re: Clean up the HTML
 
Update #2

Zeke 26 Jul 2015 19:01

Re: Clean up the HTML
 
Awesome!!


All times are GMT +1. The time now is 10:51.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018