image/svg+xml 0% return parseInt(this.getAttribute('arrow')); return parseInt(this.getAttribute('arrow2')); return parseInt(this.getAttribute('pc')); return parseInt(this.getAttribute('pc2')); return this.getAttribute('status'); return this.getAttribute('text'); return this.getAttribute('text2'); return this.getAttribute('flashing'); = 9 || this.anipos <= 5) { this.anistep = -this.anistep; } if (this.flashEnabled || (!this.flashEnabled && this.anipos < 9)) { //svg.style.MozOpacity = '0.'+this.anipos; svg.setAttribute('style', 'opacity: 0.'+this.anipos); this.anipos += this.anistep; } else { // flashing disabled and cycle is complete this.timer.cancel(); //svg.style.opacity = '1'; svg.setAttribute('style', 'opacity: 1'); this.anipos = 9; this.anistep = 1; } } catch (e) { this.timer.cancel(); alert('netusage flash timer-callback error: '+e); } } ]]> 0 && v <= 100) { document.getAnonymousElementByAttribute(this, 'id', 'patharrow2').style.display = ''; if ((document.getAnonymousElementByAttribute(this, 'id', 'offpeak').getAttribute('clip-path')+"").indexOf('clipoffpeak') == -1) document.getAnonymousElementByAttribute(this, 'id', 'patharrow2').setAttribute('transform', 'translate('+(maxWidth2 * v / 100)+',0)'); else // for New Modern Theme document.getAnonymousElementByAttribute(this, 'id', 'patharrow2').setAttribute('transform', 'translate(-'+(maxWidth * v / 100)+',0)'); } else { document.getAnonymousElementByAttribute(this, 'id', 'patharrow2').style.display = 'none'; } } else if (attr == 'status') { switch(v) { case 'fetching': document.getAnonymousElementByAttribute(this, 'id', "iconerror").setAttribute("display", "none"); document.getAnonymousElementByAttribute(this, 'id', "icondown").setAttribute("display", ""); break; case 'error': document.getAnonymousElementByAttribute(this, 'id', "iconerror").setAttribute("display", ""); document.getAnonymousElementByAttribute(this, 'id', "icondown").setAttribute("display", "none"); break; default: document.getAnonymousElementByAttribute(this, 'id', "iconerror").setAttribute("display", "none"); document.getAnonymousElementByAttribute(this, 'id', "icondown").setAttribute("display", "none"); } } else if (attr == 'text') { var el = document.createTextNode(v); var pclabel = document.getAnonymousElementByAttribute(this, 'id', 'pclabel'); if (pclabel.hasChildNodes()) { pclabel.removeChild(pclabel.firstChild); } pclabel.appendChild(el); } else if (attr == 'text2') { var el = document.createTextNode(v); var pclabel = document.getAnonymousElementByAttribute(this, 'id', 'pc2label'); if (pclabel.hasChildNodes()) { pclabel.removeChild(pclabel.firstChild); } pclabel.appendChild(el); } else if (attr == 'flashing') { if (!v || v == "false") { this.flashEnabled = false; } else { this.anipos = 9; this.anistep = 1; this.flashEnabled = true; if (!this.timer) return; // TODO This happens because on first run, netusage update has returned when usagebar constructor has not been run yet this.timer.cancel(); this.timer.init(this, 150, this.timer.TYPE_REPEATING_SLACK); } } svg.unsuspendRedraw(suspid); ]]>