From 1f3fd8113f586ed3280ebbecfcdf3dd8183ca1bd Mon Sep 17 00:00:00 2001 From: misterzym Date: Mon, 4 Feb 2019 17:26:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D0=B0=D0=B9=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BB=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/script.js b/script.js index f519ede..393b5fd 100644 --- a/script.js +++ b/script.js @@ -1,6 +1,6 @@ // ==UserScript== // @name RemoveBotInMsgers -// @version 0.9.1 +// @version 0.9.3 // @namespace https://up-world.ru/ // @description Добавляет кого угодно в Черный список // @author Misterzym @@ -29,15 +29,16 @@ var peaple = JSON.stringify({ $(".im-mess-stack").unbind().on('mouseenter', function() { $(this).append(''); + $(".addBlackList").on("click", function() { + var peer = $(this).data("peeder"); + blackList[peer] = JSON.parse(peaple); + blackList[peer].name = $(this).closest(".im-mess-stack").find(".im-mess-stack--pname a").html(); + blackList[peer].url = $(this).closest(".im-mess-stack").find(".im-mess-stack--pname a").attr("href"); + save(); + return false; + }); }).on("mouseleave", function() { - $(this).find(".addBlackList").remove(); - }).on("click", function() { - var peer = $(this).data("peeder"); - blackList[peer] = JSON.parse(peaple); - blackList[peer].name = $(this).closest(".im-mess-stack").find(".im-mess-stack--pname a").html(); - blackList[peer].url = $(this).closest(".im-mess-stack").find(".im-mess-stack--pname a").attr("href"); - save(); - return false; + $(this).find(".addBlackList").unbind().remove(); }); if (!$("a").is(".blackListButton")){ @@ -71,6 +72,7 @@ function genBlackList() { for (var prop in blackList) { tt = tt + '' + blackList[prop].name + ' X
'; } + return '
' + '
' + '
' +