Skip to content

Commit af3a63d

Browse files
committed
Add show anchors
1 parent 8e7e4f5 commit af3a63d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

javascripts/DOM - Show anchors.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"use strict";
2+
var anchors = document.anchors;
3+
for (i=0; i < anchors.length; ++i) {
4+
var anchor = anchors[i];
5+
var name = anchor.name;
6+
if (name !== undefined && name.length > 0) {
7+
anchor.appendChild(document.createTextNode("#" + name));
8+
}
9+
}

javascripts/index.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
"name": "DOM - NATO spell selection",
3636
"description": "This bookmarklet spells the current selection using NATO alphabet. The case of the NATO name will be the same at the case of the original character. Characters that are not part of the NATO alphabet will be percent-encoding (e.g. %2F for '/') to help identify them. This bookmarklet can be used to identify characters that are ambiguous in certain typefaces. For example the number zero (0) will be spelled 'zero' while the letter capital O will be spelled 'Oscar'."
3737
},
38+
{
39+
"name": "DOM - Show anchors",
40+
"description": "This bookmarklet reveals all the anchors' names in the page."
41+
},
3842
{
3943
"name": "DOM - Show password",
4044
"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)