/*Copyright 2015, Pall Thayer (http://pallthayer.dyndns.org)*/ /*These program are free software: you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will rock your world, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .*/ /*Form Over Function (For Alexei) - 2017-10-08 12:44:41*/ var form = function() { this.width = parseInt(Math.random()*500); this.top = parseInt(Math.random()*window.innerHeight); this.left = parseInt(Math.random()*(window.innerWidth+500))-250; var types = ['text', 'radio', 'checkbox', 'button', 'color', 'date', 'range']; this.type = types[parseInt(Math.random()*types.length)]; var growTo = parseInt(Math.random()*window.innerWidth); this.makeFormEl = function() { var formEl = document.createElement('input'); formEl.id = this.type+parseInt(Math.random()*1000); formEl.type = this.type; formEl.style.top = this.top+'px'; formEl.style.left = this.left+'px'; formEl.style.position = 'absolute'; formEl.style.width = this.width+'px'; var form = document.getElementById('the_form'); form.appendChild(formEl); var ani = setInterval(function(){grow(formEl);}, 100); } var grow = function(el) { this.width += (growTo - this.width)*0.1; el.style.width = this.width+'px'; }.bind(this); };