Shorten a custom JS sort function
You can write a function to compare two "position" strings and a function to compare "priority" strings. Then a resulting comparison function could be written easily by calling the two already defined functions.

Now for the actual review, you don't need the if(b[1] == 'mobile-bottom') check in the if(a[1] == 'mobile-top') case, checking first if if(b[1] == 'mobile-top') is enough, in the other case, you can simply return -1.

Similarly, if(a[1] == 'mobile-bottom'), you only need to consider if(b[1] == 'mobile-bottom'), otherwise, you can simply return 1.