Skip to content

Instantly share code, notes, and snippets.

@griv griv/artsaction.js
Created Jun 14, 2016

What would you like to do?
* arts action! by pvi collective
* adds content to end of <body> to cover site as a protest to arts funding cuts to independent artists.
* checks local time and only shows on national day of action, june 17th 2016
* author: steve berrick <>
// check for time - only show on Friday June 17th 2016
var d = new Date();
if (d.getFullYear() === 2016 && d.getMonth() === 5 && d.getDate() === 17) {
// make div
var artsActionDiv = document.createElement('div');
artsActionDiv.setAttribute('class', 'artsAction'); = 'position:fixed; top:0; left: 0; bottom:0; right:0; background-color:rgba(246,152,157,0.97); z-index:99999; text-align:center; font-size:17px; font-family:Arial; font-weight:bold; color:#1b0b4d;';
// make banner image
var artsActionBanner = document.createElement('img'); = 'padding:40px; width:77%; max-width:640px; display:block; margin-left:auto; margin-right:auto;';
artsActionBanner.src = '';
// make text
var artsActionParagraph = document.createElement('div'); = 'padding:0px; margin:0px; width:77%; max-width:640px; text-align:center; margin-left:auto; margin-right:auto;';
artsActionParagraph.innerHTML = '<p>This site is ON STRIKE as a statement of solidarity with independent artists on this National Day of Action, June 17th 2016.</p><p>To know more, and to act, visit <a href="" target="_blank"></a></p><p>#artprotagonists</p><style>.artsAction a, .artsAction a:visited, .artsAction a:active { color:#1b0b4d; text-decoration:underline; }</style>';
// add it all to the body
// that's it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.