• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Is it legal?

#1
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: