I am using this jquery-comments plugin:
https://github.com/Viima/jquery-comments/blob/master/js/jquery-comments.js
I'd like to extend the plugin with my own functionality. According to this post, I can use the $.extend approach:
(function($) {
/**
 *  Namespace: the namespace the plugin is located under
 *  pluginName: the name of the plugin
 */
    var extensionMethods = {
        /*
         * add own functions here
         */
        myFunction: function(){
            ...
        }
    };
    $.extend(true, $[ Namespace ][ pluginName ].prototype, extensionMethods);
})(jQuery);
But how should I set $extend here with namespace and pluginName, to actually extend jquery-comments?
UPDATE:
I got it to work writing this in $.extend:
$.extend(true, $('.jquery-comments').data('comments'), extensionMethods);
Thanks to @charlietfl for his helpful comments.
 
    