From 91c93f1fe8489ef524652e40b7189816eb27ec9e Mon Sep 17 00:00:00 2001 From: Sascha Nitsch Date: Thu, 29 Aug 2024 20:09:46 +0200 Subject: [PATCH] hacky support for /* */ comments in json config --- scriptedbrowser/main.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scriptedbrowser/main.php b/scriptedbrowser/main.php index 976058a..db36634 100644 --- a/scriptedbrowser/main.php +++ b/scriptedbrowser/main.php @@ -205,6 +205,8 @@ class Main $this->control->mousemove(960, 500); $steps = file_get_contents($instructions); + $steps = preg_replace('/[\r\n]/', '', $steps); + $steps = preg_replace('!/\*.*\*/!', '', $steps); $plans = json_decode($steps, true); if ($plans === null) { echo "error reading config\n";