Отключение безопасного просмотра ВК

Добавляет кнопку для отключения безопасного поиска видео = можно искать порно

目前为 2024-09-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         Отключение безопасного просмотра ВК
// @namespace    awaw
// @version      1.0
// @description  Добавляет кнопку для отключения безопасного поиска видео = можно искать порно
// @author       ChatGPT
// @match        https://vk.com/video/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Создаем кнопку
    const button = document.createElement('button');
    button.innerText = 'Вкл 18+';
    button.style.position = 'fixed';
    button.style.top = '6px';
    button.style.right = '6px';
    button.style.padding = '6px';
    button.style.backgroundColor = 'none';
    button.style.color = 'white';
    button.style.border = 'none';
    button.style.cursor = 'pointer';
    button.style.zIndex = '9999';

    // Добавляем кнопку на страницу
    document.body.appendChild(button);

    // Функция, которая добавляет "?notsafe=1" к ссылке
    button.addEventListener('click', function() {
        const currentUrl = window.location.href;
        if (!currentUrl.includes('?notsafe=1')) {
            window.location.href = currentUrl + '?notsafe=1';
        }
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址