Coomer.su

Checks some sites for OF "leaks"

2024-05-14 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Coomer.su
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Checks some sites for OF "leaks"
// @author       You
// @match        https://onlyfans.com/*
// @match        *coomer.su/*
// @match        *fapello.com/*
// @grant        GM.xmlHttpRequest
// @license      Unlicense
// ==/UserScript==

(function() {
    'use strict';

    function getUsernameFromUrl() {
        const urlParts = window.location.pathname.split('/');
        const username = urlParts[1];
        return username;
    }

    function fetchUserProfileCoomer(username, retryCount = 0) {
        const apiUrl = `https://coomer.su/api/v1/onlyfans/user/${username}/profile`;

        GM.xmlHttpRequest({
            method: 'GET',
            url: apiUrl,
            onload: function(response) {
                if (response.status === 200) {
                    const data = JSON.parse(response.responseText);
                    const profileUrl = `https://coomer.su/onlyfans/user/${username}`;
                    addLinkToMenu(profileUrl, 'Coomer.su');
                } else if (response.status === 404) {
                    console.log(`User ${username} not found`);
                } else {
                    console.error('Network response was not ok:', response.status);
                    if (retryCount < 5) {
                        console.log(`Retrying... Attempt ${retryCount + 1}`);
                        setTimeout(() => fetchUserProfileCoomer(username, retryCount + 1), 1000);
                    } else {
                        console.error('Max retry attempts reached');
                    }
                }
            },
            onerror: function(error) {
                console.error('Error fetching data:', error);
            }
        });
    }

    function fetchUserProfileFapello(username, retryCount = 0) {
        const apiUrl = `https://fapello.com/${username}/`;

        GM.xmlHttpRequest({
            method: 'GET',
            url: apiUrl,
            onload: function(response) {
                if (response.finalUrl === apiUrl) {
                    const profileUrl = `https://fapello.com/${username}/`;
                    addLinkToMenu(profileUrl, 'Fapello');
                } else {
                    console.log(`Request was redirected`);
                }
            },
            onerror: function(error) {
                console.error('Error fetching data:', error);
                if (retryCount < 5) {
                    console.log(`Retrying... Attempt ${retryCount + 1}`);
                    setTimeout(() => fetchUserProfileFapello(username, retryCount + 1), 1000);
                } else {
                    console.error('Max retry attempts reached');
                }
            }
        });
    }

function addLinkToMenu(link, displayText) {
    const menuElement = document.querySelector('.l-header__menu.m-native-custom-scrollbar.m-scrollbar-y.m-invisible-scrollbar');
    const aElement = document.createElement('a');
    aElement.setAttribute('href', link);
    aElement.textContent = displayText;
    aElement.style.marginRight = "10px";

    // Check if there are already links in the menu
    const existingLinks = menuElement.querySelectorAll('a');
    if (existingLinks.length > 0) {
        const lineBreak = document.createElement('br');
        menuElement.appendChild(lineBreak);
    }

    menuElement.appendChild(aElement);
}




    const username = getUsernameFromUrl();
    setTimeout(() => {fetchUserProfileCoomer(username);fetchUserProfileFapello(username)}, 4000);
})();