LinkedIn Endorse All Button

Adds an Endorse All button to linked profiles you view

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 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         LinkedIn Endorse All Button
// @namespace    http://fenleytech.com/
// @version      1.0
// @description  Adds an Endorse All button to linked profiles you view
// @author       Kaleb Fenley
// @match        https://www.linkedin.com/in/*
// @icon         https://cdn-icons-png.flaticon.com/512/174/174857.png
// @grant        none
// ==/UserScript==


let endorseAll = function() {
    let endorseButtons = Array.from(document.querySelectorAll("button")).filter(element => element.textContent.includes("Endorse") && !element.textContent.includes("Endorsed"));
    for (let button of endorseButtons) {
        button.click();
    }
}


let endorseAllButton = document.createElement("button");
endorseAllButton.innerHTML = "Endorse All Skills";
endorseAllButton.id = "endorse-all-button";
endorseAllButton.onclick = endorseAll;
endorseAllButton.className = "ml2 white-space-nowrap artdeco-pill artdeco-pill--slate artdeco-pill--3 artdeco-pill--choice artdeco-pill--selected ember-view";
endorseAllButton.style.cssText = "position:fixed;top:5px;right:10px;z-index:9999;background-color:green;width:150px;height:40px;border-radius:15px;";
document.body.appendChild(endorseAllButton);