VK.com Image Unblur

Remove blur effects from thumbnails on vk.com

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         VK.com Image Unblur
// @namespace    https://github.com/goawaylovestrike
// @version      2.3
// @description  Remove blur effects from thumbnails on vk.com
// @author       GoAwayLoveStrike
// @icon         https://raw.githubusercontent.com/goawaylovestrike/Userscripts/refs/heads/main/vk-image-unblur/vk-image-unblur.png
// @match        https://vk.com/*
// @match        https://vkvideo.ru/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    function unblurContent() {
        // Remove blur from videoplayers
        document.querySelectorAll('.videoplayer').forEach(player => {
            player.className = player.className.replace('videoplayer--blur', '').trim();
        });

        // Remove age restriction elements
        document.querySelectorAll('.VideoRestriction__icon, .VideoRestriction__title, .VideoRestriction__text').forEach(el => el.remove());

        // Replace Watch with play button
        document.querySelectorAll('.VideoRestriction__button').forEach(button => {
            if (button.textContent === 'Watch') button.textContent = '▶';
        });

        // Remove blur from images
        document.querySelectorAll('img[class*="imgBlurred"]').forEach(img => {
            img.className = img.className.replace(/imgBlurred[^ ]*/g, '').trim();
        });

        // Remove hide icons
        document.querySelectorAll('svg.vkuiIcon--hide_outline_24, g path[d*="M0 0h28v28H0z"]').forEach(el => {
            el.closest('svg, g')?.remove();
        });
    }

    // Run immediately and watch for changes
    unblurContent();
    new MutationObserver(unblurContent).observe(document.body, { childList: true, subtree: true });
})();