Get server version via JS

Hello,

I need to find a way in JS to derive if my app is running on Nextcloud or ownCloud.

Unfortunately the user setting urls are running separate
(settings/personal?sectionid=audioplayer vs settings/user/audioplayer)

I need to run a case-dependent OC.generateUrl

thank you for your help
Rello

I went this way:

if (OC.config.versionstring.split(’.’)[0] <= 10) //ownCloud

works if you assume that your app normally would not support current -2 NC versions (14,13,12) only anyway