Get Query String Parameters

For years we wrote gross regular expressions to get query string values but those days are gone -- enter the amazing URLSearchParams API: // Assuming "?post=1234&action=edit" var urlParams = new URLSearchParams(window.location.search); console.log(urlParams.has('post'));…