1/** 2 * message ticker 3 * Copyright (C) 2011 - 2023 www.gopiplus.com 4 * http://www.gopiplus.com/work/2010/07/18/message-ticker/ 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20var mt_current=0 21var mt_clipwidth=0 22 23function mt_changeticker(){ 24mt_crosstick.style.clip="rect(0px 0px auto 0px)" 25mt_crosstick.innerHTML=mt_contents[mt_current] 26mt_highlight() 27} 28 29function mt_highlight(){ 30var mt_msgwidth=mt_crosstick.offsetWidth 31if (mt_clipwidth<mt_msgwidth){ 32mt_clipwidth+=mt_speed 33mt_crosstick.style.clip="rect(0px "+mt_clipwidth+"px auto 0px)" 34mt_begin=setTimeout("mt_highlight()",20) 35} 36else{ 37mt_clipwidth=0 38clearTimeout(mt_begin) 39if (mt_current==mt_contents.length-1) mt_current=0 40else mt_current++ 41setTimeout("mt_changeticker()",mt_delay) 42} 43} 44 45function mt_start(){ 46mt_crosstick=document.getElementById? document.getElementById("mt_spancontant") : document.all.mt_spancontant 47mt_crosstickParent=mt_crosstick.parentNode? mt_crosstick.parentNode : mt_crosstick.parentElement 48if (parseInt(mt_crosstick.offsetHeight)>0) 49mt_crosstickParent.style.height=mt_crosstick.offsetHeight+'px' 50else 51setTimeout("mt_crosstickParent.style.height=mt_crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake 52mt_changeticker() 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.