Camwhores.tv Private Vids

automatically open private videos in a new tab using the URL script by reddit user Bakolas

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Camwhores.tv Private Vids
// @namespace    http://www.camwhores.tv/*
// @version      0.1
// @description  automatically open private videos in a new tab using the URL script by reddit user Bakolas
// @author       CodingWhileNaked
// @match        http://www.camwhores.tv/*
// @grant        none
// @require      https://greasyfork.org/scripts/31940-waitforkeyelements/code/waitForKeyElements.js?version=209282
// ==/UserScript==

var baseURL = "https://polar-springs-10127.herokuapp.com/process_get?inputBox=";

waitForKeyElements(".private", updatePrivateUrls);

function updatePrivateUrls(){
    $(".private").each(function(){
        var url = $(this).children('a').attr('href');
        if(url.includes(baseURL)){
           return true;
        }
        var urlEncode = encodeURIComponent($(this).children('a').attr('href'));
        $(this).children('a').attr("href",baseURL + url).attr('target','_blank');
    });
}