{"action":"closed","issue":{"url":"https://api.github.com/repos/chrisblakley/Nebula/issues/769","labels_url":"https://api.github.com/repos/chrisblakley/Nebula/issues/769/labels{/name}","comments_url":"https://api.github.com/repos/chrisblakley/Nebula/issues/769/comments","events_url":"https://api.github.com/repos/chrisblakley/Nebula/issues/769/events","html_url":"https://github.com/chrisblakley/Nebula/issues/769","id":97750624,"number":769,"title":"Move query string function back to main.js and use an object (instead of array)","user":{"login":"chrisblakley","id":6349678,"avatar_url":"https://avatars.githubusercontent.com/u/6349678?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisblakley","html_url":"https://github.com/chrisblakley","followers_url":"https://api.github.com/users/chrisblakley/followers","following_url":"https://api.github.com/users/chrisblakley/following{/other_user}","gists_url":"https://api.github.com/users/chrisblakley/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisblakley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisblakley/subscriptions","organizations_url":"https://api.github.com/users/chrisblakley/orgs","repos_url":"https://api.github.com/users/chrisblakley/repos","events_url":"https://api.github.com/users/chrisblakley/events{/privacy}","received_events_url":"https://api.github.com/users/chrisblakley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrisblakley/Nebula/labels/Frontend%20(Script)","name":"Frontend (Script)","color":"f1bf26"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/chrisblakley/Nebula/milestones/4","html_url":"https://github.com/chrisblakley/Nebula/milestones/4.0%20Red%20Rectangle","labels_url":"https://api.github.com/repos/chrisblakley/Nebula/milestones/4/labels","id":821700,"number":4,"title":"4.0 Red Rectangle","description":"Version 4.0 is named after the [Red Rectangle Nebula](http://en.wikipedia.org/wiki/Red_Rectangle_Nebula).","creator":{"login":"chrisblakley","id":6349678,"avatar_url":"https://avatars.githubusercontent.com/u/6349678?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisblakley","html_url":"https://github.com/chrisblakley","followers_url":"https://api.github.com/users/chrisblakley/followers","following_url":"https://api.github.com/users/chrisblakley/following{/other_user}","gists_url":"https://api.github.com/users/chrisblakley/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisblakley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisblakley/subscriptions","organizations_url":"https://api.github.com/users/chrisblakley/orgs","repos_url":"https://api.github.com/users/chrisblakley/repos","events_url":"https://api.github.com/users/chrisblakley/events{/privacy}","received_events_url":"https://api.github.com/users/chrisblakley/received_events","type":"User","site_admin":false},"open_issues":180,"closed_issues":46,"state":"open","created_at":"2014-10-10T21:14:45Z","updated_at":"2015-07-28T19:49:39Z","due_on":"2016-05-01T04:00:00Z","closed_at":null},"comments":0,"created_at":"2015-07-28T16:43:09Z","updated_at":"2015-07-28T19:49:39Z","closed_at":"2015-07-28T19:49:39Z","body":"This should be one of the first things in main.js. If we use a window object instead of an array, it shouldn't have the issue where it needs to be in the footer.php.\r\n\r\nExisting script:\r\n```\r\n<script>\r\n\t\t\t\t//Pull query strings from URL\r\n\t\t\t\tfunction getQueryStrings(){\r\n\t\t\t\t\tqueries = new Array();\r\n\t\t\t\t    var q = document.URL.split('?')[1];\r\n\t\t\t\t    if ( q != undefined ){\r\n\t\t\t\t        q = q.split('&');\r\n\t\t\t\t        for ( var i = 0; i < q.length; i++ ){\r\n\t\t\t\t            hash = q[i].split('=');\r\n\t\t\t\t            queries.push(hash[1]);\r\n\t\t\t\t            queries[hash[0]] = hash[1];\r\n\t\t\t\t        }\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Search query strings for the passed parameter\r\n\t\t\t\tfunction GET(query){\r\n\t\t\t\t\tif ( typeof query === 'undefined' ) {\r\n\t\t\t\t\t\treturn queries;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( typeof queries[query] !== 'undefined' ){\r\n\t\t\t\t\t\treturn queries[query];\r\n\t\t\t\t\t} else if ( queries.hasOwnProperty(query) ){\r\n\t\t\t\t\t\treturn query;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t</script>\r\n```"}}