I have tried Split("?") and Split('?'). Both give the same error (link.split is not a function), so i assume that there is a way to be able to split but not using this Split?
Maybe jQuery?
Edit: Got it, it should be href.split. So as jordan said, it was not a string. So i used x.href.split("?") and it worked like a charm.
Jetpack just uses JavaScript so this should work:
If it tells you “split is not a function” then it probably means your variable doesn’t hold a string like you think it does.