We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5a40c0 commit 0f30e99Copy full SHA for 0f30e99
src/js/print/cut.ts
@@ -0,0 +1,18 @@
1
+const Selector = {
2
+ CUT_ROOT: '.yfm details.yfm-cut',
3
+};
4
+
5
+function openCuts() {
6
+ document.querySelectorAll(Selector.CUT_ROOT).forEach((element) => {
7
+ element.setAttribute('open', 'true');
8
+ element.classList.add('open');
9
+ });
10
+}
11
12
+if (typeof document !== 'undefined') {
13
+ window.addEventListener('load', () => {
14
+ openCuts();
15
16
17
18
+export {};
src/js/print/index.ts
@@ -1 +1,2 @@
import './table';
+import './cut';
0 commit comments