Other scripts fail after including my one

in Script development
Subscribe to Other scripts fail after including my one 5 posts, 3 voices



Visher User
ChromeWindows

Hello guys.
I've created a simple script that replaces CSS with my one and replace some text in website's HTML.

First part doesn't causes any problem, but when I'm adding second part (10th line only) most of page's scripts fails (like drop-down menu, time counters etc.)

whole script is:
http://pastebin.com/dkHy7wqX

What causes this problem?
Thanks in advice.

 
devnull69 Scriptwright
FirefoxWindows

Are you kidding? Your script disables all the CSS <link rel="stylesheet"> elements. What do you expect? It will kill all the functionality that depends on external CSS rules ...

 
Visher User
ChromeWindows

Yea dude, but it implements another stylesheet (I've used 100% same for testing) that WORKS. Problem is when I add 10th line, without that line it 100% works.

 
mike cupcake Scriptwright
FirefoxMacintosh

Try using Firebug to look at the modified page code after your script has run, is a good first step in troubleshooting.

Or use getElementsByClassName and .style.width to make the change instead of innerHTML .replace as there's no chance of messing up the HTML then.

 
Visher User
ChromeWindows

Using that way, it works. thanks