Sha256: e3e783c99e7ceef314a663bdbb9fbf4fa75f908d2c02a8882280304a165ce5fb
Contents?: true
Size: 555 Bytes
Versions: 4
Compression:
Stored size: 555 Bytes
Contents
// // Texture Picker // window.onload = function() { // Handle Texture Picker const $picker = document.querySelector('#texture-picker'); const $hidePicker = document.querySelector('#hidePicker'); const $header = document.querySelector('header'); $picker.onclick = function(e) { const textureName = e.target.id; if (textureName && textureName != 'texture-picker' && textureName != 'hidePicker') { $header.setAttribute('class', `texture-${textureName}`); } } $hidePicker.onclick = function () { $picker.style['display'] = 'none'; } }
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
texture-0.5 | assets/js/picker.js |
texture-0.4 | assets/js/picker.js |
texture-0.3 | assets/js/picker.js |
texture-0.2 | assets/js/picker.js |