Get CSV of linked in group members

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
            }
        }
});