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

Unified Diff: options.js

Issue 29339284: Issue 3884 - Show original subscription title in the Advanced tab of the options page (Closed)
Patch Set: Created April 1, 2016, 2:58 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
@@ -168,7 +168,11 @@
if (!element)
continue;
- var title = item.title || item.url || item.text;
+ var title = null;
+ if (this.details[i].useOriginalTitle)
+ title = item.originalTitle;
+ if (!title)
+ title = item.title || item.url || item.text;
element.querySelector(".display").textContent = title;
if (title)
element.setAttribute("data-search", title.toLowerCase());
@@ -358,7 +362,8 @@
[
{
id: "all-filter-lists-table",
- onClick: toggleDisableSubscription
+ onClick: toggleDisableSubscription,
+ useOriginalTitle: true
}
]);
@@ -488,7 +493,7 @@
{
var element = elements[i];
var subscription = Object.create(null);
- subscription.title = element.getAttribute("title");
+ subscription.originalTitle = element.getAttribute("title");
subscription.url = element.getAttribute("url");
subscription.disabled = null;
subscription.downloadStatus = null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld