Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/almanac.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ return JSON.stringify({
'link-nodes': (() => {
// Returns a JSON array of link nodes and their key/value attributes.
// Used by 01.14, 01.15, 01.16, 10.6, 06.46, 12.18
var nodes = document.querySelectorAll('head link');
var nodes = document.querySelectorAll('link');
return parseNodes(nodes);
})(),
'priority-hints': (() => {
Expand Down
27 changes: 27 additions & 0 deletions dist/markup.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,33 @@ try { // whole process is placed in a try/catch so we can log uncaught errors
}
})(),

// rel attribute usage
'rel': (() => {
try {
let result = {rels_total: 0, rels: {}};

const nodes = document.querySelectorAll('*[rel]');

nodes.forEach((n) => {

result.rels_total++;

if (result.rels[n.rel]) {
result.rels[n.rel]++;
}
else {
result.rels[n.rel] = 1;
}

});

return result;
}
catch(e) {
return logError("rel", e);
}
})(),

// id attribute usage
// Used by Markup
'ids': (() => {
Expand Down
2 changes: 1 addition & 1 deletion metric-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Whether the page contains any instances of <script nomodule>
`1` if true, `0` if false

## link-nodes
A JSON array of <link> nodes used in the <head> element.
A JSON array of <link> nodes

Example response:

Expand Down