chore: suppression de la lib strike-js
parent
e1b9724fdd
commit
7b2f1b2754
|
@ -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;
|
||||
}
|
|
@ -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);
|
Loading…
Reference in New Issue