Created
April 10, 2023 19:08
-
-
Save jareha/170e80444cfc448d934ae5bad65ce2a8 to your computer and use it in GitHub Desktop.
Bookmarklet to show film calendar for Merlo Branch of Chicago Public Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint esversion: 8 */ | |
(function () { | |
// Sweden (`sv`) outputs something close to ISO | |
const currentDate = new Date().toLocaleDateString("sv", { | |
timeZone: "America/Chicago", | |
}); | |
const parameters = | |
"?locations=51&programs=5c9261756fdc8d742d2296a5" + | |
"&startDate" + | |
currentDate.split("T")[0].replace("T", ""); | |
const service = "https://chipublib.bibliocommons.com/v2/events"; | |
window.location = service + parameters; | |
})(); | |
// javascript:(function(){const currentDate=new Date().toLocaleDateString("sv",{timeZone:"America/Chicago"});const parameters="?locations=51&programs=5c9261756fdc8d742d2296a5&startDate"+currentDate.split("T")[0].replace("T","");const service="https://chipublib.bibliocommons.com/v2/events";window.location=service+parameters})(); | |
// Minified at https://duckduckgo.com/?q=javascript+minifier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment