by default BTT now runs all scripts in the same JS context for performance reasons. This is usually not a problem, but if you have multiple scripts that modify the same global variable it could lead to problems.
Basically the same as opening a new browser window/tab.
Ah! I think I understand why some of my scripts have started to only work every now and then! (And the „Run Script“ button always lets them work, so my scripts should not be the problem.) I like to use let variables, and redefining an already used let variable usually throws an error. So I assume, it’s that the first run works, and then the script wants to redefine a let variable and fails, and that’s why my scripts don’t work any more.
Quick question: does this also hold for JXA scripts (and, also interesting, Applescripts)? I am wondering if I can avoid overhead by using javascript global variables rather than BTT variables (and also if thread-safety is an issue).