{"size": 845, "ext": "js", "max_stars_repo_path": "project/js.js", "max_stars_repo_name": "Luminis1/portfolio", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "project/js.js", "max_issues_repo_name": "Luminis1/portfolio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "project/js.js", "max_forks_repo_name": "Luminis1/portfolio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.1666666667, "max_line_length": 59, "alphanum_fraction": 0.6686390533}
Element.prototype.append = function(el){
    var newElement = document.createElement(el);
    this.appendChild(newElement);
    return newElement;
}

Element.prototype.appendText = function(el){
    var newElement = document.createTextNode(el);
    this.appendChild(newElement);
}
Element.prototype.remove = function(){
    this.parentElement.removeChild(this);
}
var btn = document.getElementById('btn');
btn.onclick = function(){
    var prod = document.getElementById('newproduct').value;
    var list = document.getElementById('list');
    var newp = list.append("li");
    var ch = newp.append('input');
    var s = newp.append("span");
    var s1 = newp.append("span");
    s1.appendText(" x");
    s1.onclick = function(){
        this.parentElement.remove();
    }
    ch.setAttribute("type", "checkbox");
    s.appendText(prod);
    
}
