Splig jsbridge.cpp from mainwin.cpp