diff --git a/strike-js/strike.css b/strike-js/strike.css deleted file mode 100644 index 3e52807..0000000 --- a/strike-js/strike.css +++ /dev/null @@ -1,27 +0,0 @@ -div#strike-screen { - background-color: black; - min-height: 100%; - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 999999999999999; - display: flex; - align-items: center; - justify-content: center; -} - -div#strike-screen div { - padding: 16px; -} - -div#strike-screen div p { - color: white; - font-size: 32px; - text-align: center; -} - -div#strike-screen div a { - color: white; -} diff --git a/strike-js/strike.js b/strike-js/strike.js deleted file mode 100644 index e73fd44..0000000 --- a/strike-js/strike.js +++ /dev/null @@ -1,43 +0,0 @@ -(function (window, document) { - "use strict"; - - var onStrike = function (messages) { - var body = document.getElementsByTagName('body')[0]; - - // Create the main black full screen container - var screen = document.createElement('div'); - screen.setAttribute('id', 'strike-screen'); - body.appendChild(screen); - - var container = document.createElement('div'); - screen.appendChild(container); - - // Create a `p` element for each phrase. - messages.forEach(function (m) { - var p = document.createElement('p'); - p.insertAdjacentHTML('beforeend', m); - container.appendChild(p); - }); - }; - - window.strike = function (strikeDays, messages) { - - var strikeTest = window.location.search.search('strikeTest') != -1; - - var today = new Date(); - - if (!Array.isArray(strikeDays)) - { - strikeDays = [strikeDays]; - } - - var strikeIsToday = strikeDays.some(function (day) { - return today.toDateString() == day.toDateString(); - }); - - if (strikeTest || strikeIsToday) { - onStrike(messages); - } - }; - -})(window, document);