I have included some javascript in SharePoint master page, I need this javascript to have access to the opened list ID.
For example when I load
www.mypage.com/codev/_layouts/15/start.aspx#/Lists/All Fields/AllItems.aspx
I need my JavaScript function to have access to the list: All Fields ID.
Notice there is no query string. I suppose I could extract the list name from the URL but as I'm trying to make it work on any site/list combination I was hoping there would be an easier way to extract the current opened list ID's GUID.