Greasy Fork is available in English.

VK Auto blur

05.06.2022, 15:49:51

// ==UserScript==
// @name        VK Auto blur
// @namespace   NyakoScr
// @match       https://vk.com/*
// @grant       none
// @version     0.1
// @author      https://t.me/Nyako_TW
// @license     Apache License 2.0
// @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);