aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display-generator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/display-generator.js')
-rw-r--r--ext/js/display/display-generator.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js
index 1d824507..bd0c83a2 100644
--- a/ext/js/display/display-generator.js
+++ b/ext/js/display/display-generator.js
@@ -164,7 +164,11 @@ class DisplayGenerator {
createTagFooterNotificationDetails(tagNode) {
const node = this._templates.instantiateFragment('footer-notification-tag-details');
- const details = tagNode.dataset.details;
+ let details = tagNode.dataset.details;
+ if (typeof details !== 'string') {
+ const label = tagNode.querySelector('.tag-label-content');
+ details = label !== null ? label.textContent : '';
+ }
this._setTextContent(node.querySelector('.tag-details'), details);
let disambiguation = null;
@@ -602,6 +606,7 @@ class DisplayGenerator {
body.dataset.count = `${frequencyData.length}`;
node.dataset.count = `${frequencyData.length}`;
+ node.dataset.details = dictionary;
return node;
}
@@ -624,6 +629,7 @@ class DisplayGenerator {
node.dataset.readingIsSame = `${reading === expression}`;
node.dataset.dictionary = dictionary;
node.dataset.frequency = `${frequency}`;
+ node.dataset.details = dictionary;
return node;
}
@@ -640,6 +646,7 @@ class DisplayGenerator {
node.dataset.character = character;
node.dataset.dictionary = dictionary;
node.dataset.frequency = `${frequency}`;
+ node.dataset.details = dictionary;
return node;
}