title: Javascript to grab last part of the document.URL?
body: <p>I am trying to grab the last part of the current url:</p>
  
  <p>URL: <a href="http://example.com/test/action" rel="noreferrer">http://example.com/test/action</a></p>
  
  <p>I am trying to grab "action".</p>
  
  <p>The URL is always consistent in that structure. But it may have some extra params at the end.</p>
  
  <p>This is in a rails app using the prototype framework. In rails it would be params[:id].</p>