PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.2.4
Code Block Pro – Beautiful Syntax Highlighting v1.2.4
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
← All changes | src/front/front.js +0 -22 1.5.0 → 1.2.4 View file →
@@ -1,7 +1,6 @@
1 1 import copy from 'copy-to-clipboard';
2 2
3 -// Handle copy button
4 3 addEventListener('DOMContentLoaded', () => {
5 4 const buttons = Array.from(
6 5 document.querySelectorAll('.code-block-pro-copy-button'),
7 6 );
@@ -17,27 +16,6 @@
17 16 setTimeout(() => {
18 17 b.classList.remove('copying');
19 18 }, 1000);
20 19 });
21 - });
22 -});
23 -
24 -// Handle font loading
25 -addEventListener('DOMContentLoaded', () => {
26 - if (!window.codeBlockPro?.pluginUrl) return;
27 - const fontsToLoad = new Set(
28 - Array.from(
29 - document.querySelectorAll('[data-code-block-pro-font-family]') ??
30 - [],
31 - )
32 - .map((f) => f.dataset.codeBlockProFontFamily)
33 - .filter(Boolean),
34 - );
35 - [...fontsToLoad].forEach(async (fontName) => {
36 - const font = new FontFace(
37 - fontName,
38 - `url(${window.codeBlockPro.pluginUrl}/build/fonts/${fontName}.woff2)`,
39 - );
40 - await font.load();
41 - document.fonts.add(font);
42 20 });
43 21 });