This commit is contained in:
Ral 2021-12-27 00:26:02 +01:00
parent a8c13b0dab
commit 201ce27daf
6 changed files with 22 additions and 15 deletions

View File

@ -4,8 +4,8 @@
<meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"> <meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>rC3 NOWHERE</title> <title>rC3 NOWHERE</title>
<link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css> <link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css>
<link rel=stylesheet href=https://infobeamer.montage2.de/main.min.b34cf8f32ebf8158101dc492d21641a7a52c484c65ce5c4bfbd0df55d3455d1d.css> <link rel=stylesheet href=https://infobeamer.montage2.de/main.min.f6881ddf12ee6ca5a923b212d616698396a114e77226dc54d1346d52d9b85fca.css>
<script src=https://infobeamer.montage2.de/js/config.c3055781f00111fd050e1e5732c9e6dbd2dce21204e90b02975e9983a4c367f7.js integrity="sha256-wwVXgfABEf0FDh5XMsnm29Lc4hIE6QsCl16Zg6TDZ/c="></script> <script src=https://infobeamer.montage2.de/js/config.0f4d0d28e4cf21f765f0b1911e185b73399aa76b4db102fc085df728a4e0c8fe.js integrity="sha256-D00NKOTPIfdl8LGRHhhbczmap2tNsQL8CF33KKTgyP4="></script>
</head> </head>
<body> <body>
<main id=main> <main id=main>
@ -13,6 +13,6 @@
<script src=https://infobeamer.montage2.de/js/moment/moment.min.73de4254959530e4d1d9bec586379184f96b4953dacf9cd5e5e2bdd7bfeceef7.js integrity="sha256-c95CVJWVMOTR2b7FhjeRhPlrSVPaz5zV5eK917/s7vc="></script> <script src=https://infobeamer.montage2.de/js/moment/moment.min.73de4254959530e4d1d9bec586379184f96b4953dacf9cd5e5e2bdd7bfeceef7.js integrity="sha256-c95CVJWVMOTR2b7FhjeRhPlrSVPaz5zV5eK917/s7vc="></script>
<script src=https://infobeamer.montage2.de/js/preact/preact.min.0c204e20934f1e09cfe86fbcf1d069d842f988fc71efe3a923021c08892c71c8.js integrity="sha256-DCBOIJNPHgnP6G+88dBp2EL5iPxx7+OpIwIcCIksccg="></script> <script src=https://infobeamer.montage2.de/js/preact/preact.min.0c204e20934f1e09cfe86fbcf1d069d842f988fc71efe3a923021c08892c71c8.js integrity="sha256-DCBOIJNPHgnP6G+88dBp2EL5iPxx7+OpIwIcCIksccg="></script>
<script src=https://infobeamer.montage2.de/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script> <script src=https://infobeamer.montage2.de/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
<script src=https://infobeamer.montage2.de/main.7b9386a5aed538c367cecbb578d8b458be6fcb679fa7b83c00402918b7b123aa.js integrity="sha256-e5OGpa7VOMNnzsu1eNi0WL5vy2efp7g8AEApGLexI6o=" type=module></script> <script src=https://infobeamer.montage2.de/main.8966886766c73e23bb53a40fa0239b6ddb4f4acb8c9c08d717a644f4a82a2b8f.js integrity="sha256-iWaIZ2bHPiO7U6QPoCObbdtPSsuMnAjXF6ZE9KgqK48=" type=module></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
window.infoBeamerConfig.set("mastodonURL", "/toots-rc3-chaos.social.json"); window.infoBeamerConfig.set("mastodonURL", "/toots-rc3-chaos.social.json");
window.infoBeamerConfig.set("mastodonFetchInterval", 120); window.infoBeamerConfig.set("mastodonFetchInterval", 120);
window.infoBeamerConfig.set("musicURL", "/music.json"); window.infoBeamerConfig.set("musicURL", "/music.json");
window.infoBeamerConfig.set("musicFetchInterval", 5); window.infoBeamerConfig.set("musicFetchInterval", 1);
console.log("Info Beamer Configuration: "); console.log("Info Beamer Configuration: ");
console.log(window.infoBeamerConfig); console.log(window.infoBeamerConfig);
})(); })();

View File

@ -3,6 +3,7 @@
// ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/services.js // ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/services.js
var delay = 3 * 5 * 60 * 1e3; var delay = 3 * 5 * 60 * 1e3;
var postsLimit = 20; var postsLimit = 20;
var postMaxAge = 32 * 24 * 60 * 60 * 1e3;
var defaultUrlSet = [ var defaultUrlSet = [
"https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png", "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png",
"https://chaos.social/avatars/original/missing.png" "https://chaos.social/avatars/original/missing.png"
@ -10,15 +11,18 @@
var default_profile_image_url = () => "./nounicorn.png"; var default_profile_image_url = () => "./nounicorn.png";
var social_limiter = (tweets, toots) => { var social_limiter = (tweets, toots) => {
let posts = tweets.concat(toots); let posts = tweets.concat(toots);
let maxAge = (p) => Date.parse(p.time) >= Date.now() - postMaxAge;
let recentPosts = posts.filter(maxAge);
let byDate = (fst, snd) => Date.parse(fst.time) - Date.parse(snd.time); let byDate = (fst, snd) => Date.parse(fst.time) - Date.parse(snd.time);
let postsSorted = posts.sort(byDate); let postsSorted = recentPosts.sort(byDate);
console.log("Number distinct social posts in loop: " + postsSorted.length);
if (postsSorted.length > 0) { if (postsSorted.length > 0) {
while (postsSorted.length < postsLimit) { while (postsSorted.length < postsLimit) {
postsSorted = postsSorted.concat(postsSorted); postsSorted = postsSorted.concat(postsSorted);
} }
} }
postsSorted = postsSorted.reverse().slice(0, postsLimit); let postsLimited = postsSorted.reverse().slice(0, postsLimit);
return postsSorted; return postsLimited;
}; };
var replace_default_image_url = (url) => defaultUrlSet.includes(url) === true ? default_profile_image_url() : url; var replace_default_image_url = (url) => defaultUrlSet.includes(url) === true ? default_profile_image_url() : url;
var tweet_author = (data, tweet) => { var tweet_author = (data, tweet) => {
@ -106,7 +110,11 @@
}; };
var music_update = (musicA, musicB) => { var music_update = (musicA, musicB) => {
if (is_new_music(musicA, musicB) === true) { if (is_new_music(musicA, musicB) === true) {
musicB.forEach((m) => m.since = Date.now()); musicB.forEach((mb) => mb.since = Date.now());
} else {
musicA.forEach((ma) => {
musicB.forEach((mb) => mb.since = ma.since);
});
} }
return musicB; return musicB;
}; };
@ -114,7 +122,7 @@
// ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/dom.js // ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/dom.js
var html = htm.bind(preact.h); var html = htm.bind(preact.h);
var hereRoom = "Chaos-West TV"; var hereRoom = "Chaos-West TV";
var number_events_all = 7; var number_events_all = 8;
var musicAge = 5 * 1e3; var musicAge = 5 * 1e3;
var urgent = 5 * 60 * 1e3; var urgent = 5 * 60 * 1e3;
var stale = 3 * 5 * 60 * 1e3; var stale = 3 * 5 * 60 * 1e3;
@ -492,8 +500,7 @@
} else { } else {
console.log("Your browser doesn't support web workers."); console.log("Your browser doesn't support web workers.");
} }
var fakeNow = 0; var fakeTimeDelta = 0;
var fakeTimeDelta = fakeNow - Date.now();
function update_screen() { function update_screen() {
let realTime = new Date(); let realTime = new Date();
console.log("Updating screen at at: " + realTime); console.log("Updating screen at at: " + realTime);
@ -507,7 +514,7 @@
} }
function main_loop() { function main_loop() {
update_screen(); update_screen();
setTimeout(main_loop, 5 * 1e3); setTimeout(main_loop, 1 * 1e3);
} }
main_loop(); main_loop();
})(); })();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<title>rC3 NOWHERE</title> <title>rC3 NOWHERE</title>
<link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css> <link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css>
<link rel=stylesheet href=https://infobeamer.montage2.de/main.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css> <link rel=stylesheet href=https://infobeamer.montage2.de/main.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css>
<script src=https://infobeamer.montage2.de/js/config.c3055781f00111fd050e1e5732c9e6dbd2dce21204e90b02975e9983a4c367f7.js integrity="sha256-wwVXgfABEf0FDh5XMsnm29Lc4hIE6QsCl16Zg6TDZ/c="></script> <script src=https://infobeamer.montage2.de/js/config.0f4d0d28e4cf21f765f0b1911e185b73399aa76b4db102fc085df728a4e0c8fe.js integrity="sha256-D00NKOTPIfdl8LGRHhhbczmap2tNsQL8CF33KKTgyP4="></script>
</head> </head>
<body> <body>
<main id=main> <main id=main>
@ -13,6 +13,6 @@
<script src=https://infobeamer.montage2.de/js/moment/moment.min.73de4254959530e4d1d9bec586379184f96b4953dacf9cd5e5e2bdd7bfeceef7.js integrity="sha256-c95CVJWVMOTR2b7FhjeRhPlrSVPaz5zV5eK917/s7vc="></script> <script src=https://infobeamer.montage2.de/js/moment/moment.min.73de4254959530e4d1d9bec586379184f96b4953dacf9cd5e5e2bdd7bfeceef7.js integrity="sha256-c95CVJWVMOTR2b7FhjeRhPlrSVPaz5zV5eK917/s7vc="></script>
<script src=https://infobeamer.montage2.de/js/preact/preact.min.0c204e20934f1e09cfe86fbcf1d069d842f988fc71efe3a923021c08892c71c8.js integrity="sha256-DCBOIJNPHgnP6G+88dBp2EL5iPxx7+OpIwIcCIksccg="></script> <script src=https://infobeamer.montage2.de/js/preact/preact.min.0c204e20934f1e09cfe86fbcf1d069d842f988fc71efe3a923021c08892c71c8.js integrity="sha256-DCBOIJNPHgnP6G+88dBp2EL5iPxx7+OpIwIcCIksccg="></script>
<script src=https://infobeamer.montage2.de/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script> <script src=https://infobeamer.montage2.de/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
<script src=https://infobeamer.montage2.de/main.7b9386a5aed538c367cecbb578d8b458be6fcb679fa7b83c00402918b7b123aa.js integrity="sha256-e5OGpa7VOMNnzsu1eNi0WL5vy2efp7g8AEApGLexI6o=" type=module></script> <script src=https://infobeamer.montage2.de/main.8966886766c73e23bb53a40fa0239b6ddb4f4acb8c9c08d717a644f4a82a2b8f.js integrity="sha256-iWaIZ2bHPiO7U6QPoCObbdtPSsuMnAjXF6ZE9KgqK48=" type=module></script>
</body> </body>
</html> </html>