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
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -56,8 +56,9 @@ var HTMLPreview = {
56
56
&&data.query
57
57
&&data.query.results
58
58
&&data.query.results.resources
59
-
&&data.query.results.resources.content){
60
-
this.content=data.query.results.resources.content.replace(/<head>/i,'<head><base href="'+this.folder()+'">').replace(/<\/body>/i,'<script src="http://'+location.hostname+'/htmlpreview.js"></script><script>HTMLPreview.replaceScripts();</script></body>');//Add <base> just after <head> and inject <script> just before </body>
59
+
&&data.query.results.resources.content
60
+
&&data.query.results.resources.status==200){
61
+
this.content=data.query.results.resources.content.replace(/<head>/i,'<head><base href="'+this.folder()+'">').replace(/<\/body>/i,'<script src="http://'+location.hostname+'/htmlpreview.min.js"></script><script>HTMLPreview.replaceScripts();</script></body>');//Add <base> just after <head> and inject <script> just before </body>
Copy file name to clipboardExpand all lines: index.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@
34
34
<h1>GitHub HTML Preview</h1>
35
35
<p>Enter the HTML file to preview: <inputtype="url" id="file" value="" placeholder="e.g. https://github.com/user/repo/blob/master/index.html" size="70"><inputtype="submit" value="»"></p>
36
36
<p>or prepend to the URL: <strong>http://htmlpreview.github.com/?</strong>https://github.com/twitter/bootstrap/blob/master/docs/index.html</p>
37
-
<pid="footer">Developed by <ahref="https://github.com/niutech">niu tech</a> | <ahref="https://github.com/htmlpreview/htmlpreview.github.com">Contribute on GitHub</a></p>
37
+
<pid="footer">Developed by <ahref="https://github.com/niutech">niu tech</a> | Contribute on <ahref="https://github.com/htmlpreview/htmlpreview.github.com">GitHub</a></p>
0 commit comments