Skip to content

Commit 3906203

Browse files
committed
Show feeds
1 parent fa38fd4 commit 3906203

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

javascripts/DOM - Show feeds.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use strict";
2+
var msg = "";
3+
var links = document.getElementsByTagName("link");
4+
for (link in links) {
5+
if (link.rel === "alternate" && (link.type.indexOf("rss") !== -1 || link.type.indexOf("atom") !== -1 || link.type.indexOf("feed") !== -1)) {
6+
msg += link.href + "\n";
7+
}
8+
}
9+
if (msg.length > 0) {
10+
window.alert(msg);
11+
}

javascripts/index.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
"name": "DOM - Show anchors",
4040
"description": "This bookmarklet reveals all the anchors' names in the page."
4141
},
42+
{
43+
"name": "DOM - Show feeds",
44+
"description": "This bookmarklet reveals all the feeds linked in the page."
45+
},
4246
{
4347
"name": "DOM - Show password",
4448
"description": "This bookmarklet displays the current value of a masked password field. To use the bookmarklet, simply click inside the password field that you want to be able to save, then click on the bookmarklet."

0 commit comments

Comments
 (0)