diff --git a/index.js b/index.js index 20469c3..25b6dc0 100644 --- a/index.js +++ b/index.js @@ -104,8 +104,6 @@ function update_fahrplan_html() { } } -update_fahrplan(); - /* === TWEETS === */ function update_tweet_ticker() { @@ -144,4 +142,19 @@ function update_tweet_ticker() { } } -update_tweets(); +(function() { + var query = location.search.substr(1); + var result = {}; + query.split("&").forEach(function(part) { + var item = part.split("="); + result[item[0]] = decodeURIComponent(item[1]); + }); + + if (result.room !== undefined) + channel_here = result.room; + + update_fahrplan(); + update_tweets(); + setInterval(update_fahrplan,60000); + setInterval(update_tweets, 60000); +})();