{"size": 920, "ext": "js", "max_stars_repo_path": "script.js", "max_stars_repo_name": "Aaryan-R-S/JavaScript-Projects-Drag-N-Drop", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "script.js", "max_issues_repo_name": "Aaryan-R-S/JavaScript-Projects-Drag-N-Drop", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "script.js", "max_forks_repo_name": "Aaryan-R-S/JavaScript-Projects-Drag-N-Drop", "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": 23.5897435897, "max_line_length": 48, "alphanum_fraction": 0.5695652174}
console.log("Tut64");

const box = document.querySelectorAll('.box')
const imgbox = document.querySelector('.imgbox')

imgbox.addEventListener('dragstart', () => {
    // console.log('Start');
    imgbox.classList.add('hold')
})

imgbox.addEventListener('dragend', (e) => {
    // console.log('End');
    // e.target.className = 'imgbox'
    imgbox.classList.remove('hold')
})

for (x of box) {
    x.addEventListener('dragover', (e) => {
        // console.log("Over");
        e.preventDefault();
    })

    x.addEventListener('dragenter', (e) => {
        // console.log('Enter');
        e.target.classList.add('dash');
    })

    x.addEventListener('dragleave', (e) => {
        // console.log('Leave');
        e.target.classList.remove('dash')
    })
    
    x.addEventListener('drop', (e) => {
        // console.log('Drop');
        e.target.classList.remove('dash')
        e.target.append(imgbox)
    })
}
