Fix for problems with CodePress and SilverStripe
Status: Beta
Brought to you by:
fermads
I use CodePress in Silverstripe and SilverStripe adds some parameters (i don't know why!) to script file names, i.e.:
<script type="text/javascript" src="http://localhost/workspace/silverstripe_local/code_page/3dparty/codepress/codepress.js?m=1242801432"></script>
CodePress don't find other JS-Files then because of the following line to get the file path:
CodePress.path = s[i].src.replace('codepress\.js','');
To fix that, you can maybe replace it by the following line:
CodePress.path = s[i].src.replace(/codepress\.js.*/,'');
Greetings, Paul