Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 23 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
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 |