Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add ability in htc to override the js resource path, useful for debug…

…ging purposes.
  • Loading branch information...
commit 9d84290e40fc0aa7a85f0477508b474af06c1890 1 parent e56857e
@lojjic authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 sources/htc_script.js
View
10 sources/htc_script.js
@@ -29,8 +29,14 @@ if ( !window[ 'PIE' ] && docMode < 10 ) {
tester.innerHTML = '<!--[if IE 6]><i></i><![endif]-->';
isIE6 = tester.getElementsByTagName('i')[0];
- // Look for a custom -pie-load-path, or fall back to the CDN url
- baseUrl = doc.documentElement.currentStyle.getAttribute( ( isIE6 ? '' : '-' ) + 'pie-load-path' );
+ // Look for a custom -pie-load-path in the url or the css, or fall back to the CDN url
+ baseUrl = doc.location.href.match(/pie-load-path=([^&]+)/);
+ if( baseUrl ) {
+ baseUrl = decodeURIComponent(baseUrl[1]);
+ }
+ if( !baseUrl ) {
+ baseUrl = doc.documentElement.currentStyle.getAttribute( ( isIE6 ? '' : '-' ) + 'pie-load-path' );
+ }
if( baseUrl ) {
baseUrl = baseUrl.replace(/^("|')|("|')$/g, '');
baseUrls = [ baseUrl ];
Please sign in to comment.
Something went wrong with that request. Please try again.