Commit ba2b8de8 authored by Weilun Shi's avatar Weilun Shi Committed by Commit Bot

[NTP] Omit attributions for the 'Solid Colors' collection

Setting all the attributions to empty string for all the images in the
'Solid Colors' collection. Therefore, attributions will no longer show
for the them. Notice that, this change will not affect the 'Solid Color'
image that already applied. To make it work, one should either open a
new profile or change the background image and then change it back.

Before:
https://screenshot.googleplex.com/AQbWxLqi7UD.png

After:
https://screenshot.googleplex.com/0PFpVvCU4QC.png

Bug: 868164
Change-Id: Ie5b8b416ba6ed0fedbc9ce5d19e18b67f410f0f4
Reviewed-on: https://chromium-review.googlesource.com/1152534
Commit-Queue: Mathieu Perreault <mathp@chromium.org>
Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579172}
parent 0ced2cb2
......@@ -501,21 +501,24 @@ customBackgrounds.showImageSelectionDialog = function(dialogTitle) {
'url(' + imageData[i].thumbnailImageUrl + ')'
].join(',').trim();
tile.style.backgroundImage = imageWithOverlay;
tile.dataset.attributionLine1 = '';
tile.dataset.attributionLine2 = '';
tile.dataset.attributionActionUrl = '';
} else {
tile.style.backgroundImage =
'url(' + imageData[i].thumbnailImageUrl + ')';
}
tile.dataset.url = imageData[i].imageUrl;
tile.dataset.attributionLine1 =
tile.dataset.attributionLine1 =
(imageData[i].attributions[0] != undefined ?
imageData[i].attributions[0] :
'');
tile.dataset.attributionLine2 =
tile.dataset.attributionLine2 =
(imageData[i].attributions[1] != undefined ?
imageData[i].attributions[1] :
'');
tile.dataset.attributionActionUrl = imageData[i].attributionActionUrl;
tile.dataset.attributionActionUrl = imageData[i].attributionActionUrl;
}
tile.setAttribute('aria-label', imageData[i].attributions[0]);
tile.dataset.url = imageData[i].imageUrl;
} else {
tile.style.backgroundImage =
'url(' + imageData[i].thumbnailPhotoUrl + ')';
......@@ -957,7 +960,6 @@ customBackgrounds.initCustomBackgrounds = function() {
.classList.contains(customBackgrounds.CLASSES.DONE_AVAILABLE)) {
return;
}
customBackgrounds.setBackground(
customBackgrounds.selectedTile.dataset.url,
customBackgrounds.selectedTile.dataset.attributionLine1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment