I was playing around with this over the weekend and discovered a better RegEx - one that's less prone to false positives. I also was playing around with the idea of being able to add transitions. A byproduct of that was I noticed that with the custom ERROR message, sometimes the ticker area was blank, and that the added code allowed for a way to prevent that from happening. So, using the updated code:
gajaxticker.js
I changed:
Code:
newsfeed.addregexp(/\s*ERROR: [^<]*/, 'Loading...', 'titlefield')
to:
Code:
newsfeed.onitemload = function(item){if(!item){this.feedcontainer.innerHTML = '<a href="" class="titlefield">Loading...</a>';}};
newsfeed.addregexp(/^\s*ERROR: .*$/, 'Loading...', 'titlefield')
Bookmarks