Issue 103: File preview not working on IE8

(plus general JS cleaning)
This commit is contained in:
Nathan Adams 2015-09-22 22:17:05 -05:00
parent 6660c04333
commit 57cdccfb7d

View File

@ -173,7 +173,7 @@ $(document).ready(function(){
<script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script> <script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script>
<script type="text/javascript">prettyPrint();</script> <script type="text/javascript">prettyPrint();</script>
<script type="text/javascript" src="{media '/idf/js/allowtabs.js'}"></script> <script type="text/javascript" src="{media '/idf/js/allowtabs.js'}"></script>
<script type="application/javascript"> <script type="text/javascript">
{literal} {literal}
@ -186,10 +186,11 @@ $(document).ready(function(){
for(var i = 0; i < args.length; i++) for(var i = 0; i < args.length; i++)
result.push(args[i].replace('@', '/media/idf/js/syntaxhighlight/')); result.push(args[i].replace('@', '/media/idf/js/syntaxhighlight/'));
return result return result;
}; }
function gotoline()
{ function gotoline()
{
if ($('.number' + window.location.hash.substring(1)).first().offset() == null) if ($('.number' + window.location.hash.substring(1)).first().offset() == null)
{ {
window.setTimeout(gotoline, 100); window.setTimeout(gotoline, 100);
@ -197,7 +198,7 @@ function gotoline()
} }
$('html, body').animate({ $('html, body').animate({
scrollTop: ($('.number' + window.location.hash.substring(1)).first().offset().top) scrollTop: ($('.number' + window.location.hash.substring(1)).first().offset().top)
},500); },500);
changegutter(); changegutter();
} }
function changegutter() function changegutter()
@ -253,7 +254,7 @@ $(function() {
}); });