drop.chapril.org-firefoxsend/app/templates/activeBackground/index.js
2018-06-21 11:28:31 -07:00

13 lines
319 B
JavaScript

const assets = require('../../../common/assets');
module.exports = function(state) {
if (!state.backgroundClass) {
const backgrounds = assets.match(/background_/);
state.backgroundClass = `background_${Math.floor(
Math.random() * backgrounds.length
) + 1}`;
}
return state.backgroundClass;
};