Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 26 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | function showAlert(id) { |
||
2 | $(id).fadeIn(); |
||
3 | } |
||
4 | |||
5 | function addAlert(id, text) { |
||
6 | $(".alerts-2012").append( |
||
7 | ` |
||
8 | <div id="alerts" class="content-alignment" style="margin-top:3px;"> |
||
9 | <div class="yt-alert yt-alert-default yt-alert-info hid" id="alert__` + id + `" style="display: block;"> |
||
10 | <div class="yt-alert-icon"> |
||
11 | <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
||
12 | </div> |
||
13 | <div class="yt-alert-buttons"><button type="button" class="close yt-uix-close yt-uix-button yt-uix-button-close yt-uix-button-size-default" onclick="this.parent.style.display = 'none';" data-close-parent-class="yt-alert" role="button"><span class="yt-uix-button-content">Close </span></button></div> |
||
14 | <div class="yt-alert-content" role="alert"> |
||
15 | <span class="yt-alert-vertical-trick"></span> |
||
16 | <div class="yt-alert-message"> |
||
17 | ` + text + ` |
||
18 | </div> |
||
19 | </div> |
||
20 | </div> |
||
21 | </div> |
||
22 | ` |
||
23 | ); |
||
24 | |||
25 | return "Alert created " + id + text; |
||
26 | } |