spec-up-t 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/assets/compiled/body.js +9 -9
  2. package/assets/compiled/head.css +6 -5
  3. package/assets/css/collapse-definitions.css +41 -0
  4. package/assets/css/create-pdf.css +339 -0
  5. package/assets/css/horizontal-scroll-hint.css +6 -0
  6. package/assets/css/image-full-size.css +1 -5
  7. package/assets/css/index.css +5 -0
  8. package/assets/css/search.css +8 -8
  9. package/assets/css/terms-and-definitions.css +3 -3
  10. package/assets/js/add-bootstrap-classes-to-images.js +2 -5
  11. package/assets/js/collapse-definitions.js +260 -34
  12. package/assets/js/collapse-meta-info.js +37 -10
  13. package/assets/js/collapsibleMenu.js +0 -24
  14. package/assets/js/create-term-filter.js +36 -18
  15. package/assets/js/hide-show-utility-container.js +0 -1
  16. package/assets/js/horizontal-scroll-hint.js +2 -2
  17. package/assets/js/image-full-size.js +0 -2
  18. package/assets/js/insert-trefs.js +135 -49
  19. package/assets/js/search.js +34 -20
  20. package/{src → config}/asset-map.json +1 -0
  21. package/gulpfile.js +1 -1
  22. package/index.js +3 -3
  23. package/jest.config.js +20 -0
  24. package/package.json +3 -2
  25. package/src/collectExternalReferences/fetchTermsFromIndex.1.js +340 -0
  26. package/src/collectExternalReferences/fetchTermsFromIndex.js +1 -1
  27. package/src/collectExternalReferences/processXTrefsData.js +1 -1
  28. package/src/create-pdf.js +330 -21
  29. package/src/health-check/{output-gitignore-checker.js → destination-gitignore-checker.js} +40 -25
  30. package/src/health-check.js +38 -38
  31. package/src/markdown-it-extensions.js +2 -2
  32. package/src/utils/README.md +35 -0
  33. package/src/utils/file-opener.js +89 -0
  34. package/assets/css/pdf-styles.css +0 -170
  35. package/branches.md +0 -17
  36. package/src/README.md +0 -98
  37. /package/{src/config → config}/paths.js +0 -0
@@ -1,52 +1,278 @@
1
+ /**
2
+ * @fileoverview Manages collapsible definition lists with visual state indicators.
3
+ * @author Kor Dwarshuis
4
+ * @version 1.0.0
5
+ * @description This module provides functionality to toggle the visibility
6
+ * of definition descriptions in a document with a smooth user experience.
7
+ * It creates interactive buttons with three toggle states and prevents
8
+ * UI jumping during transitions using fixed positioning and requestAnimationFrame.
9
+ * @requires insert-trefs.js - For the initializeOnTrefsInserted helper function
10
+ */
11
+
12
+ /**
13
+ * Sets up collapsible definition lists with toggle buttons.
14
+ * Handles the creation of buttons, event listeners, and visibility states.
15
+ * This is the main initialization function that's called when the DOM is ready
16
+ * and all transcluded references have been inserted.
17
+ * @function
18
+ * @see initializeOnTrefsInserted - Helper function that ensures this runs at the right time
19
+ */
1
20
  function collapseDefinitions() {
2
- const dds = document.querySelectorAll('#content dl.terms-and-definitions-list > dd');
3
- const dts = document.querySelectorAll('#content dl.terms-and-definitions-list > dt');
4
- const buttons = document.querySelectorAll('.collapse-all-defs-button');
21
+ /**
22
+ * Queries and categorizes definition list elements in the DOM.
23
+ * @function
24
+ * @returns {Object} Object containing categorized DOM element collections
25
+ * @returns {NodeList} returns.dds - All definition descriptions
26
+ * @returns {NodeList} returns.dts - All definition terms
27
+ * @returns {Array<Element>} returns.regularDds - Standard definition descriptions
28
+ * @returns {Array<Element>} returns.specialDds - Special definition descriptions (e.g., "See also", "Source")
29
+ */
30
+ function queryElements() {
31
+ const dds = document.querySelectorAll('#content dl.terms-and-definitions-list > dd');
32
+ const dts = document.querySelectorAll('#content dl.terms-and-definitions-list > dt');
33
+ const regularDds = Array.from(dds).filter(dd => !isSpecialDefinition(dd.textContent.trim()));
34
+ const specialDds = Array.from(dds).filter(dd => isSpecialDefinition(dd.textContent.trim()));
35
+
36
+ return { dds, dts, regularDds, specialDds };
37
+ }
38
+
39
+ let { dds, dts, regularDds, specialDds } = queryElements();
40
+ const buttonTitleText = 'Change how much info is shown';
41
+
42
+ /**
43
+ * Determines if a definition is a special type (e.g., a "See also" or "Source" note)
44
+ * @param {string} content - The content of the definition to check
45
+ * @returns {boolean} True if the content starts with a special prefix
46
+ */
47
+ function isSpecialDefinition(content) {
48
+ const definitionHidePrefixes = [
49
+ "Source",
50
+ "See also",
51
+ "More in",
52
+ "Also see",
53
+ "See:",
54
+ "See also",
55
+ "See more",
56
+ "See more in",
57
+ "See more about",
58
+ "See more on",
59
+ "See more at",
60
+ "More:",
61
+ "Supporting definitions:"
62
+ ];
63
+ return definitionHidePrefixes.some(prefix => content.startsWith(prefix));
64
+ }
65
+
66
+ specialDds.forEach(dd => {
67
+ dd.classList.add('terms-def-extra-info');
68
+ });
5
69
 
70
+ /**
71
+ * Toggles the visibility state of definitions across the document.
72
+ * Cycles through three visibility states:
73
+ * - State 0: All definitions hidden
74
+ * - State 1: Only regular definitions visible
75
+ * - State 2: All definitions visible
76
+ *
77
+ * Updates UI indicators to reflect the current state.
78
+ * @function
79
+ */
6
80
  function toggleVisibility() {
7
- const isHidden = dds[0].classList.contains('hidden');
8
- dds.forEach(dd => {
9
- dd.classList.toggle('hidden', !isHidden);
10
- dd.classList.toggle('visible', isHidden);
11
- });
12
- buttons.forEach(button => {
13
- button.innerHTML = isHidden ? '▲' : '▼';
14
- button.title = isHidden ? 'Collapse all definitions' : 'Expand all definitions';
81
+ const buttons = document.querySelectorAll('.collapse-all-defs-button');
82
+ const currentState = parseInt(buttons[0].dataset.state || 0);
83
+ // Cycle through 3 states: 0 (all hidden), 1 (only regular visible), 2 (all visible)
84
+ const newState = (currentState + 1) % 3;
85
+
86
+ // Update state based on newState
87
+ switch (newState) {
88
+ case 0: // All definitions hidden
89
+ dds.forEach(dd => {
90
+ dd.classList.add('hidden');
91
+ dd.classList.remove('visible');
92
+ });
93
+ buttons.forEach(button => {
94
+ button.dataset.state = 0;
95
+ button.title = 'Show basic definitions';
96
+ // Update which state indicator is active
97
+ button.querySelectorAll('.state-indicator').forEach(indicator => {
98
+ if (parseInt(indicator.dataset.state) === 0) {
99
+ indicator.classList.add('active');
100
+ } else {
101
+ indicator.classList.remove('active');
102
+ }
103
+ });
104
+ });
105
+ document.querySelector('html').classList.add('defs-hidden');
106
+ break;
107
+
108
+ case 1: // Only regular definitions visible
109
+ regularDds.forEach(dd => {
110
+ dd.classList.remove('hidden');
111
+ dd.classList.add('visible');
112
+ });
113
+ specialDds.forEach(dd => {
114
+ dd.classList.add('hidden');
115
+ dd.classList.remove('visible');
116
+ });
117
+ buttons.forEach(button => {
118
+ button.dataset.state = 1;
119
+ button.title = 'Show all definitions';
120
+ // Update which state indicator is active
121
+ button.querySelectorAll('.state-indicator').forEach(indicator => {
122
+ if (parseInt(indicator.dataset.state) === 1) {
123
+ indicator.classList.add('active');
124
+ } else {
125
+ indicator.classList.remove('active');
126
+ }
127
+ });
128
+ });
129
+ document.querySelector('html').classList.remove('defs-hidden');
130
+ break;
131
+
132
+ case 2: // All definitions visible
133
+ dds.forEach(dd => {
134
+ dd.classList.remove('hidden');
135
+ dd.classList.add('visible');
136
+ });
137
+ specialDds.forEach(dd => {
138
+ dd.classList.add('terms-def-extra-info');
139
+ });
140
+ buttons.forEach(button => {
141
+ button.dataset.state = 2;
142
+ button.title = 'Hide all definitions';
143
+ // Update which state indicator is active
144
+ button.querySelectorAll('.state-indicator').forEach(indicator => {
145
+ if (parseInt(indicator.dataset.state) === 2) {
146
+ indicator.classList.add('active');
147
+ } else {
148
+ indicator.classList.remove('active');
149
+ }
150
+ });
151
+ });
152
+ document.querySelector('html').classList.remove('defs-hidden');
153
+ break;
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Creates and appends toggle buttons to all definition terms.
159
+ * Each button contains state indicators for the three visibility states,
160
+ * and is initialized to show all definitions (state 2).
161
+ * @function
162
+ */
163
+ function addButtons() {
164
+ dts.forEach(dt => {
165
+ // Check if button already exists to avoid duplicates
166
+ if (dt.querySelector('.collapse-all-defs-button')) {
167
+ return; // Skip if button already exists
168
+ }
169
+
170
+ const button = document.createElement('button');
171
+ button.classList.add('collapse-all-defs-button', 'btn-outline-secondary', 'd-print-none', 'btn', 'p-0', 'fs-5', 'd-flex', 'align-items-center', 'justify-content-center');
172
+ // Create a container for all three state indicators
173
+ button.innerHTML = `<span class="state-indicator" data-state="0">①</span><span class="state-indicator" data-state="1">②</span><span class="state-indicator" data-state="2">③</span>`;
174
+ button.setAttribute('id', 'toggleButton');
175
+ button.setAttribute('title', buttonTitleText);
176
+ button.setAttribute('data-state', '2'); // Start with all definitions visible
177
+
178
+ // Set initial active state
179
+ button.querySelector('.state-indicator[data-state="2"]').classList.add('active');
180
+
181
+ dt.appendChild(button);
15
182
  });
16
- document.querySelector('html').classList.toggle('defs-hidden');
17
183
  }
18
184
 
19
- // Add button as last child of every <dl>
20
- dts.forEach(dt => {
21
- const button = document.createElement('button');
22
- button.classList.add('collapse-all-defs-button', 'd-print-none', 'btn', 'p-0', 'fs-5', 'd-flex', 'align-items-center','justify-content-center');
23
- button.innerHTML = '▲';
24
- button.setAttribute('id', 'toggleButton');
25
- dt.appendChild(button);
26
- });
185
+ // Initial button setup
186
+ addButtons();
27
187
 
28
- // Via event delegation add event listener to every .collapse-all-defs-button element
188
+ /**
189
+ * Handles click events on definition toggle buttons and their state indicators.
190
+ * Uses advanced positioning techniques to prevent UI jumping during transitions:
191
+ * 1. Temporarily fixes the button's position using position:fixed during DOM updates
192
+ * 2. Uses requestAnimationFrame for optimal timing of position restoration
193
+ * 3. Precisely adjusts scroll position to maintain visual stability
194
+ *
195
+ * This prevents the visual disruption that would otherwise occur when expanding
196
+ * or collapsing definitions causes layout reflow.
197
+ *
198
+ * @param {Event} event - The DOM click event
199
+ */
29
200
  document.addEventListener('click', event => {
30
- if (event.target.classList.contains('collapse-all-defs-button')) {
31
- toggleVisibility();
201
+ // Check if the click is on a state-indicator or the button itself
202
+ if (event.target.classList.contains('collapse-all-defs-button') ||
203
+ event.target.classList.contains('state-indicator')) {
204
+ // Get the button element (whether clicked directly or via child)
205
+ const button = event.target.classList.contains('collapse-all-defs-button') ?
206
+ event.target :
207
+ event.target.closest('.collapse-all-defs-button');
32
208
 
33
- event.target.scrollIntoView({
34
- behavior: 'smooth',
35
- block: 'start',
36
- inline: 'nearest'
37
- });
209
+ // Find the parent dt and dl elements
210
+ const dtElement = button.closest('dt');
211
+
212
+ // Get button's position in viewport and page
213
+ const buttonRect = button.getBoundingClientRect();
38
214
 
39
- // Adjust the scroll position by 100px smoothly
215
+ // Apply a class to prevent layout shifts during transition
216
+ document.documentElement.classList.add('definitions-transitioning');
217
+
218
+ /**
219
+ * Button position anchoring technique:
220
+ * 1. Fix the button in its current viewport position to ensure
221
+ * it doesn't move during DOM reflow
222
+ * 2. Apply fixed positioning with the exact same coordinates
223
+ * 3. After DOM changes, restore normal positioning and adjust scroll
224
+ */
225
+ button.style.position = 'fixed';
226
+ button.style.top = `${buttonRect.top}px`;
227
+ button.style.right = `${window.innerWidth - buttonRect.right}px`;
228
+ button.style.zIndex = '1000';
229
+
230
+ // Add highlight effect
231
+ dtElement.classList.add('highlight');
40
232
  setTimeout(() => {
41
- window.scrollBy({
42
- top: -100,
43
- behavior: 'smooth'
233
+ dtElement.classList.remove('highlight');
234
+ }, 0);
235
+
236
+ // Toggle visibility which might change layout
237
+ toggleVisibility();
238
+
239
+ /**
240
+ * Visual stability restoration:
241
+ * Use requestAnimationFrame to restore normal positioning at the optimal time
242
+ * after DOM updates, when the browser is ready to paint the next frame.
243
+ * This provides better timing than setTimeout for visual operations.
244
+ */
245
+ requestAnimationFrame(() => {
246
+ // Remove fixed positioning
247
+ button.style.position = '';
248
+ button.style.top = '';
249
+ button.style.right = '';
250
+ button.style.zIndex = '';
251
+
252
+ // Remove the transitioning class
253
+ document.documentElement.classList.remove('definitions-transitioning');
254
+
255
+ // Scroll to correct position so the button appears where it was fixed
256
+ const newButtonRect = button.getBoundingClientRect();
257
+
258
+ // Calculate and apply precise scroll adjustment to maintain visual position
259
+ window.scrollTo({
260
+ top: window.scrollY + (newButtonRect.top - buttonRect.top),
261
+ behavior: 'instant'
44
262
  });
45
- }, 500); // Delay to ensure the initial scrollIntoView completes
263
+ });
46
264
  }
47
265
  });
48
266
  }
49
267
 
268
+ /**
269
+ * Initialize the collapsible definitions functionality when the DOM is fully loaded.
270
+ * We listen for a custom event from insert-trefs.js to know exactly when all
271
+ * external references have been inserted into the DOM.
272
+ * @listens DOMContentLoaded - Standard DOM event fired when initial HTML document is completely loaded
273
+ * @listens trefs-inserted - Custom event fired by insert-trefs.js when all term references are processed
274
+ * @see initializeOnTrefsInserted - Helper function that manages initialization timing
275
+ */
50
276
  document.addEventListener("DOMContentLoaded", function () {
51
- collapseDefinitions();
277
+ initializeOnTrefsInserted(collapseDefinitions);
52
278
  });
@@ -5,25 +5,30 @@
5
5
  * @since 2025-02-16
6
6
  */
7
7
 
8
- // Function to create the toggle button
8
+ /**
9
+ * Creates a toggle button for collapsible meta information sections.
10
+ * @function createToggleButton
11
+ * @param {HTMLElement} element - The DD element that contains the meta information
12
+ * @returns {void}
13
+ */
9
14
  function createToggleButton(element) {
10
15
  const toggleButton = document.createElement('button');
11
16
  toggleButton.classList.add('meta-info-toggle-button', 'btn');
12
17
  toggleButton.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16" style="shape-rendering: geometricPrecision;">' +
13
18
  '<path fill-rule="evenodd" d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>' +
14
- '<path d="M8.93 6.588l-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588z"/>' +
19
+ '<path d="M8.93 6.588l-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588z"/>' +
15
20
  '<path d="M9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>' +
16
- '</svg>';
21
+ '</svg>';
17
22
  toggleButton.title = 'Meta info';
18
23
 
19
24
  // Add event listener to the button
20
- toggleButton.addEventListener('click', function(e) {
25
+ toggleButton.addEventListener('click', function (e) {
21
26
  e.preventDefault();
22
27
  e.stopPropagation();
23
-
28
+
24
29
  // Get the wrapper containing the meta info
25
30
  const isCollapsed = element.classList.contains('collapsed');
26
-
31
+
27
32
  // Toggle the collapsed state
28
33
  if (isCollapsed) {
29
34
  // If collapsed, expand it
@@ -49,14 +54,20 @@ function createToggleButton(element) {
49
54
  }
50
55
  }
51
56
 
52
- // Find all elements with class 'collapsible' and make them collapsible
53
- document.addEventListener('DOMContentLoaded', function() {
57
+
58
+ /**
59
+ * Finds all description list items (dd) that contain tables and makes them collapsible.
60
+ * Adds necessary wrapper elements and toggle buttons to create the collapsible UI.
61
+ * @function collapseMetaInfo
62
+ * @returns {void}
63
+ */
64
+ function collapseMetaInfo() {
54
65
  const collapsibles = document.querySelectorAll('dl > dd:has(table)');
55
66
 
56
- collapsibles.forEach(function(element) {
67
+ collapsibles.forEach(function (element) {
57
68
  // Add meta-info-content-wrapper class
58
69
  element.classList.add('meta-info-content-wrapper');
59
-
70
+
60
71
  // Wrap content in a div for proper spacing
61
72
  const wrapper = document.createElement('div');
62
73
  wrapper.classList.add('meta-info-inner-wrapper');
@@ -75,4 +86,20 @@ document.addEventListener('DOMContentLoaded', function() {
75
86
  // Collapse by default on load
76
87
  element.classList.add('collapsed');
77
88
  });
89
+ }
90
+
91
+
92
+ /**
93
+ * Initialize the collapse meta info functionality when the DOM is fully loaded.
94
+ * We use the initializeOnTrefsInserted helper from insert-trefs.js to ensure our
95
+ * functionality runs at the right time - either after all external references have
96
+ * been inserted, or after a timeout if the event isn't triggered.
97
+ *
98
+ * @listens DOMContentLoaded - Initial event when DOM is ready
99
+ * @listens trefs-inserted - Custom event from insert-trefs.js when all external references are inserted
100
+ * @see initializeOnTrefsInserted - Helper function that manages initialization timing
101
+ */
102
+ document.addEventListener("DOMContentLoaded", function () {
103
+ initializeOnTrefsInserted(collapseMetaInfo);
78
104
  });
105
+
@@ -98,35 +98,11 @@ function initCollapsibleMenu() {
98
98
  }
99
99
  }
100
100
  });
101
-
102
- console.log('Collapsible menu initialized with accessibility improvements');
103
- }
104
-
105
- // Log TOC structure to help debugging
106
- function logTOCStructure() {
107
- const tocContainer = document.getElementById('toc');
108
- if (tocContainer) {
109
- console.log('TOC container found:', tocContainer);
110
- console.log('TOC container children:', tocContainer.children);
111
- const firstUL = tocContainer.querySelector('ul');
112
- if (firstUL) {
113
- console.log('First UL found:', firstUL);
114
- console.log('UL class list:', firstUL.classList);
115
- const listItems = firstUL.querySelectorAll('li');
116
- console.log('List items count:', listItems.length);
117
- } else {
118
- console.warn('No UL found in TOC container');
119
- }
120
- } else {
121
- console.warn('TOC container not found');
122
- }
123
101
  }
124
102
 
125
103
  // Run after DOM is fully loaded
126
104
  document.addEventListener('DOMContentLoaded', () => {
127
105
  initCollapsibleMenu();
128
- // Log the TOC structure for debugging
129
- logTOCStructure();
130
106
  });
131
107
 
132
108
  // Re-initialize when highlighting changes
@@ -16,7 +16,6 @@ function createTermFilter() {
16
16
  return;
17
17
  }
18
18
 
19
-
20
19
  const terminologySectionUtilityContainer = document.getElementById("terminology-section-utility-container");
21
20
 
22
21
  // Create checkboxes container
@@ -43,27 +42,46 @@ function createTermFilter() {
43
42
  </label>
44
43
  `;
45
44
 
46
- // Add event listeners to checkboxes
47
- localTermsCheckboxDiv.querySelector('#showLocalTermsCheckbox').addEventListener('change', function(event) {
45
+ // Append checkboxes to container
46
+ checkboxesContainer.appendChild(localTermsCheckboxDiv);
47
+ checkboxesContainer.appendChild(externalTermsCheckboxDiv);
48
+
49
+ // Add event listeners to checkboxes (generic for any number of checkboxes)
50
+ function enforceAtLeastOneChecked(event) {
51
+ const checkboxes = checkboxesContainer.querySelectorAll('input[type="checkbox"]');
52
+ const checkedBoxes = Array.from(checkboxes).filter(cb => cb.checked);
53
+ // If the user is unchecking a box
48
54
  if (!event.target.checked) {
49
- document.querySelector('html').classList.add('hide-local-terms');
50
- } else {
51
- document.querySelector('html').classList.remove('hide-local-terms');
55
+ // If all others are already unchecked (so this would make all unchecked except the one being unchecked)
56
+ if (checkedBoxes.length === 0) {
57
+ // Check all other checkboxes except the one being unchecked
58
+ checkboxes.forEach(cb => {
59
+ if (cb !== event.target) {
60
+ cb.checked = true;
61
+ }
62
+ });
63
+ // The one being unchecked remains unchecked
64
+ }
52
65
  }
53
- });
54
-
55
- externalTermsCheckboxDiv.querySelector('#showExternalTermsCheckbox').addEventListener('change', function(event) {
56
- if (!event.target.checked) {
57
- document.querySelector('html').classList.add('hide-external-terms');
58
- } else {
59
- document.querySelector('html').classList.remove('hide-external-terms');
66
+ // Toggle classes for each checkbox type
67
+ checkboxes.forEach(cb => {
68
+ const html = document.querySelector('html');
69
+ if (cb.id === 'showLocalTermsCheckbox') {
70
+ html.classList.toggle('hide-local-terms', !cb.checked);
71
+ } else if (cb.id === 'showExternalTermsCheckbox') {
72
+ html.classList.toggle('hide-external-terms', !cb.checked);
73
+ }
74
+ // Add more else ifs here for future checkboxes
75
+ });
76
+ }
77
+
78
+ // Attach the handler to all checkboxes in the container
79
+ checkboxesContainer.addEventListener('change', function(event) {
80
+ if (event.target.matches('input[type="checkbox"]')) {
81
+ enforceAtLeastOneChecked(event);
60
82
  }
61
83
  });
62
-
63
- // Append checkboxes to container
64
- checkboxesContainer.appendChild(localTermsCheckboxDiv);
65
- checkboxesContainer.appendChild(externalTermsCheckboxDiv);
66
-
84
+
67
85
  // Add checkboxes to the terminology section utility container
68
86
  terminologySectionUtilityContainer.appendChild(checkboxesContainer);
69
87
  }
@@ -8,7 +8,6 @@ function hideShowUtilityContainer() {
8
8
 
9
9
  if (dtElements.length === 0) {
10
10
  document.getElementById("terminology-section-utility-container")?.remove();
11
- // document.getElementById("terminology-section-utility-container")?.style.display = "none";
12
11
  }
13
12
  }
14
13
 
@@ -113,7 +113,7 @@ const horizontalScrollHint = (elements) => {
113
113
  // Create scroll hint element
114
114
  const scrollHint = document.createElement('p');
115
115
  scrollHint.classList.add('scrollHint');
116
- scrollHint.innerHTML = `<img style='width: 40px; vertical-align: middle;' src='${fingerHorizontalScrollingImage}' alt='finger scrolling horizontally' /> Scroll to the right`;
116
+ scrollHint.innerHTML = `<img class='scrollHintImage' style='width: 40px; vertical-align: middle; padding: 0;margin: 0 !important;' src='${fingerHorizontalScrollingImage}' alt='' /> Scroll to the right`;
117
117
  scrollHint.style.animation = 'arrow-tweet-panel-pulse 0.82s ease-in-out infinite';
118
118
 
119
119
  el.appendChild(scrollHint);
@@ -155,5 +155,5 @@ document.addEventListener("DOMContentLoaded", function () {
155
155
  // Apply to multiple different elements
156
156
  // horizontalScrollHint(['.table-container', '.code-block', document.querySelector('#special-element')]);
157
157
 
158
- horizontalScrollHint(['.table-responsive']);
158
+ horizontalScrollHint(['.table-responsive-md']);
159
159
  });
@@ -19,8 +19,6 @@ const imageFullSize = () => {
19
19
  }
20
20
 
21
21
  if (markdownElement) {
22
- console.log("event listener added");
23
-
24
22
  markdownElement.addEventListener('click', (event) => {
25
23
  if (event.target.tagName === 'IMG') {
26
24