tabalinas / jssocials

Social Network Sharing jQuery Plugin
http://js-socials.com
MIT License
464 stars 104 forks source link

Social buttons blocked by AdBlock Plus - suggest to make all class names configurable #238

Open yamelkaya opened 4 years ago

yamelkaya commented 4 years ago

We try to avoid blocking social share buttons by ad blockers and rename all jssocial classes. Almost all possible to change with .setDefaults(cssDefaults); but this piece of code has hardcoded class prefix:

_renderShare: function(share) {
            var $share;

            if($.isFunction(share.renderer)) {
                $share = $(share.renderer());
            } else {
                $share = this._createShare(share);
            }

            $share.addClass(this.shareClass)
                .addClass(share.share ? "jssocials-share-" + share.share : "")
                .addClass(share.css)
                .appendTo(this._$shares);
        },

I suggest to make this prefix configurable also.