As a general rule, it's better to keep functions close to the place where they are used. In this case it would be just below `WebInspector.loaded`.

However, this function is not needed per the comment above, as it's not necessary to parse the port (nor the query/search string).