forked from KwickerHub/WebCraftifyAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
48 lines (46 loc) · 1.95 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test Samples</title>
</head>
<body>
<div className="card" style={{background:"-webkit-gradient(linear, left top, right top, from(#000), color-stop(50%, #000), color-stop(50%, #fff))"}}/>
<button style={{backgroundImage: `linear-gradient(to right, rgba(0, 224, 255, 1), rgba(0, 133, 255, 1))`, }} >
<div id="progress-spinner" style={{
background: `conic-gradient(rgb(3, 133, 255) ${progress}%, rgb(242, 242, 242) ${progress}%)`
}}></div>
<script>
var str = `<span onclick="enableCustomiser('left')"
style="display: inline-block; text-align: center; width: 40px; height: 40px; font-size: 18px; padding: 7px; background-color: blue; border-radius: 15px;"><i
class="fa fa-cog"></i></span>
<span onclick="removetheSideBars('left')"
style="display: inline-block; text-align: center; width: 40px; height: 40px; font-size: 18px; padding: 7px; background-color: red; border-radius: 15px"><i
class="fa fa-times"></i></span>`;
var splitted_str = str.split("<");
var new_str = "";
console.log(splitted_str);
for (let index = 1; index < splitted_str.length; index++) {
const style_area = splitted_str[index];
if(style_area[0] == "/"){
console.log("closing side");
}else{
if (style_area.includes("style")) {
console.log("worth considering: " + style_area);
new_style_area = style_area.split("style");
if (new_style_area.indexOf('"') < new_style_area.indexOf("'")) {
style = new_style_area.slice( new_style_area.indexOf('"'), new_style_area[new_style_area.indexOf('"')+1].indexOf('"') );
new_str = new_str + style;
}else{
style = new_style_area.slice( new_style_area.indexOf("'"), new_style_area[new_style_area.indexOf('"')+1].indexOf("'") );
new_str = new_str + style;
}
}
}
}
console.log(new_str);
</script>
<h2>Test Page</h2>
<p>You can test anything or any functionality here. Just for developers... </p>
</body>
</html>