Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.17k stars 416 forks source link

Error when scripts @requires a script containing a CDATA block #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install a script that @requires another script which contains a CDATA block
2. try to get the script to run on the intended page, some random story on 
fanfiction.net will do
3. receive an "Unexpected token ILLEGAL" error

What is the expected output? What do you see instead?
The script should work without errors, instead it doesn't even start running. 
It errors at the @require line.

What version of the product are you using? On what operating system?
Tampermonkey Beta 2.5.62 on Chrome 21.0.1180.60 beta-m

Please provide any additional information below.
Tampermonkey should probably check if required scripts need compatibility 
options before running them (especially if the parent script also needs them), 
but I guess the above error kinda makes that obvious.
In the case of this script you can get it to work by deleting the @require 
line, but you'll lose the update functionality (that might not even work in 
Chrome; I wouldn't know as there's no way to test).

Original issue reported on code.google.com by Asteagui...@googlemail.com on 3 Aug 2012 at 9:43

GoogleCodeExporter commented 9 years ago
Wow, I think I forgot to include the link to the script with the reported 
problem.
I just noticed because I came to report that you'll either have to use an older 
version (because the script now uses GM based updating) or find an 
alternative/write your own testscript.
Still, for reference, here's the link:
http://userscripts.org/scripts/show/102342

Original comment by Asteagui...@googlemail.com on 7 Aug 2012 at 11:56

GoogleCodeExporter commented 9 years ago

Original comment by derj...@googlemail.com on 9 Aug 2012 at 3:58

GoogleCodeExporter commented 9 years ago
TM beta 2.6.83 now has an option to choose whether the compatibility options 
should be applied to the required scripts as well (defaults to true).

Original comment by derj...@googlemail.com on 17 Sep 2012 at 3:46