<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://dev.skandinavien-wiki.net/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ATicker2.js</id>
	<title>MediaWiki:Ticker2.js - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://dev.skandinavien-wiki.net/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ATicker2.js"/>
	<link rel="alternate" type="text/html" href="https://dev.skandinavien-wiki.net/w/index.php?title=MediaWiki:Ticker2.js&amp;action=history"/>
	<updated>2026-06-23T01:32:42Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in skandinavien-wiki.net</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://dev.skandinavien-wiki.net/w/index.php?title=MediaWiki:Ticker2.js&amp;diff=51&amp;oldid=prev</id>
		<title>Xineohp1506: 1 Version importiert</title>
		<link rel="alternate" type="text/html" href="https://dev.skandinavien-wiki.net/w/index.php?title=MediaWiki:Ticker2.js&amp;diff=51&amp;oldid=prev"/>
		<updated>2023-01-13T00:41:37Z</updated>

		<summary type="html">&lt;p&gt;1 Version importiert&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/*globals Bawolff hookEvent */&lt;br /&gt;
/*&lt;br /&gt;
__This is Ticker2-0.9__&lt;br /&gt;
&lt;br /&gt;
This is an attempt to redesign the ticker system. I believe that well the current ticker system is a good idea, it can be improved on&lt;br /&gt;
&lt;br /&gt;
Then again, this may just be overthinking things. time will tell.&lt;br /&gt;
######&lt;br /&gt;
Design goals&lt;br /&gt;
*modular - should be able to have more then one transition between items&lt;br /&gt;
*user configurable - should be able to customize on wiki (aka {{ticker|for=Africa|speed=...}})&lt;br /&gt;
**The user should never have to do anything in js&lt;br /&gt;
**Downside: have to be extra-careful about XSS&lt;br /&gt;
*fast - performance was an issue with the other system&lt;br /&gt;
&lt;br /&gt;
cavets:&lt;br /&gt;
*Doesn&amp;#039;t handle multilevel lists well&lt;br /&gt;
*onblur/onfocus?? (works in opera, firefox, broken in MSIE)&lt;br /&gt;
&lt;br /&gt;
Todo:&lt;br /&gt;
*change intro string to a control string with escape sequences (think printf)&lt;br /&gt;
**Play/pause button&lt;br /&gt;
*better fade transitions (current one kind of sucks)&lt;br /&gt;
*Change state system to number instead of T,F,U. &lt;br /&gt;
*make fade work in IE&lt;br /&gt;
*multiple speed variables&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
Note: Setting disable_ticker2 to true will disable the ticker.&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
//to avoid name conflicts (we already have way to many global variables as is imho)&lt;br /&gt;
//Everything should be a member of Bawolff.Ticker&lt;br /&gt;
if (typeof Bawolff !== &amp;quot;object&amp;quot;) Bawolff = {};&lt;br /&gt;
if (typeof Bawolff.Ticker === &amp;quot;Object&amp;quot;) throw new Error(&amp;quot;Can not initilize ticker. Already initilized, or someone stole its name!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Bawolff.Ticker = function() {&lt;br /&gt;
/*&lt;br /&gt;
This is the constructor function for new Ticker objects. Call as:&lt;br /&gt;
var some_ticker_object = new Bawolff.Ticker;&lt;br /&gt;
&lt;br /&gt;
Its primary purpose is to set defaults and create new Ticker objects. It takes no arguments.&lt;br /&gt;
Ticker Objects should have the following methods:&lt;br /&gt;
*setUp - set up ticker properties (and does sanity checks)&lt;br /&gt;
*engines - functions for transitions&lt;br /&gt;
probably more&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
    var t_s = Bawolff.Ticker; //shortcut&lt;br /&gt;
&lt;br /&gt;
    this.arg = &amp;quot;&amp;quot;; //defaults to none, if uspecified. (should this be an arg to this function?). unphrased definition of options&lt;br /&gt;
    this.elm = null; //element to work ticker magic on. setUp method will throw an error if this isn&amp;#039;t set by then &lt;br /&gt;
&lt;br /&gt;
    //method setUp will take care of these. These are the actual options (defaults here)&lt;br /&gt;
&lt;br /&gt;
    this.engineNumb = t_s.eng.none; //constant representing engine number&lt;br /&gt;
    this.speed = 1; //float - multiplication factor&lt;br /&gt;
    //Probably can&amp;#039;t set these to null through wiki&lt;br /&gt;
    this.strLeft = &amp;quot;Latest News (&amp;quot;; //Intro string part 1 - null for none&lt;br /&gt;
    this.strRight = &amp;quot;):&amp;quot;; //intro part 3 - null for none&lt;br /&gt;
    this.strLinkURI = &amp;quot;//en.wikinews.org/wiki/template:Latest_News&amp;quot;; //part 2 url&lt;br /&gt;
    this.strLinkText = &amp;quot;full list&amp;quot;; //part 2 text. null for no link.&lt;br /&gt;
    this.schowControls = false; //pause/restart&lt;br /&gt;
    this.tickSpeed = 1;&lt;br /&gt;
    this.resetSpeed=1;&lt;br /&gt;
&lt;br /&gt;
    //Internal thingies (don&amp;#039;t change)&lt;br /&gt;
    this.listIndex = 0;&lt;br /&gt;
    this.charIndex = 0;&lt;br /&gt;
    this.curState = &amp;quot;ok&amp;quot;; //for pausing&lt;br /&gt;
    this.resumeFunc = null; //storage for resume function&lt;br /&gt;
    this.resumeDelay = 0; //wait time before executing&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Bawolff.Ticker.prototype.setUp = function() {&lt;br /&gt;
/*&lt;br /&gt;
This function takes no arguments. call as:&lt;br /&gt;
some_ticker_object.setUp();&lt;br /&gt;
&lt;br /&gt;
It initilizes ticker options based on what the class name of the ticker element is.&lt;br /&gt;
The options are (mostly) encoded as follows in a class attribute:&lt;br /&gt;
&lt;br /&gt;
Ticker_&amp;lt;option name- no dashes, underscore allowed&amp;gt;-&amp;lt;urlencoded option value(must end in alphanumeric or _ character)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
options are separated by a space (each is a different class).&lt;br /&gt;
###################################################&lt;br /&gt;
##This function must be extra careful not to be  ##&lt;br /&gt;
##vulnurable to an xss attack as it directly     ##&lt;br /&gt;
##deals with editable on wiki data, that could be##&lt;br /&gt;
##malicious! be careful                          ##&lt;br /&gt;
###################################################&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    //check to see if we really have an element&lt;br /&gt;
    if (!(this.elm &amp;amp;&amp;amp; this.elm.nodeType &amp;amp;&amp;amp; this.elm.nodeType === 1)) throw new Error(&amp;quot;no element, or invalid element for ticker&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    var propMatch = /\bTicker_(\w+)-(\S*)\b/g;&lt;br /&gt;
    var res;&lt;br /&gt;
    var plusSign = /\+/g;&lt;br /&gt;
    &lt;br /&gt;
    while(res = propMatch.exec(this.arg)) {&lt;br /&gt;
       switch(res[1]) { //option name&lt;br /&gt;
            case &amp;quot;speed&amp;quot;:&lt;br /&gt;
              var speed = parseFloat(decodeURIComponent(res[2]));&lt;br /&gt;
              if (isNaN(speed)) break;&lt;br /&gt;
              speed = 1/speed; //turn delay into speed multiplier&lt;br /&gt;
              if (speed &amp;lt; 1e-5) break;&lt;br /&gt;
              if (speed &amp;gt; 1e2)  break;&lt;br /&gt;
              &lt;br /&gt;
              this.speed = speed;&lt;br /&gt;
              break;&lt;br /&gt;
&lt;br /&gt;
            case &amp;quot;strRight&amp;quot;:&lt;br /&gt;
              res[2] = res[2].replace(plusSign, &amp;#039;%20&amp;#039;);//encode + with % encode. does this work w/unicode&lt;br /&gt;
              res[2] = res[2].replace(&amp;#039;%00&amp;#039;, &amp;#039;&amp;#039;);&lt;br /&gt;
              this.strRight = decodeURIComponent(res[2]);&lt;br /&gt;
              break;&lt;br /&gt;
&lt;br /&gt;
            case &amp;quot;strLeft&amp;quot;:&lt;br /&gt;
              res[2] = res[2].replace(plusSign, &amp;#039;%20&amp;#039;);//encode + with % encode. does this work w/unicode&lt;br /&gt;
              res[2] = res[2].replace(&amp;#039;%00&amp;#039;, &amp;#039;&amp;#039;);&lt;br /&gt;
              this.strLeft = decodeURIComponent(res[2]);&lt;br /&gt;
              break;&lt;br /&gt;
&lt;br /&gt;
            case &amp;quot;strLinkText&amp;quot;:&lt;br /&gt;
              res[2] = res[2].replace(plusSign, &amp;#039;%20&amp;#039;);//encode + with % encode. does this work w/unicode&lt;br /&gt;
              res[2] = res[2].replace(&amp;#039;%00&amp;#039;, &amp;#039;&amp;#039;);&lt;br /&gt;
              this.strLinkText = decodeURIComponent(res[2]);&lt;br /&gt;
              break;&lt;br /&gt;
&lt;br /&gt;
            case &amp;quot;strLinkURI&amp;quot;:&lt;br /&gt;
              //despite name, actually local page name, not a URI&lt;br /&gt;
              var page = encodeURIComponent(decodeURIComponent(res[2])); //note encode not decode&lt;br /&gt;
              if (page.match(/^special(%3A|:)userlogout/i)) break; //link is malicious&lt;br /&gt;
              this.strLinkURI = (page.length &amp;gt; 0) ? mw.config.get(&amp;#039;wgServer&amp;#039;) + mw.config.get(&amp;#039;wgArticlePath&amp;#039;).replace(&amp;quot;$1&amp;quot;, page) : null;&lt;br /&gt;
              break;&lt;br /&gt;
&lt;br /&gt;
            case &amp;quot;engine&amp;quot;:&lt;br /&gt;
              //takes a literal engine name&lt;br /&gt;
              var engName = decodeURIComponent(res[2]);&lt;br /&gt;
              if (engName.match(/^\d+$/)||engName.length === 0) break;&lt;br /&gt;
              this.engineNumb = (typeof Bawolff.Ticker.eng[engName] === &amp;quot;number&amp;quot; ? Bawolff.Ticker.eng[engName] : this.engineNumb);&lt;br /&gt;
                &lt;br /&gt;
            default: &lt;br /&gt;
              //throw new Error(&amp;quot;not implemented&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    this.bigList = this.elm.getElementsByTagName(&amp;quot;li&amp;quot;); //items to cycle ticker through&lt;br /&gt;
    this.listLength = this.bigList.length;&lt;br /&gt;
};&lt;br /&gt;
Bawolff.Ticker.prototype.start = function() {&lt;br /&gt;
//Start the ticker sets it up as well) separate from restart&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
Creates a &amp;lt;ul class=&amp;quot;actualTicker&amp;quot;&amp;gt; - actualTicker&lt;br /&gt;
            &amp;lt;span class=&amp;quot;tickerIntroduction&amp;quot;&amp;gt;(into &amp;lt;a class=&amp;quot;tickerLink&amp;quot;&amp;gt;stuff&amp;lt;/a&amp;gt;):&amp;lt;/span&amp;gt; - realTicker &lt;br /&gt;
            &amp;lt;li &amp;gt; ...&amp;lt;/li&amp;gt; (dummyItem)&lt;br /&gt;
          &amp;lt;/ul&amp;gt;&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
    this.elm.style.display = &amp;quot;none&amp;quot;; //hide the list&lt;br /&gt;
&lt;br /&gt;
    var actualTicker = this.tickerElm = document.createElement(&amp;quot;ul&amp;quot;);&lt;br /&gt;
    actualTicker.className = &amp;quot;actualTicker&amp;quot;;    &lt;br /&gt;
&lt;br /&gt;
    var realTicker = document.createElement(&amp;quot;Span&amp;quot;);&lt;br /&gt;
    realTicker.className = &amp;quot;tickerIntroduction&amp;quot;;&lt;br /&gt;
    realTicker.appendChild(document.createTextNode(this.strLeft));&lt;br /&gt;
&lt;br /&gt;
    var realTickerLink = document.createElement(&amp;quot;a&amp;quot;);&lt;br /&gt;
    realTickerLink.href= this.strLinkURI;&lt;br /&gt;
    realTickerLink.title = this.strLinkText;&lt;br /&gt;
    realTickerLink.className = &amp;quot;tickerLink&amp;quot;;&lt;br /&gt;
    realTickerLink.appendChild(document.createTextNode(this.strLinkText));&lt;br /&gt;
    realTicker.appendChild(realTickerLink);&lt;br /&gt;
&lt;br /&gt;
    realTicker.appendChild(document.createTextNode(this.strRight));&lt;br /&gt;
    //Start the 2nd (Actual) span&lt;br /&gt;
&lt;br /&gt;
    actualTicker.appendChild(realTicker);&lt;br /&gt;
&lt;br /&gt;
    var dummyItem = document.createElement(&amp;quot;li&amp;quot;);&lt;br /&gt;
    actualTicker.appendChild(dummyItem);&lt;br /&gt;
&lt;br /&gt;
    this.elm.parentNode.insertBefore(actualTicker, this.elm);&lt;br /&gt;
&lt;br /&gt;
    this[Bawolff.Ticker.eng[this.engineNumb]](true); //Start the engine (ticker)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
Bawolff.Ticker.prototype.pause = function () {&lt;br /&gt;
    this.curState = &amp;quot;paused&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
Bawolff.Ticker.prototype.restart = function () {&lt;br /&gt;
    if (this.curState !== &amp;quot;paused&amp;quot;) return false;&lt;br /&gt;
    this.curState = &amp;quot;ok&amp;quot;;&lt;br /&gt;
    window.setTimeout(this.resumeFunc, this.resumeDelay);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
####&lt;br /&gt;
functions that are direct properties of the ticker constructor (not in prototype chain)&lt;br /&gt;
####&lt;br /&gt;
*/&lt;br /&gt;
Bawolff.Ticker.eng = []; //Stores object mapping engine name to engine number&lt;br /&gt;
Bawolff.Ticker.registerEngine = function (engName, engine) {&lt;br /&gt;
/*&lt;br /&gt;
This function takes care of hooking up engines (transitions)&lt;br /&gt;
into the system.&lt;br /&gt;
Arguments: String engName - name of engine (can not be a number)&lt;br /&gt;
           function engine - function containing engine code&lt;br /&gt;
&lt;br /&gt;
Structure of what an engine should look like is noted somewhere (FIXME)&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
    //to prevent screwing around with length property. considered an array index, even if passed a string with an interger value&lt;br /&gt;
    if (typeof engName !== &amp;quot;string&amp;quot; || (engName.match(/^\d+$/) !== null)) throw new Error(&amp;quot;Invalid engine name. (can&amp;#039;t be a number)&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    var te_s = Bawolff.Ticker.eng;&lt;br /&gt;
    var listLen = te_s.length;&lt;br /&gt;
    te_s[listLen] = &amp;quot;eng-&amp;quot; + engName;&lt;br /&gt;
    te_s[engName] = listLen;&lt;br /&gt;
&lt;br /&gt;
    Bawolff.Ticker.prototype[&amp;quot;eng-&amp;quot; + engName] = engine; //is that really the best way to add the engine functions?&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Bawolff.Ticker.registerEngine(&amp;quot;none&amp;quot;, function(state) {&lt;br /&gt;
/*&lt;br /&gt;
This function is a dummy transition (no animation, but changes it)&lt;br /&gt;
&lt;br /&gt;
called as:&lt;br /&gt;
tick() - advance one letter forward (unused)&lt;br /&gt;
tick(flase) - last tick before break&lt;br /&gt;
tick(true) - set up/first tick&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
    if (!state) return true; //Shouldn&amp;#039;t happen as null transition. normally can&amp;#039;t do this&lt;br /&gt;
&lt;br /&gt;
    if (state) {&lt;br /&gt;
        var newItem = this.bigList[this.listIndex].cloneNode(true); //true means deep&lt;br /&gt;
        this.tickerElm.replaceChild(newItem, this.tickerElm.lastChild);&lt;br /&gt;
        this.listIndex++;&lt;br /&gt;
        this.listIndex &amp;gt;= this.listLength ? this.listIndex = 0: true;&lt;br /&gt;
&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        var resF = function() {&lt;br /&gt;
            cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj, true);&lt;br /&gt;
        };&lt;br /&gt;
        var resD = 7000*cur_obj.speed*cur_obj.resetSpeed;&lt;br /&gt;
        if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
            this.resumeFunc = resF;&lt;br /&gt;
            this.resumeDelay = resD;&lt;br /&gt;
        } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
            window.setTimeout(resF, resD);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
Bawolff.Ticker.registerEngine(&amp;quot;std&amp;quot;, function(state) {&lt;br /&gt;
/*&lt;br /&gt;
This function is a standard - 1 char at a time ticker&lt;br /&gt;
&lt;br /&gt;
//this is not the greatest done tick function. In a paticular it expects a list formated&lt;br /&gt;
// a specific way, and does not handle exceptional conditions as it should&lt;br /&gt;
//this should be fixed later&lt;br /&gt;
&lt;br /&gt;
called as:&lt;br /&gt;
tick() - advance one letter forward (unused)&lt;br /&gt;
tick(flase) - last tick before break&lt;br /&gt;
tick(true) - set up/first tick&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
    if (state === false) {&lt;br /&gt;
        this.tickerElm.lastChild.firstChild.firstChild.data = this.fullItem.substring(0,this.charIndex); // kill ...&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        var resF = function() {&lt;br /&gt;
            cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj, true);&lt;br /&gt;
        };&lt;br /&gt;
        var resD = 7000*cur_obj.speed*cur_obj.resetSpeed;&lt;br /&gt;
        if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
            this.resumeFunc = resF;&lt;br /&gt;
            this.resumeDelay = resD;&lt;br /&gt;
        } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
            window.setTimeout(resF, resD);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (state === void 0) { //undefined as in normal tick&lt;br /&gt;
        if (this.charIndex === this.fullItem.length) {&lt;br /&gt;
            //if we&amp;#039;re done&lt;br /&gt;
&lt;br /&gt;
            var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
            var resF = function() {&lt;br /&gt;
                cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj, false);&lt;br /&gt;
            };&lt;br /&gt;
            var resD = 60*cur_obj.speed*cur_obj.tickSpeed;&lt;br /&gt;
            if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
                this.resumeFunc = resF;&lt;br /&gt;
                this.resumeDelay = resD;&lt;br /&gt;
            } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
                window.setTimeout(resF, resD);&lt;br /&gt;
            }&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        this.charIndex++;&lt;br /&gt;
        this.tickerElm.lastChild.firstChild.firstChild.data = this.fullItem.substring(0,this.charIndex) + &amp;#039;...&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        var resF = function() {&lt;br /&gt;
            cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj);&lt;br /&gt;
        };&lt;br /&gt;
        var resD = 60*cur_obj.speed*cur_obj.tickSpeed;&lt;br /&gt;
        if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
            this.resumeFunc = resF;&lt;br /&gt;
            this.resumeDelay = resD;&lt;br /&gt;
        } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
            window.setTimeout(resF, resD);&lt;br /&gt;
        }&lt;br /&gt;
        return true;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (state) {&lt;br /&gt;
        var newItem = this.bigList[this.listIndex].cloneNode(true); //true means deep&lt;br /&gt;
//This still doesn&amp;#039;t handle exceptional situations as good as possible, but it won&amp;#039;t indef loop or freeze&lt;br /&gt;
        if (newItem.firstChild.firstChild !== null) { //Link and then text&lt;br /&gt;
            this.fullItem = newItem.firstChild.firstChild.data;    &lt;br /&gt;
            newItem.firstChild.firstChild.data = &amp;quot;&amp;quot;;&lt;br /&gt;
        } else if (newItem.firstChild !== null) { //just text&lt;br /&gt;
            this.fullItem = newItem.firstChild.data;    &lt;br /&gt;
            newItem.replaceChild(document.createElement(&amp;quot;span&amp;quot;), newItem.firstChild);&lt;br /&gt;
            newItem.firstChild.appendChild(document.createTextNode(&amp;quot;&amp;quot;));&lt;br /&gt;
        } else { //input confused script. send error message&lt;br /&gt;
            newitem.insertBefore(document.createElement(&amp;quot;strong&amp;quot;), null);&lt;br /&gt;
            newitem.firstChild.className = &amp;quot;error&amp;quot;;&lt;br /&gt;
            newitem.firstChild.appendChild(document.createTextNode(&amp;quot;Error: List item incorrectly formated for this ticker type. Please use unformatted text, or a single unformatted link (or otherwise one element deep).&amp;quot;));&lt;br /&gt;
            this.fullItem = newItem.firstChild.firstChild.data;&lt;br /&gt;
            newItem.firstChild.firstChild.data = &amp;quot;&amp;quot;;&lt;br /&gt;
        }    &lt;br /&gt;
            &lt;br /&gt;
        this.charIndex = 0;&lt;br /&gt;
&lt;br /&gt;
        this.tickerElm.replaceChild(newItem, this.tickerElm.lastChild);&lt;br /&gt;
        this.listIndex++;&lt;br /&gt;
        this.listIndex &amp;gt;= this.listLength ? this.listIndex = 0: true;&lt;br /&gt;
&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bawolff.Ticker.registerEngine(&amp;quot;fade&amp;quot;, function(state) {&lt;br /&gt;
/*&lt;br /&gt;
This function is a fade in effect&lt;br /&gt;
&lt;br /&gt;
This is relies on Css3+MSIE extentions, and thus isn&amp;#039;t all that cross browser compatible&lt;br /&gt;
&lt;br /&gt;
called as:&lt;br /&gt;
tick() - advance one letter forward (unused)&lt;br /&gt;
tick(flase) - last tick before break&lt;br /&gt;
tick(true) - set up/first tick&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
    if (state === false) { //sleep&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        var resF = function() {&lt;br /&gt;
            cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj, true);&lt;br /&gt;
        };&lt;br /&gt;
        var resD = 7000*cur_obj.speed*cur_obj.resetSpeed;&lt;br /&gt;
        if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
            this.resumeFunc = resF;&lt;br /&gt;
            this.resumeDelay = resD;&lt;br /&gt;
        } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
            window.setTimeout(resF, resD);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (state === void 0) { //undefined as in normal tick&lt;br /&gt;
        if (this.charIndex === 100) {&lt;br /&gt;
            //if we&amp;#039;re done&lt;br /&gt;
&lt;br /&gt;
            var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
            var resF = function() {&lt;br /&gt;
                cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj, false);&lt;br /&gt;
            };&lt;br /&gt;
            var resD = 40*cur_obj.speed*cur_obj.tickSpeed;&lt;br /&gt;
            if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
                this.resumeFunc = resF;&lt;br /&gt;
                this.resumeDelay = resD;&lt;br /&gt;
            } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
                window.setTimeout(resF, resD);&lt;br /&gt;
            }&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        this.charIndex++;&lt;br /&gt;
        Bawolff.setTrans(this.tickerElm.lastChild, this.charIndex/100);&lt;br /&gt;
&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        var resF = function() {&lt;br /&gt;
            cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj);&lt;br /&gt;
        }&lt;br /&gt;
        var resD = 40*cur_obj.speed*cur_obj.tickSpeed;&lt;br /&gt;
        if (this.curState === &amp;quot;paused&amp;quot;) {&lt;br /&gt;
            this.resumeFunc = resF;&lt;br /&gt;
            this.resumeDelay = resD;&lt;br /&gt;
        } else { //assume &amp;quot;ok&amp;quot; but allow other states&lt;br /&gt;
            window.setTimeout(resF, resD);&lt;br /&gt;
        }&lt;br /&gt;
        return true;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
        if (state) {&lt;br /&gt;
&lt;br /&gt;
        this.charIndex = 0;&lt;br /&gt;
&lt;br /&gt;
        var newItem = this.bigList[this.listIndex].cloneNode(true); //true means deep&lt;br /&gt;
        Bawolff.setTrans(newItem, 0);&lt;br /&gt;
        (navigator &amp;amp;&amp;amp; navigator.appName === &amp;quot;Microsoft Internet Explorer&amp;quot;) ? newItem.style.display = &amp;#039;inline-block&amp;#039; : true;&lt;br /&gt;
        this.tickerElm.replaceChild(newItem, this.tickerElm.lastChild);&lt;br /&gt;
        this.listIndex++;&lt;br /&gt;
        this.listIndex &amp;gt;= this.listLength ? this.listIndex = 0: true;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        var cur_obj = this; //needed, as otherwise executes in context of window&lt;br /&gt;
        cur_obj[Bawolff.Ticker.eng[cur_obj.engineNumb]].call(cur_obj);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/*Not really used. To make all pause call Bawolff.Ticker.allDo(&amp;quot;pause&amp;quot;);&lt;br /&gt;
Bawolff.Ticker.allDo =  function (func) {&lt;br /&gt;
    var l = Bawolff.Ticker.allTickers.length;&lt;br /&gt;
    for (var i=0;i&amp;lt;l;i++) {&lt;br /&gt;
        Bawolff.Ticker.allTickers[i][func]();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
*/&lt;br /&gt;
Bawolff.Ticker.allDoPause =  function () {&lt;br /&gt;
    var l = Bawolff.Ticker.allTickers.length;&lt;br /&gt;
    for (var i=0;i&amp;lt;l;i++) {&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].pause();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
Bawolff.Ticker.allDoRestart =  function () {&lt;br /&gt;
    var l = Bawolff.Ticker.allTickers.length;&lt;br /&gt;
    for (var i=0;i&amp;lt;l;i++) {&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].restart();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Bawolff.setTrans = function(elm, opacity/*1 being full visible, 0 being invisible*/) {&lt;br /&gt;
    if (!Bawolff.setTrans.opacityMethod) {&lt;br /&gt;
        //standard way (CSS3)&lt;br /&gt;
        if (elm.style &amp;amp;&amp;amp; (typeof elm.style.opacity != &amp;quot;undefined&amp;quot;)) {&lt;br /&gt;
            Bawolff.setTrans.opacityMethod = 1;&lt;br /&gt;
        }&lt;br /&gt;
        else if (elm.style &amp;amp;&amp;amp; (typeof elm.style.MozOpacity != &amp;quot;undefined&amp;quot;)) { //old moz&lt;br /&gt;
            Bawolff.setTrans.opacityMethod = 2;&lt;br /&gt;
        }&lt;br /&gt;
        else if (elm.style &amp;amp;&amp;amp; (typeof elm.style.filter != &amp;quot;undefined&amp;quot;)) {&lt;br /&gt;
            Bawolff.setTrans.opacityMethod = 3;&lt;br /&gt;
        }&lt;br /&gt;
        else {&lt;br /&gt;
            &lt;br /&gt;
            //throw new Error(&amp;quot;opacity is not supported on this platform (or this script needs to be fixed to include support on your platform&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    switch (Bawolff.setTrans.opacityMethod) {&lt;br /&gt;
        case 1:&lt;br /&gt;
            elm.style.opacity = opacity;&lt;br /&gt;
            break;&lt;br /&gt;
        case 2:&lt;br /&gt;
            elm.style.MozOpacity = opacity;&lt;br /&gt;
            break;&lt;br /&gt;
        case 3:&lt;br /&gt;
            elm.style.filter = &amp;quot;alpha(opacity=&amp;quot; + opacity*100 + &amp;quot;)&amp;quot;; //No guarantees this works&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            //do nothing, so other browsers not inconvianced&lt;br /&gt;
            break;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Bawolff.Ticker.init = function () {&lt;br /&gt;
    //handled elsewhere if (!document.getElementById(&amp;quot;enableTickers&amp;quot;)) return false; //Bcause getting all elements by class is expensive&lt;br /&gt;
&lt;br /&gt;
    var tickerList = document.getElementsByClassName(&amp;quot;isATicker&amp;quot;);&lt;br /&gt;
    var l = tickerList.length;&lt;br /&gt;
    var i = 0; //index of which ticker we are on.&lt;br /&gt;
&lt;br /&gt;
    Bawolff.Ticker.allTickers = [];&lt;br /&gt;
&lt;br /&gt;
    if (document.getElementById(&amp;quot;singleTickerForPage&amp;quot;)) { //for simplifications. if only one on page&lt;br /&gt;
        Bawolff.Ticker.allTickers[i] = new Bawolff.Ticker;&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].elm = document.getElementById(&amp;quot;singleTickerForPage&amp;quot;);&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].arg = document.getElementById(&amp;quot;singleTickerForPage&amp;quot;).className;&lt;br /&gt;
&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].setUp();&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].start();&lt;br /&gt;
        i++;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    for (;i&amp;lt;l;i++) {&lt;br /&gt;
        Bawolff.Ticker.allTickers[i] = new Bawolff.Ticker;&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].elm = tickerList[i];&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].arg = tickerList[i].className;&lt;br /&gt;
&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].setUp();&lt;br /&gt;
        Bawolff.Ticker.allTickers[i].start();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if (!(navigator &amp;amp;&amp;amp; navigator.appName === &amp;quot;Microsoft Internet Explorer&amp;quot;)) {&lt;br /&gt;
    //blur sometimes fires too much on MSIE and makes things not work&lt;br /&gt;
    hookEvent(&amp;#039;blur&amp;#039;, Bawolff.Ticker.allDoPause);//stop anim on loss of focus, and restart it on gain of focus. hookEvent from wikibits&lt;br /&gt;
    hookEvent(&amp;#039;focus&amp;#039;, Bawolff.Ticker.allDoRestart);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
Bawolff.Ticker.init(); //already from a load event&lt;/div&gt;</summary>
		<author><name>Xineohp1506</name></author>
	</entry>
</feed>