JSFiddle - React, Tailwind, and code Playground
by electronoob
HTML
<textarea id=y></textarea>
<textarea id=x>
Begin VB.Form Form1
Caption = "::.. ..:: GPZ's Sinus Lab V1 (c)'98 by Hitmen ::.. ..::"
BackColor = &H808080&
ForeColor = &H404040&
ScaleMode = 1
AutoRedraw = True
FontTransparent = False
FillStyle = 0
BorderStyle = 1 'Fixed Single
Icon = "Form1.frx":0
LinkTopic = "Form1"
MaxButton = 0 'False
ClipControls = 0 'False
ClientLeft = 36
ClientTop = 324
ClientWidth = 7188
ClientHeight = 5736
StartUpPosition = 2 'CenterScreen
Begin Timer Timer1
Interval = 2
Left = 720
Top = 5280
End
Begin TextBox txtSinRange
Index = 3
Left = 5952
Top = 1632
Width = 700
Height = 300
Text = "0"
TabIndex = 66
Alignment = 1 'Right Justify
End
Begin TextBox txtSinRange
Index = 2
Left = 5952
Top = 1248
Width = 700
Height = 300
Text = "0"
TabIndex = 59
Alignment = 1 'Right Justify
End
Begin TextBox txtSinRange
Index = 1
Left = 5952
Top = 864
Width = 700
Height = 300
Text = "0"
TabIndex = 52
Alignment = 1 'Right Justify
End
Begin TextBox txtSinRange
Index = 0
Left = 5952
Top = 480
Width = 700
Height = 300
Text = "0"
TabIndex = 45
Alignment = 1 'Right Justify
End
Begin TextBox txtSinOrigin
Index = 3
Left = 5088
Top = 1632
Width = 700
Height = 300
Text = "0"
TabIndex = 65
Alignment = 1 'Right Justify
End
Begin TextBox txtSinOrigin
Index = 2
Left = 5088
Top = 1248
Width = 700
Height = 300
Text = "0"
TabIndex = 58
Alignment = 1 'Right Justify
End
Begin TextBox txtSinOrigin
Index = 1
Left = 5088
Top = 864
Width = 700
Height = 300
Text = "0"
TabIndex = 51
Alignment = 1 'Right Justify
End
Begin TextBox txtSinOrigin
Index = 0
Left = 5088
Top = 480
Width = 700
Height = 300
Text = "0"
...
CSS
textarea#x {
position:absolute;
top: 10px;
left:440px;
width: 500px;
height: 580px;
}
textarea#y {
position:absolute;
top: 10px;
left: 0px;
width: 430px;
height: 580px;
}
JavaScript
var input = x.value;
//
input = input.replace(/StartUpPosition = 2 'CenterScreen/, "});\n");
input = input.replace(/BeginProperty/g, "/*\n");
input = input.replace(/EndProperty/g, "fucksakeman\n");
input = input.replace(/End/g, "});\n");
input = input.replace(/ '/g, ",//");
input = input.replace(/ = /g, "\": ");
input = input.replace(/\":0/g, "\"");
input = input.replace(/&H/g, "\"#");
input = input.split("\n");
input = input.join(",\n");
input = input.split("\n");
for(i=0;i<input.length;i++) {
input[i] = input[i].trim();
switch (input[i][0]) {
case ",":
input[i] = "";
break;
case "}":
case "/":
case "*":
//
break;
case "B":
s = input[i].split(" ");
if(s[0] == "Begin") {
tmp = "elements.push({\n";
tmp += "\"ELEMENT\":\""+s[1]+"\",\n";
tmp += "\"ID\":\""+s[2].substr(0,s[2].length-1)+"\",";
input[i] = tmp;
break;
}
default:
input[i] = "\"" + input[i];
}
}
input = input.join("\n");
input = input.replace(/&,/g, "\",");
input = input.replace(/{,/g, "{");
input = input.replace(/},/g, "}");
input = input.replace(/;,/g, ";");
input = input.replace(/"fucksakeman,/g, "*/");
input = input.replace(/True/g, "true");
input = input.replace(/False/g, "false");
input = "var elements = [];\n" + input;
input = input + "\nconsole.log(JSON.stringify(elements));\n";
y.value = input;