Path: blob/main/tests (don't work)/Div creator update
19058 views
javascript:
function repeat(event){
(function(){
var color=document.createElement('div');
var body=document.getElementsByTagName('body')[0];
body.appendChild(color);color.style.position='fixed';
color.style.bottom='0px';
color.style.right='0px';
color.style.margin='0px';
color.style.paddingTop='0px';
color.style.width='1366px';
color.style.height='20px';
color.style.zIndex=10000;
color.style.opacity=0.8;
color.style.color='white';
color.style.backgroundColor='black';
color.style.border='0px solid black';
color.style.textAlign='center';
color.style.cursor='pointer';
color.id='color';
color.style.display='circle';
color.innerText='by dragonmaster73101';
document.getElementById('me').addEventListener('click',function(){
window.open('https://github.com/dragon731012');
});
}());
}
var howmany=prompt("how many divs/iframes do you want to make?");
const colorlist=[];
const xlist=[];
const ylist=[];
const borderwidelist=[];
const bordercolorlist=[];
const widthlist=[];
const heightlist=[];
const textlist=[];
const textcolorlist=[];
const paddinglist=[];
const seethroughlist=[];
function create(){
(function () {
var elem = document.createElement('div');
var body = document.getElementsByTagName('body')[0];
body.appendChild(elem);
var color=prompt("what color do you want it to be?");
colorlist.push(color);
var x=prompt("what do you want the x cord to be?");
xlist.push(x);
var y=prompt("what do you want the y cord to be?");
ylist.push(y);
var borderwide=prompt("how many pixels wide do you want the border to be?");
borderwidelist.push(borderwide);
var bordercolor=prompt('what color do you want the border to be?');
bordercolorlist.push(bordercolor);
var width=prompt("how many pixels wide do you want it to be?");
widthlist.push(width);
var height=prompt("how many pixels high do you want it to be?");
heightlist.push(height);
var text=prompt('what do you want the text to be?');
textlist.push(text);
var textcolor=prompt("what color do you want the text to be?");
textcolorlist.push(textcolor);
var padding=prompt("how far from the top do you want the text to be?");
paddinglist.push(padding);
var seethrough=prompt("how transparent do you want it to be? 1 to 0. 1=none 0=not there");
seethroughlist.push(seethrough);
elem.style.position = 'fixed'; elem.style.top = ''+y+'px';
elem.style.left = ''+x+'px'; elem.style.margin = '0px';
elem.style.paddingTop = ''+padding+'px';
elem.style.width = ''+width+'px';
elem.style.height = ''+height+'px';
elem.style.zIndex = 10000;
elem.style.opacity = seethrough;
elem.style.color = textcolor;
elem.style.backgroundColor = color;
elem.style.border = ''+borderwide+'px solid '+bordercolor+'';
elem.style.textAlign = 'center';
elem.id = 'elem';
elem.style.display = 'block';
elem.innerText = text; }
());
}
var x=0;
while (x<howmany){
create();
x=x+1;
if (x!=howmany){
alert("next one...");
}
}
alert("done!");
alert("
function create(){
(function () {
var elem = document.createElement('div');
var body = document.getElementsByTagName('body')[0];
body.appendChild(elem);
var color=prompt("what color do you want it to be?");
var x=prompt("what do you want the x cord to be?");
var y=prompt("what do you want the y cord to be?");
var borderwide=prompt("how many pixels wide do you want the border to be?");
var bordercolor=prompt('what color do you want the border to be?');
var width=prompt("how many pixels wide do you want it to be?");
var height=prompt("how many pixels high do you want it to be?");
var text=prompt('what do you want the text to be?');
var textcolor=prompt("what color do you want the text to be?");
var padding=prompt("how far from the top do you want the text to be?");
var seethrough=prompt("how transparent do you want it to be? 1 to 0. 1=none 0=not there");
elem.style.position = 'fixed'; elem.style.top = ''+y+'px';
elem.style.left = ''+x+'px'; elem.style.margin = '0px';
elem.style.paddingTop = ''+padding+'px';
elem.style.width = ''+width+'px';
elem.style.height = ''+height+'px';
elem.style.zIndex = 10000;
elem.style.opacity = seethrough;
elem.style.color = textcolor;
elem.style.backgroundColor = color;
elem.style.border = ''+borderwide+'px solid '+bordercolor+'';
elem.style.textAlign = 'center';
elem.id = 'elem';
elem.style.display = 'block';
elem.innerText = text; }
());
}
");
repeat();