Highlight2Translate

By fredar Last update Jan 1, 2009 — Installed 5,180 times.

Small error

in
Subscribe to Small error 2 posts, 2 voices



JoeSimmons Scriptwright

I found a small error. The script still works (great job) but this is what I get in the error console...

Error: document.getElementsByTagName("body")[0] is undefined
Line: 10

I fixed it with just replacing that with document.body. Works great. Keep up the good work.

By the way, you should use xpath instead of getElementsByTagName, it's faster.

 
fredar Script's Author

thanks, I will modify the source code later

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel