移除prettify高亮代码

This commit is contained in:
Karson
2026-04-28 16:16:04 +08:00
parent 43e36f91ba
commit 462706c64f

View File

@@ -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(){
var files = $('.toggle');
var ol = $('ol', $('.prettyprint')[0]);
@@ -514,22 +504,6 @@
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>
<?php } ?>