{"action":"created","issue":{"url":"https://api.github.com/repos/diafygi/gethttpsforfree/issues/31","labels_url":"https://api.github.com/repos/diafygi/gethttpsforfree/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/diafygi/gethttpsforfree/issues/31/comments","events_url":"https://api.github.com/repos/diafygi/gethttpsforfree/issues/31/events","html_url":"https://github.com/diafygi/gethttpsforfree/issues/31","id":120882488,"number":31,"title":"Step 4 lists \"old\" entries on error","user":{"login":"code28","id":7918047,"avatar_url":"https://avatars.githubusercontent.com/u/7918047?v=3","gravatar_id":"","url":"https://api.github.com/users/code28","html_url":"https://github.com/code28","followers_url":"https://api.github.com/users/code28/followers","following_url":"https://api.github.com/users/code28/following{/other_user}","gists_url":"https://api.github.com/users/code28/gists{/gist_id}","starred_url":"https://api.github.com/users/code28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code28/subscriptions","organizations_url":"https://api.github.com/users/code28/orgs","repos_url":"https://api.github.com/users/code28/repos","events_url":"https://api.github.com/users/code28/events{/privacy}","received_events_url":"https://api.github.com/users/code28/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-07T22:24:03Z","updated_at":"2015-12-10T22:54:40Z","closed_at":"2015-12-10T22:38:38Z","body":"When an error occured in step 4, it says \"Please go back to Step 1\", but when starting from step 1, the domain(s) will be appended in step 4 again, so they appear multiple times.\r\n\r\nPossibly previous domains could be detached before appended (or just replaced). Here is the code I'm talking about:\r\n\r\n    // append this domain to step 4\r\n    template.id = \"challenge_\" + d_;\r\n    template.style.display = null;\r\n    document.getElementById(\"challenge_domains\").appendChild(template);"},"comment":{"url":"https://api.github.com/repos/diafygi/gethttpsforfree/issues/comments/163778063","html_url":"https://github.com/diafygi/gethttpsforfree/issues/31#issuecomment-163778063","issue_url":"https://api.github.com/repos/diafygi/gethttpsforfree/issues/31","id":163778063,"user":{"login":"code28","id":7918047,"avatar_url":"https://avatars.githubusercontent.com/u/7918047?v=3","gravatar_id":"","url":"https://api.github.com/users/code28","html_url":"https://github.com/code28","followers_url":"https://api.github.com/users/code28/followers","following_url":"https://api.github.com/users/code28/following{/other_user}","gists_url":"https://api.github.com/users/code28/gists{/gist_id}","starred_url":"https://api.github.com/users/code28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code28/subscriptions","organizations_url":"https://api.github.com/users/code28/orgs","repos_url":"https://api.github.com/users/code28/repos","events_url":"https://api.github.com/users/code28/events{/privacy}","received_events_url":"https://api.github.com/users/code28/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T22:54:40Z","updated_at":"2015-12-10T22:54:40Z","body":"Yes, this issue is fixed, but another error occurs: For each added domain, the _whole section_ is cleared, so only the last domain is shown, if the request contains more than one domain.\r\n\r\nI'm not that much into JavaScript, but maybe something like this would do it:\r\n\r\n    // append this domain to step 4\r\n    template.id = \"challenge_\" + d_;\r\n    template.style.display = null;\r\n    document.getElementById(\"challenge_domains\").removeChild(document.getElementById(template.id));\r\n    document.getElementById(\"challenge_domains\").appendChild(template);"}}