mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
移除prettify高亮代码
This commit is contained in:
@@ -490,16 +490,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$.getScript = function(src, func){
|
|
||||||
var script = document.createElement('script');
|
|
||||||
|
|
||||||
script.async = 'async';
|
|
||||||
script.src = src;
|
|
||||||
script.onload = func || function(){};
|
|
||||||
|
|
||||||
$('head')[0].appendChild(script);
|
|
||||||
}
|
|
||||||
|
|
||||||
;(function(){
|
;(function(){
|
||||||
var files = $('.toggle');
|
var files = $('.toggle');
|
||||||
var ol = $('ol', $('.prettyprint')[0]);
|
var ol = $('ol', $('.prettyprint')[0]);
|
||||||
@@ -514,22 +504,6 @@
|
|||||||
this.innerHTML = title;
|
this.innerHTML = title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置出错行
|
|
||||||
var err_line = $('.line-' + LINE, ol[0])[0];
|
|
||||||
err_line.className = err_line.className + ' line-error';
|
|
||||||
|
|
||||||
$.getScript('//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/prettify/r298/prettify.min.js', function(){
|
|
||||||
prettyPrint();
|
|
||||||
|
|
||||||
// 解决Firefox浏览器一个很诡异的问题
|
|
||||||
// 当代码高亮后,ol的行号莫名其妙的错位
|
|
||||||
// 但是只要刷新li里面的html重新渲染就没有问题了
|
|
||||||
if(window.navigator.userAgent.indexOf('Firefox') >= 0){
|
|
||||||
ol[0].innerHTML = ol[0].innerHTML;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user