Add All linkedIn users

ajouter tout le monde sur linkedin et accepte tout le monde

16.07.2016 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Add All linkedIn users
// @namespace   https://greasyfork.org/fr/users/11667-aymeric-maitre
// @description ajouter tout le monde sur linkedin et accepte tout le monde
// @include     http*://www.linkedin.com/*
// @version     3.2
// @grant       none
// @icon        data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsSAAALEgHS3X78AAAAFXRFWHRDcmVhdGlvbiBUaW1lADYvMjQvMDn2wWvjAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M0BrLToAAAAY9QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJ+8Upq2DFJ4BklsVJu4CU1zCU5zTpWyV5+7DlN4B0twB0tvCU50C1mEC1+NDFF3DGWWDmSRD2iYEFV5EmuaE1d7FGeTFVp9FWGKFW2cGFyAGHCeGmCDG3OgHWKFHnWiIGSHIXikI2iLJHumJmuNKG6PKH2oK3CSK4CrLnSVLoOtL2iDMHaXMYavM3maNHOQNIixNXaUNnycN4uzOX6eOX+fOo21O3SLPIKiPY2yPY2zPZC3PoqtP4WkP42xQJO5QoinQ5W7RYuqRpi9SIOfSI+sSZu/S5KvS5OwTJ3BTpe6T6DDUYGXUpq2UqPFVZy5VabHV566WKjJWafHW4eaW6vLXaHAYa7NYqC+Yq3MY6LBZ6K9aq7Kbq3Hc7LMdJindbjTgbTLhL/VicDXi6u5j8TZornErL7GuMbNxdDVy9ng1dzg19fX2tra3Nzc3ODh3t7e5ubm6Ojo6urq7e3t7+/v8fHx9PT09vb2+fn5+/v7/f39/////8EcrgAAABN0Uk5TAAEFBgcSFxiGh4+a1Nra4+Pm6f7wNSIAAAFdSURBVDjLrZM7T8NAEIS/tTfOA0hogIqHgJKWv4BA8HNB/AsaKjoEgoKHCDKKbdZ3RxEHUHKWKJhmdJrRzu7enQC93gkxXJYlCCyfjjpJRPf2fvGB0D9b84WPGJJ+8nxeKNlqUUUTnHVXsyLleDAJIRRPuaZhDnW2fqNM62/sk78tFCk8iisBhjB8WUxxKN4DCBDp1KM4B5CPeHeRRlEsA7iLDoKhOA/wBKxjb9Dv5TVkK+mswtRwBFyxfQj5+KAPk4fXrDHU9azJGhPobAEs7ZUFUJPgzcxMRMTsVkQGIiIiumtm9jOFAG5Kk1t2BtBxTYSfN4wfGS7BwDV7WDBcw93W9IhHCfMGB+OGCfOrnm18xv5PhkjEN/t/iXDpz+X/JjzgEDYz2vF5r3hLW3XnUSYjazVojlIVibTowSpUSs1Eol8vhKoUSVLpdOMlQmXBKTRvqgUiItKqhhC+ALfVx6MKijHaAAAAAElFTkSuQmCC
// @require     https://code.jquery.com/jquery-2.1.3.min.js
// ==/UserScript==

	function chargement()
	{
		secondes=5;
		setTimeout(redirect,secondes*1000);
	}

	function redirect()
	{
		window.location='https://www.linkedin.com/people/pymk'; // /hub?ref=global-nav&trk=nav_utilities_invites_header
	}

	function setCookie(cname, cvalue, exdays) {
		var d = new Date();
		d.setTime(d.getTime() + (exdays*24*60*60*1000));
		var expires = "expires="+ d.toUTCString();
		document.cookie = cname + "=" + cvalue + "; " + expires;
	}

	function listCookies()
	{
		if(document.cookie == "")
			return false;
		var theCookies = document.cookie.split('; ');
		return theCookies;
	}

	var style = '<style>\
					.but{\
						border-radius: 0;\
						background-color: #6587b9;\
						border: 1px solid #034ab4;\
						cursor: pointer;\
						color: #ffffff;\
						font-family: Arial;\
						font-size: 13px;\
						font-weight: bold;\
						padding: 11px 15px;\
						margin-left: 10px;\
						text-decoration: none;\
						text-align: center;\
					}\
				</style>';
	var button = '<button class="but" id="Add_all">Ajouter Tout le monde</button>';

	if (jQuery.inArray( "AddAuto_coockie=true", listCookies()) >= 0)
		var states = '✔';
	else
		var states = '✗';
	var button2 = '<button class="but" id="Add_auto">Ajout automatique '+states+'</button>';

	$('h2.section-header').append(button);
	$('h2.section-header').append(button2);
	$(document).ready(function()
	{
		$('body').append(style);

		$('button#Add_all').click(function() {
			$('button.bt-request-buffed').click();
			$('button.bt-invite-accept').click();
			window.scrollTo(0, 0);
		});

		$('button#Add_auto').click(function() {
			if (states == '✗')
			{
				alert("Automate activer");
				setCookie('AddAuto_coockie', 'true', 360);
				$('button.bt-request-buffed').click();
				$('button.bt-invite-accept').click();
		    	window.scrollTo(0, 0);
			}
			else
			{
				alert("Automate desactiver");
				document.cookie = "AddAuto_coockie=true; expires=Thu, 01 Jan 1970 00:00:00 UTC";
			}
			chargement();
		});
		if (states == '✔')
		{
			$('button.bt-request-buffed').click();
			$('button.bt-invite-accept').click();
			window.scrollTo(0, 0);
			chargement();
		}

	});