Files
nairobi/app/assets/javascripts/social_share.js
Javi Martín 0d8119a1e3 Use social-share-button whatsapp icon
We were using a custom icon because in the past social-share-button
didn't have support for whatsapp. But now that it does, we can remove
our custom icon.

Note we're using the `_app` suffix because that's the name of the icon
meant for mobile devices.
2021-02-08 16:31:26 +01:00

14 lines
371 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").replace(/_app$/, "")) + "</span>");
});
},
destroy: function() {
$(".social-share-button a .show-for-sr").remove();
}
};
}).call(this);