Cleanup
This commit is contained in:
parent
a53905dc05
commit
bc2629a8fc
16
console.vbs
16
console.vbs
|
@ -41,9 +41,7 @@ Sub Error(message)
|
|||
End Sub
|
||||
|
||||
Sub Assert(condition, message)
|
||||
If Not condition Then
|
||||
Error message
|
||||
End If
|
||||
If Not condition Then Error message
|
||||
End Sub
|
||||
|
||||
Sub Clear
|
||||
|
@ -84,16 +82,14 @@ Private Function GetSelectedText (element)
|
|||
End Function
|
||||
|
||||
Private Sub Run
|
||||
Dim selected, code
|
||||
selected = GetSelectedText(input)
|
||||
code = selected
|
||||
If IsEmpty(selected) Then code = input.value
|
||||
If IsEmpty(Trim(code)) Then Exit Sub
|
||||
ConsoleLog code, "lightblue"
|
||||
Dim code
|
||||
code = GetSelectedText(input)
|
||||
If code = "" Then code = RemoveCr(input.value)
|
||||
If Trim(code) = "" Then Exit Sub
|
||||
Err.Clear
|
||||
Execute code
|
||||
If Err.Number <> 0 Then
|
||||
Error "Error " & Err.Number & " at " & Err.Source & ": " & Err.Description
|
||||
Error "Error " & Err.Number & " - " & Err.Source & ": " & Err.Description
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
|
Loading…
Reference in New Issue