From 462706c64fc0729aac7adb785e671b5fdb3009de Mon Sep 17 00:00:00 2001 From: Karson Date: Tue, 28 Apr 2026 16:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4prettify=E9=AB=98=E4=BA=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tpl/think_exception.tpl | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl index 1033ecab..16a659ee 100644 --- a/tpl/think_exception.tpl +++ b/tpl/think_exception.tpl @@ -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; - } - }); - })();