Class: AccountHighlighter

AccountHighlighter

new AccountHighlighter(args)

Highlight similar accounts

Name Type Description
args Object address arguments
Example
var highlighter = new AccountHighlighter({
    v: v, // Variables object
    source_username: 'a@b.cd'
    source_address : 'a@b.cd'
});

Methods

highlight(target_address){Object}

Return highlighted values

Name Type Description
target_address string E-mail address to highlight
Returns:
Type Description
Object highlighted sections for name and domain
Example
new AccountHighlighter({ source_username: 'bee', source_address: 'b@c.de', v: v }).highlight( 'ay bee cee', 'abc@c.de' )
// returns { username: [ 'ay ', 'bee', ' cee' ], name: [ 'a', 'b', 'c' ], domain: [ '', 'c.de', '' ] }

highlight_to_element(target_username, target_address, username_container, name_container, domain_container)

convenience function to populate elements with a highlighted e-mail

Name Type Description
target_username string Username to highlight
target_address string E-mail address to highlight
username_container jQuery Element to place the user's username in
name_container jQuery Element to place the e-mail name in
domain_container jQuery Element to place the e-mail domain in