Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: options.js

Issue 29339616: Issue 3908 - Don't show website link for subscriptions that don't specify a homepage (Closed)
Patch Set: Created April 8, 2016, 5:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: options.js
===================================================================
--- a/options.js
+++ b/options.js
@@ -210,9 +210,15 @@
}
var websiteElement = element.querySelector(".context-menu .website");
+ if (websiteElement)
+ {
+ if (item.homepage)
+ websiteElement.setAttribute("href", item.homepage);
+ else
+ websiteElement.setAttribute("aria-hidden", true);
+ }
+
var sourceElement = element.querySelector(".context-menu .source");
- if (websiteElement && item.homepage)
- websiteElement.setAttribute("href", item.homepage);
if (sourceElement)
sourceElement.setAttribute("href", item.url);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld