Greasy Fork

Greasy Fork is available in English.

LinkedIn Endorse All Button

Adds an Endorse All button to linked profiles you view

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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