You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: htmlpreview.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ var HTMLPreview = {
27
27
if(href.indexOf('#')>0){//Check if it's an anchor
28
28
a[i].href='http://'+location.hostname+location.pathname+location.search+'#'+a[i].hash.substring(1);//Then rewrite URL with support for empty anchor
29
29
}
30
-
elseif(href.indexOf('//raw.githubusercontent.com')>0||href.indexOf('//bitbucket.org')>0){//Check if it's from raw.github.com or bitbucket.org
30
+
elseif((href.indexOf('//raw.githubusercontent.com')>0||href.indexOf('//bitbucket.org')>0)&&(href.indexOf('.html')>0||href.indexOf('.htm')>0)){//Check if it's from raw.github.com or bitbucket.org and to HTML files
31
31
a[i].href='http://'+location.hostname+location.pathname+'?'+href;//Then rewrite URL so it can be loaded using YQL
0 commit comments