Get CSV of linked in group members

Gets a CSV file of basic linked in group memebers info.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Get CSV of linked in group members
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  Gets a CSV file of basic linked in group memebers info.
// @author       MM
// @match        https://www.linkedin.com/groups/*/members
// @grant        none
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==
/* jshint -W097 */
'use strict';
$('<button id="tampermonkey-get-csv">Get CSV</button>').insertAfter(".banner-logo-container");
// Your code here...
$("#tampermonkey-get-csv").click(function () {
list = "";
$( ".entity-info" ).each(function( index ) {
    var org='', title='';
    var info = $(this).children(".entity-headline").text().split(/,| at |@/);
    if (info.length > 0)
        org = info[0].replace(/”|,/gm, "");
    if (info.length > 1)
        title = info[1].replace(/”|,/gm, "");
    list = list+($(this).children(".entity-name").text()) + ',' + org + ',' + title + ',' + $(this).parent().attr("href").split('&')[0] + '\r\n';
});
    
       var blob = new Blob([list], { type: 'text/csv;charset=utf-8;' });
        if (navigator.msSaveBlob) { // IE 10+
            navigator.msSaveBlob(blob, filename);
        } else {
            var link = document.createElement("a");
            if (link.download !== undefined) { // feature detection
                // Browsers that support HTML5 download attribute
                var url = URL.createObjectURL(blob);
                link.setAttribute("href", url);
                link.setAttribute("download", "memeber_list.csv");
                link.style.visibility = 'hidden';
                document.body.appendChild(link);
                link.click();
                document.body.removeChild(link);
            }
        }
});