We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1544913 commit 5687dd2Copy full SHA for 5687dd2
h/app.js
@@ -0,0 +1,23 @@
1
+document.addEventListener('DOMContentLoaded', function () {
2
+ const websiteUrl = 'your_website_url';
3
+
4
+ fetch(websiteUrl)
5
+ .then(response => response.text())
6
+ .then(html => {
7
+ const parser = new DOMParser();
8
+ const doc = parser.parseFromString(html, 'text/html');
9
10
+ const hyperlinks = doc.querySelectorAll('a');
11
12
+ const hyperlinksContainer = document.getElementById('hyperlinks-container');
13
+ hyperlinks.forEach(link => {
14
+ const linkElement = document.createElement('a');
15
+ linkElement.href = link.href;
16
+ linkElement.textContent = link.href;
17
+ hyperlinksContainer.appendChild(linkElement);
18
+ });
19
+ })
20
+ .catch(error => {
21
+ console.error('Error fetching website content:', error);
22
23
+});
0 commit comments