// ==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