commit d7010daaa0d43e61584f0a785b8f1bb6df665354 Author: Will Bradley Date: Sun Jan 13 00:24:16 2019 -0800 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..70844ce --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Chimera Calendar Kiosk Setup + +To get wifi working on NOOBS, try: + +* https://kerneldriver.wordpress.com/2012/10/21/configuring-wpa2-using-wpa_supplicant-on-the-raspberry-pi/ + +Set up Chromium with the following plugins: + +* Tampermonkey (for running userscripts) + * With the kioskify-meetup-events userscript from: https://greasyfork.org/en/users/236588-zyphlar + +Set Chromium to start on boot: + +* Edit Startup Apps diff --git a/kioskify-meetup-events.js b/kioskify-meetup-events.js new file mode 100644 index 0000000..f164d0a --- /dev/null +++ b/kioskify-meetup-events.js @@ -0,0 +1,185 @@ +// ==UserScript== +// @name Kioskify Meetup.com Events +// @version 3 +// @grant none +// @run-at document-start +// @match https://*.meetup.com/*events* +// @license GNU General Public License v3.0 only +// @supportURL https://gitlab.com/zyphlar/kioskify-meetup-events +// @contributionURL https://gitlab.com/zyphlar/kioskify-meetup-events +// @compatible firefox +// @compatible chrome +// @namespace https://greasyfork.org/users/236588 +// @description Want to show Meetup.com events on a screen 24/7? Use this script to make it look better. NOTE: if the script doesn't load, try going directly to the events url instead of browsing to it. +// ==/UserScript== + +// Copyright (C) 2019 zyphlar +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + +"use strict"; + +function simplifyMeetup(){ + console.log("Simplifying your life..."); + + //hideElementsByClassName("groupHomeHeader"); // large group name and image at top + hideElementsByClassName("stripe"); // all full-width "chrome" on page + hideElementsByClassName("sticky-ontheside"); // upcoming/past/drafts widget + hideElementsByClassName("relatedEvents"); // other events at far bottom + + // add padding to top for scroll + try { + var padding = document.createElement("p"); + padding.style = "margin:400px"; + document.getElementsByClassName("eventList-list")[0].prepend(padding); + } catch (e) { console.log(e); } + + // add banner to header + try { + document.getElementsByClassName("navItem")[0].innerHTML += '

Upcoming Events

'; + } catch (e) { console.log(e); } + + // make header fixed + try { + document.getElementById("globalNav").style = "position: fixed; width: 100%;"; + } catch (e) { console.log(e); } + + // add fixed footer + try { + var footer = document.createElement("div"); + footer.style = "position:fixed; bottom: 0; width: 100%; background: white; padding: 1em; border-top: 2px solid rgba(46,62,72,.12); text-align: center;"; + footer.innerHTML = "See details at ChimeraArts.org or Meetup.com!"; + document.getElementsByTagName("body")[0].append(footer); + } catch (e) { console.log(e); } +} + + +function hideElementById(id) { + var e = document.getElementById(id); + if (e) { + e.style = "display: none;"; + } +} + +function hideElementsByClassName(name) { + var e = document.getElementsByClassName(name); + for (var i=0;i