The author has still not responded, but no matter.
I figured out the issue with why the redirection had stopped. When I had updated the user-agents, it changed a reference of “agent” to “a” in two places. So my script had to have those same references updated as well.
Those changes were added on lines 54 (55) and 133 (134) on my CodePen.
I also discovered that if tablet_redirection parameter is defined as “false” then the tablet_host parameter is not necessary and that is what was causing the infinite loading loop on some devices.
Problem solved. =)