r1m / GSExtended

Grooveshark userscript
MIT License
11 stars 6 forks source link

Added support for external styles (from UserStyles.org). #10

Closed OrfeasZ closed 10 years ago

OrfeasZ commented 10 years ago

The script will now attempt to fix the styles and inject them manually.

I have also pointed Mullins' Transparent Black URL to the live, up-to-date, and maintained UserStyles version.

OrfeasZ commented 10 years ago

I should note that this has only been tested on Chrome, but it should function properly on Firefox as well.

r1m commented 10 years ago

I like the idea. But the merge is not correct, please fix it. Also you test if the css comes from userstyle then you don't you it, instead you use an hardcoded link to retrieve it.

OrfeasZ commented 10 years ago

My bad. Looks like I forgot to change the link back after testing it on my JS console. This should be fixed now.

However, what do you mean when you say that the 'merge is not correct'?

r1m commented 10 years ago

My code and yours got mixed. You add a style element and just after I add a link element.

OrfeasZ commented 10 years ago

Actually it doesn't. If you look at line 492 you'll notice that in the case that the style is detected as a userstyles style, your code is skipped since I return from the function.

Additionally, I've made sure that one doesn't overlap the other by changing your deletion selector to be based only on the element ID, and not the ID + type combination like it previously was.

OrfeasZ commented 10 years ago

I just pushed another commit converting indentation spaces to tabs in the added portion of code. Should help make the code a bit more readable on GitHub.

r1m commented 10 years ago

Sorry, I missed the 'return'. I was reading this on my phone. I will test your mod today.

r1m commented 10 years ago

I created a new function in GSXUtil instead of using inline code. I also added hotlink to Mullins Metro GS and updated parameters to include all GSX styles options.

r1m commented 10 years ago

Worst merge ever ;)