Skip to content

Commit df233b4

Browse files
committed
properly preserve time elements original title on mouseover
don't replace it with the replacement
1 parent 42e2227 commit df233b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/modules/localDate.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ modules['localDate'] = {
1717
if ((this.isEnabled()) && (this.isMatchURL())) {
1818
$('.sitetable')
1919
.on('mouseenter', 'time', function() {
20-
this.setAttribute('data-original-title', this.getAttribute('title'));
20+
if (!this.getAttribute('data-original-title')) {
21+
this.setAttribute('data-original-title', this.getAttribute('title'));
22+
}
2123
this.setAttribute('title', new Date(this.getAttribute('datetime')));
2224
})
2325
.on('mouseleave', 'time', function() {

0 commit comments

Comments
 (0)