Read room from URL

This commit is contained in:
octycs 2020-12-22 22:13:37 +01:00
parent cf17068d2d
commit 5969342984
1 changed files with 16 additions and 3 deletions

View File

@ -104,8 +104,6 @@ function update_fahrplan_html() {
}
}
update_fahrplan();
/* === TWEETS === */
function update_tweet_ticker() {
@ -144,4 +142,19 @@ function update_tweet_ticker() {
}
}
(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);
})();