There is no build in functionally in jQuery and Prototype to extract params from a url.
You can use this library (not tested): jquery-deparam Show archive.org snapshot
Use Unpoly and the following code snippet Show archive.org snapshot
Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)