{"size": 1020, "ext": "js", "max_stars_repo_path": "copy-plus-link.js", "max_stars_repo_name": "razat91/copy-plus-link", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "copy-plus-link.js", "max_issues_repo_name": "razat91/copy-plus-link", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "copy-plus-link.js", "max_forks_repo_name": "razat91/copy-plus-link", "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": 35.1724137931, "max_line_length": 124, "alphanum_fraction": 0.4490196078}
(function ($) {
    jQuery.fn.copyPlusLink = function (user_options) {
        var options = {htmlcopytxt: ""};
        $.extend(options, user_options);
        var addLink = function () {
            var e = window.getSelection();
            var f;
            if (options.htmlcopytxt) {
                f = options.htmlcopytxt;
            } else {
                var d = window.location + "&f=cp";
                f = "<br/> More: <a href='" + d + "'>" + d + "</a>";
            }
            var h = e.toString().trim().replace(/\n/g, "<br/>") + f, g = document.createElement("div"), b = e.getRangeAt(0);
            document.body.appendChild(g);
            g.innerHTML = h;
            e.selectAllChildren(g);
            window.setTimeout(function () {
                document.body.removeChild(g);
                e.removeAllRanges();
                e.addRange(b);
            }, 0);
        };
        return $(this).each(function () {
            $(this).on("copy", addLink);
        });
    };
})(jQuery);
