From fd0a662000ae32140ad76e14db2de995493c6913 Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Sun, 25 Sep 2022 14:34:30 +0800 Subject: =?UTF-8?q?:bug:=20Fix:=20Prism=20toolbar=20=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/matcha/matcha.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/matcha/matcha.js b/assets/matcha/matcha.js index 011d40a..86d6516 100644 --- a/assets/matcha/matcha.js +++ b/assets/matcha/matcha.js @@ -61,15 +61,15 @@ var prismLoad = function(){ pres[i].className = 'line-numbers';} Prism.highlightAll(true,null); } - Prism.plugins.toolbar.registerButton('copy', { - text: '', - onClick: function (env) { - var text = env.element.innerText; - navigator.clipboard.writeText(text); - toast('已将代码复制到剪切板'); - } - }); }; +Prism.plugins.toolbar.registerButton('copy', { + text: '', + onClick: function (env) { + var text = env.element.innerText; + navigator.clipboard.writeText(text); + toast('已将代码复制到剪切板'); + } +}); //jquery.lazy.js loader lazyloader = function(){ $('.lazy').Lazy({ -- cgit v1.2.3