JSFiddle - React, Tailwind, and code Playground
by omni5cience
HTML
<div id="upcomingjs"></div>
CSS
#upcomingjs table { width: 100%; border: none; }
#upcomingjs thead { display: none; }
#upcomingjs table th, #upcomingjs table td { text-align: left; border: none; padding-top: 0; padding-left: 0; }
#upcomingjs td[headers="event-info"] * { display: none; }
#upcomingjs td[headers="event-info"] .summary { display: inline; }
.vevent abbr[title] { border-bottom: none; cursor: default; }
#upcomingjs .vevent { background-color: #ddd; }
body { background-color: white; }
JavaScript
/*jslint white: false, onevar: true, browser: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, regexp: true, strict: true, newcap: true, immed: true */
/*global window */
/*
* Upcoming.js
* (c) 2009 Kyle Adams <kyleandkelly.com>
* MIT license
*
* array.js
*
* Ensure various array functions are uniformly implemented
* across browsers.
*/
"use strict";
// Make sure an Array.map function is implemented, per
// https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/Map
if (!Array.prototype.map) {
Array.prototype.map = function(fun /*, thisp*/) {
var len = this.length >>> 0,
res = new Array(len),
thisp = arguments[1];
if (typeof fun !== "function") {
throw new TypeError();
}
for (var i = 0; i < len; i++) {
if (i in this) {
res[i] = fun.call(thisp, this[i], i, this);
}
}
return res;
};
}
// Make sure an Array.forEach function is implemented, per
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/forEach
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(fun /*, thisp*/) {
var len = this.length >>> 0,
thisp = arguments[1];
if (typeof fun !== "function") {
throw new TypeError();
}
for (var i = 0; i < len; i++) {
if (i in this) {
fun.call(thisp, this[i], i, this);
}
}
};
}
// Make sure an Array.filter function is implemented, per
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter
if (!Array.prototype.filter) {
Array.prototype.filter = function(fun /*, thisp*/) {
var len = this.length >>> 0,
res = [],
thisp = arguments[1],
val;
if (typeof fun !== "function") {
throw new...