Files
nairobi/app/assets/javascripts/social_share.js
Senén Rodero Rodríguez 137e0f5a64 Remove description for screen readers
It was being duplicated when restoring a page by using browser
history. With this solution we will avoid to have screen readers
descriptions more than once inside any sociual share button.
2020-08-12 10:07:35 +02:00

14 lines
350 B
JavaScript

(function() {
"use strict";
App.SocialShare = {
initialize: function() {
$(".social-share-button a").each(function() {
$(this).append("<span class='show-for-sr'>" + ($(this).data("site")) + "</span>");
});
},
destroy: function() {
$(".social-share-button a .show-for-sr").remove();
}
};
}).call(this);