{"size": 662, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "elementnet/elementnet-editor", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "index.js", "max_issues_repo_name": "elementnet/elementnet-editor", "max_issues_repo_issues_event_min_datetime": "2018-01-28T14:03:47.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-04T04:38:25.000Z", "max_forks_repo_path": "index.js", "max_forks_repo_name": "elementnet/elementnet-editor", "max_forks_repo_forks_event_min_datetime": "2018-02-05T22:56:17.000Z", "max_forks_repo_forks_event_max_datetime": "2018-02-05T22:56:17.000Z"}
{"max_stars_count": null, "max_issues_count": 14, "max_forks_count": 1, "avg_line_length": 24.5185185185, "max_line_length": 68, "alphanum_fraction": 0.6419939577}
/*
 * ElementNetwork API
 * Copyright (c) 2017-18 ElementNetwork
 * License: Apache 2.0
 */

// Don't use this as the editor; use it only for interacting with it
// Browserify your code and add it to the end of the main file

function enableShare(postURL, button, callback) {
    if (!postURL || !button) return;
    button.style({
        cursor: 'default'
    });
    button.click((data, textStatus, jqXHR) => {
        if (callback) callback(data, textStatus, jqXHR);
    });
}

function setPlayer(url, projectId, button) {
    button.click(function() {
        window.location = `${url}#${projectId}`;
    });
}

module.exports = { enableShare, setPlayer };
