Patch for #13. Figure out the right URL parameter for popups and generate the right URL from it