- Joined
- Sep 26, 2011
- Sythe Gold
- 616
- Messages
- 3,327
- Location
- The Moon
- Discord Unique ID
- 257740424829992960
Revisions are on their way, no worries.
The new one is alright - had a go at making an extension that replaces it with one of my choosing but Richard didn't bother putting an ID attribute for the logo or the div holding the background and it's a bitch to try and find the correct element without that.
Edit: I've given up. If you feel like it's important to make sythe extensible and feel like adding a class or id or name or anything else you can use document.getElementByXxx() with that'd be great.
function get_logo() {var all = document.getElementsByTagName("img"); for (var i = 0; i < all.length; i++) if (all[i].src.indexOf("header_new.png") != -1) return all[i];}
function get_bg() {var all = document.getElementsByTagName("img"); for (var i = 0; i < all.length; i++) if (all[i].src.indexOf("background.jpg") != -1) return all[i];}
I think it looks shit honestly. It makes sythe look like we're a guild website. So much less professional than before.
You can easily do this by using: document.getElementsByTagName("img")
Then simply loop through until you find the img tag with the correct src attribute.
Edit:
Here's some code to do it:
Code:function get_logo() {var all = document.getElementsByTagName("img"); for (var i = 0; i < all.length; i++) if (all[i].src.indexOf("header_new.png") != -1) return all[i];} function get_bg() {var all = document.getElementsByTagName("img"); for (var i = 0; i < all.length; i++) if (all[i].src.indexOf("background.jpg") != -1) return all[i];}