+function ($) { "use strict";

    /**
     * Constructor
     *
     * @param  {Object} $el
     * @return {void}
     */
    var UrlColumn = function ($el) {
        this.url = $el.find('a').data('url');
        this.lang = $el.closest('.bedard-webhooks.list').data('lang');
        $el.on('click', this.onClicked.bind(this));
    };

    /**
     * Url column click handler
     *
     * @param  {Object} e
     * @return {void}
     */
    UrlColumn.prototype.onClicked = function (e) {
        e.preventDefault();
        e.stopPropagation();
        this.copyToClipboard();
        this.flashSuccessMessage();
    };

    /**
     * Copy the webhook to the user's clipboard
     *
     * @return {void}
     */
    UrlColumn.prototype.copyToClipboard = function () {
        var $input = $("<input>");
        $("body").append($input);
        $input.val(this.url).select();
        document.execCommand("copy");
        $input.remove();
    };

    /**
     * Tell the user we've copied the webhook
     *
     * @return {void}
     */
    UrlColumn.prototype.flashSuccessMessage = function () {
        $.oc.flashMsg({
            'text': this.lang.hooks.copied_to_clipboard,
            'class': 'success',
            'interval': 3
        });
    };

    //
    // Bind to widget container
    //
    $.fn.UrlColumn = function () {
        return new UrlColumn(this);
    }

    $(document).on('render', function() {
        $('td.url-column').UrlColumn();
    });
}(window.jQuery);

@@ -157,54 +157,8 @@
 ) %7B%0A
-        this.url = $el.find('a').data('url');%0A
     
@@ -224,16 +224,16 @@
 lang');%0A
+
         
@@ -524,16 +524,17 @@
 ipboard(
+e
 );%0A     
@@ -627,32 +627,58 @@
 lipboard%0A     *%0A
+     * @param  %7BObject%7D e%0A
      * @return %7B
@@ -735,36 +735,121 @@
 ard = function (
+e
 ) %7B%0A
+        var url = $(e.currentTarget).closest('tr').find('a%5Bdata-url%5D').data('url');%0A
         var $inp
@@ -901,16 +901,16 @@
 input);%0A
+
         
@@ -920,21 +920,16 @@
 put.val(
-this.
 url).sel

Copy correct link to clipboard