Добавить NyakoScr_vk_blur/script.user.js
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
// ==UserScript==
|
||||
// @name VK Auto blur
|
||||
// @namespace NyakoScr_vk_blur
|
||||
// @match https://vk.com/*
|
||||
// @grant none
|
||||
// @version 0.1
|
||||
// @author https://t.me/Nyako_TW
|
||||
// @license Apache License 2.0
|
||||
// @downloadURL https://git.nekono.su/Nyako/script-dev-ru/raw/branch/main/NyakoScr_vk_blur/script.user.js
|
||||
// @updateURL https://git.nekono.su/Nyako/script-dev-ru/raw/branch/main/NyakoScr_vk_blur/script.user.js
|
||||
// @description 05.06.2022, 15:49:51
|
||||
// ==/UserScript==
|
||||
function repair() {
|
||||
data_list = document.getElementsByTagName("a");
|
||||
|
||||
style_nyako = ".NyakoBlur{filter: blur(10px);}.NyakoBlur:hover{filter: blur(0px);}";
|
||||
|
||||
style_el = document.createElement('style');
|
||||
style_el.setAttribute("type", "text/css");
|
||||
style_el.textContent = style_nyako;
|
||||
document.head.append(style_el);
|
||||
|
||||
data_list.forEach(function(item, i, data_list) {
|
||||
if (item.href.includes("https://vk.com/photo")){
|
||||
item.classList.add("NyakoBlur");
|
||||
}
|
||||
if (item.href.includes("https://vk.com/video")){
|
||||
item.classList.add("NyakoBlur");
|
||||
}
|
||||
});
|
||||
}
|
||||
setInterval(repair, 100);
|
||||
Reference in New Issue
Block a user