Get CSV of linked in group members

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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