소스 검색

Hacked thickbox.js to load the right address for loadingAnimation.gif - prevents *many* file not found error logs

Yannick Warnier 14 년 전
부모
커밋
68bbe65f45
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      main/inc/lib/javascript/thickbox.js

+ 6 - 1
main/inc/lib/javascript/thickbox.js

@@ -5,7 +5,12 @@
  * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
 */
 
-var tb_pathToImage = "main/img/loadingAnimation.gif";
+// Identify the url of the current script to load the loadingAnimation.gif animation
+var src=document.getElementsByTagName('script');
+var src=src[src.length-1].getAttribute('src');
+// remove the inc/lib/javascript/thickbox.js part (30 characters)
+var src=src.substr(0,src.length-30);
+var tb_pathToImage = src+"img/loadingAnimation.gif";
 
 /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/