XF 2.0 Is it legal?

kick

Well-known member
JavaScript:
!function($, window, document, _undefined) {
    XF.UserTagClick = XF.Click.newHandler({
        eventNameSpace: 'XFUserTagClick',

        options: {
            username: null
        },

        init: function()
        {
            if (!this.options.username)
            {
                console.error('Must be initialized with a data-user attribute.');
            }
        },

        click: function(e)
        {
            e.preventDefault();

            var html, username = '@' +  $(e.target).data('username') + ', ';

            XF.insertIntoEditor($('.js-editor').parent(), username, username);
        },
    });

    XF.Click.register('userTag', 'XF.UserTagClick');
} (jQuery, window, document);
 
Last edited:
Back
Top Bottom