NSFW-Profile Links Adder

Добавляет кнопки с ссылками на Coomer, Kemono, Bunkr и Pornolab, используя юзернейм с OnlyFans и Patreon.

当前为 2024-11-30 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         NSFW-Profile Links Adder
// @namespace    https://onlyfans.com https://patreon.com
// @version      1.6
// @description  Добавляет кнопки с ссылками на Coomer, Kemono, Bunkr и Pornolab, используя юзернейм с OnlyFans и Patreon.
// @author       GodinRaider
// @match        https://onlyfans.com/*
// @match        https://www.patreon.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // Функция для извлечения юзернейма из URL
    function getUsername() {
        const path = window.location.pathname.replace(/^\/+|\/+$/g, ''); // Удаляем слэши в начале и конце
        return path.split('/')[0]; // Берем первую часть пути (юзернейм)
    }

    // Проверяем, что мы находимся на странице профиля
    const username = getUsername();
    if (!username) return;

    // Создаем контейнер для кнопок
    const container = document.createElement('div');
    container.style.position = 'fixed';
    container.style.top = '100px';
    container.style.left = '10px';
    container.style.zIndex = '10000';
    container.style.display = 'flex';
    container.style.flexDirection = 'column';
    container.style.gap = '10px';

    // Определяем, на каком сайте мы находимся
    const isPatreon = window.location.hostname.includes('patreon.com');
    const isOnlyFans = window.location.hostname.includes('onlyfans.com');

    // Конфигурация кнопок
    const buttons = [
        {
            href: isPatreon
                ? `https://kemono.su/artists?q=${username}&service=patreon&sort_by=favorited&order=desc`
                : `https://coomer.su/artists?q=${username}&service=&sort_by=favorited&order=desc`,
            icon: isPatreon
                ? 'https://kemono.su/favicon.ico'
                : 'https://coomer.su/favicon.ico',
            title: isPatreon ? 'Kemono Search' : 'Coomer Search'
        },
        {
            href: `https://bunkr-albums.io/?search=${username}`,
            icon: 'https://status.bunkr.ru/icon.svg',
            title: 'Bunkr Search'
        },
        {
            href: `https://pornolab.net/forum/tracker.php?o=1&s=2&tm=-1&nm=${username}&f=-1`,
            icon: 'https://pornolab.net/favicon.ico',
            title: 'Pornolab Search'
        }
    ];

    // Добавляем стиль для анимаций
    const style = document.createElement('style');
    style.textContent = `
        .profile-link-button {
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .profile-link-button:hover {
            transform: scale(1.1);
            box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
        }
        .profile-link-button:active {
            transform: scale(0.95);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }
    `;
    document.head.appendChild(style);

    // Создаем кнопки и добавляем их в контейнер
    buttons.forEach(({ href, icon, title }) => {
        const button = document.createElement('a');
        button.href = href;
        button.target = '_blank';
        button.title = title;
        button.className = 'profile-link-button';
        button.style.width = '50px';
        button.style.height = '50px';
        button.style.display = 'flex';
        button.style.alignItems = 'center';
        button.style.justifyContent = 'center';
        button.style.backgroundColor = '#fff';
        button.style.border = '1px solid #ccc';
        button.style.borderRadius = '5px';
        button.style.boxShadow = '0 4px 6px rgba(0, 0, 0, 0.1)';

        // Создаем элемент изображения (img) для иконки
        const img = document.createElement('img');
        img.src = icon;
        img.alt = title;
        img.style.width = '24px';
        img.style.height = '24px';
        img.style.objectFit = 'contain';
        button.appendChild(img);

        container.appendChild(button);
    });

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