Skip to content

Commit

Permalink
Happy Halloween!
Browse files Browse the repository at this point in the history
  • Loading branch information
ganlvtech committed Oct 31, 2018
1 parent a5772ae commit c5201db
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/easter-eggs/halloween.js
@@ -0,0 +1,20 @@
const css = `
body {
background-color: rgba(0, 0, 0, 1);
}
body * {
background-color: rgba(0,0,0, 0.2)!important;
color: #fff !important;
border-color: #fff !important;
}`;

var style = document.createElement('style');
style.type = 'text/css';

if (style.styleSheet) { // IE
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}

document.getElementsByTagName('head')[0].appendChild(style);
8 changes: 8 additions & 0 deletions src/main.js
Expand Up @@ -5,3 +5,11 @@ require('popper.js');
require('bootstrap');

window.Down52PojieCn = Down52PojieCn;

(function() {
const moment = require('moment');
let date = moment().format("MMDD")
if (date === '1030' || date === '1031' || date === '1101') {
require('./easter-eggs/halloween');
}
})();

0 comments on commit c5201db

Please sign in to comment.