Spaces:
Sleeping
Sleeping
Update public/custom.js
Browse files- public/custom.js +31 -9
public/custom.js
CHANGED
|
@@ -1,21 +1,43 @@
|
|
| 1 |
/* custom.js */
|
| 2 |
|
| 3 |
// Wait until the DOM is fully loaded
|
| 4 |
-
document.addEventListener('DOMContentLoaded', function () {
|
| 5 |
// Target all links and buttons
|
| 6 |
-
const links = document.querySelectorAll('a');
|
| 7 |
|
| 8 |
-
links.forEach(link => {
|
| 9 |
// Suppress the display of URLs in the browser status bar
|
| 10 |
-
link.addEventListener('mouseover', function (event) {
|
| 11 |
-
event.preventDefault();
|
| 12 |
-
window.status = ''; // Clear the status bar
|
| 13 |
-
});
|
| 14 |
|
| 15 |
// Optionally disable pointer events for all links (comment this out if not needed)
|
| 16 |
// link.style.pointerEvents = 'none';
|
| 17 |
// link.style.cursor = 'default';
|
| 18 |
-
});
|
| 19 |
|
| 20 |
//console.log('Custom JS applied: URL hover behavior modified.');
|
| 21 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
/* custom.js */
|
| 2 |
|
| 3 |
// Wait until the DOM is fully loaded
|
| 4 |
+
// document.addEventListener('DOMContentLoaded', function () {
|
| 5 |
// Target all links and buttons
|
| 6 |
+
// const links = document.querySelectorAll('a');
|
| 7 |
|
| 8 |
+
// links.forEach(link => {
|
| 9 |
// Suppress the display of URLs in the browser status bar
|
| 10 |
+
// link.addEventListener('mouseover', function (event) {
|
| 11 |
+
// event.preventDefault();
|
| 12 |
+
// window.status = ''; // Clear the status bar
|
| 13 |
+
// });
|
| 14 |
|
| 15 |
// Optionally disable pointer events for all links (comment this out if not needed)
|
| 16 |
// link.style.pointerEvents = 'none';
|
| 17 |
// link.style.cursor = 'default';
|
| 18 |
+
// });
|
| 19 |
|
| 20 |
//console.log('Custom JS applied: URL hover behavior modified.');
|
| 21 |
+
//});
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
/* custom.js */
|
| 26 |
+
|
| 27 |
+
// Suppress URL hover behavior
|
| 28 |
+
document.addEventListener('DOMContentLoaded', function () {
|
| 29 |
+
// Target only Hugging Face URLs
|
| 30 |
+
const hfLinks = document.querySelectorAll('a[href*="quantumlearner-space39.hf.space"]');
|
| 31 |
+
|
| 32 |
+
hfLinks.forEach(link => {
|
| 33 |
+
link.addEventListener('mouseover', function () {
|
| 34 |
+
// Suppress the URL from appearing in the browser status bar
|
| 35 |
+
window.status = '';
|
| 36 |
+
});
|
| 37 |
+
|
| 38 |
+
link.addEventListener('mouseout', function () {
|
| 39 |
+
// Clear the status bar when the cursor leaves
|
| 40 |
+
window.status = '';
|
| 41 |
+
});
|
| 42 |
+
});
|
| 43 |
+
});
|