jquery.emojicons.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 23
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 0
wmc 2
c 2
b 0
f 0
nc 1
mnd 1
bc 2
fnc 1
dl 0
loc 23
rs 10
bpm 2
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A $(ꞌspan.emoji, i.emoji, emojiꞌ).each 0 6 2
1
var emojiStyle = [
2
'<style>',
3
'	span.emoji, ',
4
'	i.emoji, ',
5
'	emoji { ',
6
'    		vertical-align: middle; ',
7
'		width: 1.5em; ',
8
'		height: 1.5em; ',
9
'		line-height: 1.5em; ',
10
'		display: inline-block; ',
11
'		background: center center/contain no-repeat',
12
'	} ',
13
'</style>'
14
].join("\n");
15
16
$('head').append(emojiStyle);
17
18
$('span.emoji, i.emoji, emoji').each(function() {
19
	if($(this).text() !== null) {
20
		$(this).css("background-image", 'url("https://s3-us-west-2.amazonaws.com/emojicons/' + $(this).text() + '.png")');
21
		$(this).text('');
22
	}
23
});
24