1function ENNotifier(panel, params) { 2 this.messagePanel = panel; 3 this.params = params; 4 this.removerCounter = 0; 5 this.animationAppear = "en_notifier_appear"; 6 this.animationDisappear = "en_notifier_disappear"; 7 this.animationDuration = "0.3s"; 8 this.displayDurationMillis = 5000; 9 10 this.show = function(msg) { 11 if (this.msgContainer == null) { 12 this.initMessageContainer(); 13 } 14 this.msgDiv.innerHTML = msg; 15 this.msgContainer.style.animationName = this.animationAppear; 16 this.setDisappearTimer(); 17 } 18 19 this.setDisappearTimer = function() { 20 let me = this; 21 this.removerCounter++; 22 let curCounter = me.removerCounter; 23 setTimeout(function() { 24 if (curCounter == me.removerCounter) { 25 me.msgContainer.style.animationName = me.animationDisappear; 26 } 27 }, this.displayDurationMillis); 28 } 29 30 this.initMessageContainer = function() { 31 let me = this; 32 this.msgContainer = $en.createDiv("en-ui-notifier"); 33 if (this.params != null && this.params.cssClass != null) { 34 this.msgContainer.classList.add(this.params.cssClass); 35 } 36 37 this.msgContainer.style.animationDuration = this.animationDuration; 38 39 this.msgDiv = $en.createDiv("message"); 40 let closeIcon = $en.createDiv("close-icon", "X"); 41 closeIcon.onclick = function() { me.hide(); }; 42 this.msgContainer.appendChild(this.msgDiv); 43 this.msgContainer.appendChild(closeIcon); 44 this.messagePanel.appendChild(this.msgContainer); 45 } 46 47 this.hide = function() { 48 if (this.msgContainer != null) { 49 this.msgContainer.remove(); 50 this.msgContainer = null; 51 } 52 } 53}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.