Cam4 Clean figuccio

cam colorato 2024

// ==UserScript==
// @name		   Cam4 Clean figuccio
// @description    cam colorato 2024
// @version		   14.7
// @author         figuccio
// @match          https://*.cam4.com/*
// @grant          GM_addStyle
// @grant          GM_setValue
// @grant          GM_getValue
// @grant          GM_registerMenuCommand
// @run-at         document-end
// @require        https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @namespace      https://greasyfork.org/users/237458
// @require        http://code.jquery.com/jquery-latest.js
// @require        https://code.jquery.com/ui/1.13.2/jquery-ui.js
// @icon           https://cam4.com/favicon.ico
// @license        MIT
// ==/UserScript==
(function() {
   'use strict';
        GM_addStyle(`
         /* Naked & Uncut: Tulum */
            .SegmentItem__container__NA2zm,

         /* popup sopra */
            .Directory__subHeader__2O2A2,

         /*set 2023 */
            .Footer__footer__202HR,

         /*categorie funziona +parte sotto*/
            .ContentCard__title__2CLsx,
            .ContentCard__container__rOtbe,
            .LegalArea__legal__2bQcD,

         /*correlate set 2023*/
            .Directory__aboveFooterWrap__sLRuI {
                display: none!important;
            }
        `);
         //accetta cookie 2023
//donne
//setTimeout(function(){document.querySelector("#ssdq12FB_disclaimerWithAgeVerification_badge-agreeBtn-female").click();}, 1000);
    //continua cookie
// Function to save cookies to local storage
function saveCookiesToLocalStorage() {
    const cookies = document.cookie.split(';');
    cookies.forEach(cookie => {
        const [name, value] = cookie.split('=');
        if (name.trim() === 'disclaimer18' || name.trim() === 'disclaimerMobile18') {
            GM_setValue(name.trim(), value);
        }
    });
}

// Function to set cookies from local storage
function setCookiesFromLocalStorage() {
    const disclaimer18 = GM_getValue('disclaimer18');
    const disclaimerMobile18 = GM_getValue('disclaimerMobile18');
    if (disclaimer18) {
        document.cookie = `disclaimer18=${disclaimer18}; domain=.cam4.com; max-age=315360000`;
    }
    if (disclaimerMobile18) {
        document.cookie = `disclaimerMobile18=${disclaimerMobile18}; domain=.cam4.com; max-age=315360000`;
    }
}

// Save cookies to local storage when the script runs
saveCookiesToLocalStorage();

// Set cookies from local storage when the page loads
window.addEventListener('load', setCookiesFromLocalStorage);

if (!localStorage.getItem('reload')) {
    setTimeout(() => {
        document.location.reload();
    }, 2000);
    localStorage.setItem('reload', '1');
}

//popup questo sito utilizza cookie visibile senza estensione blocca publicita rifunziona
GM_addStyle('.index__cookieConsent__2M-8D {display: none!important}');//sett 2023
//foto publicita in alto prova un esperienza piu intima rifunziona
GM_addStyle('.PageHeaders__wrapper__3I9TX .PageHeaders__title__Wms1b {display: none!important}');
//parte sotto paginazione marzo 2224
GM_addStyle('#root > div > footer {display: none!important}');
//scritta scorrevole ottobre 2023
GM_addStyle('.CampaignCTAButton__offer__3uTR- {display:none!important}');
//parte inutile sotto i numeri rifunziona
GM_addStyle('#app > div.pageContainer > div.pageContent > div.Directory__content__TBdmJ > div.SponsoredAds__premiumAds__ZXHiX.Directory__sponsoredAds__tHvki{display: none!important}');//cam4 premium gennaio 2024

  //x dentro video
GM_addStyle('.index__closeButton__2llsj {display:none!important}');
   //ricordamelo dopo in chat  ottobre
GM_addStyle('.TokenAwarenessDesktop__container__3aA7r {display:none!important}');
//popup badoo allinterno della cam
GM_addStyle('.AdEmbeded__AddWrapperNoButton__28ZlR {display:none!important}');
//current page color red
GM_addStyle('.Pagination__pagination__3if3L li.Pagination__active__xYxuK a {background-color:red!important;color:lime!important;}');
//////////////////////////////////////////////////////////////////////////////////////
//login autoclick 10 secondi
setTimeout(function(){document.querySelector("#root > div > header > div.LzM4W._GM7Y > button.DicDC.SCZfE.yAILi.s1855.Wg2T7").click();}, 5000);//10000 pulsante accedi

//////////////////////////////////login2
setTimeout(function(){document.querySelector("#tUZ2be9k_loginFrom_continueButton").click();}, 8000);//pulsante continua
setTimeout(function(){document.querySelector("#tUZ2be9k_loginFrom_submitButton").click();}, 9000);//15000 login

     // Aggiungi la funzione per il trascinamento limitato allo schermo
function makeDraggableLimited(element) {
    element.draggable({
        containment: "window",
        stop: function(event, ui) {
            // Memorizza la posizione dopo il trascinamento
            GM_setValue('boxPosition', JSON.stringify(ui.position));//importante
        }
    });
}
///////////////////////////////////////////color picker
const $ = window.jQuery;
const j5= $.noConflict();
const body=document.body;
const style=" position:fixed; top:-16px;left:530px;background:;z-index:99999;"
const box=document.createElement("div");

box.id="mycam";
box.style=style;
j5(box).draggable();
body.append(box);
    // Ripristina la posizione salvata se presente
const savedPosition = GM_getValue('boxPosition');
if (savedPosition) {
    const parsedPosition = JSON.parse(savedPosition);
    $(box).css({ top: parsedPosition.top, left: parsedPosition.left });
}
////////////marzo 2024
     // Rendi l'elemento trascinabile con limitazioni di schermo
    makeDraggableLimited($(box));

function provac4(){
var box = document.getElementById('mycam');
box.style.display = ((box.style.display!='none') ? 'none' : 'block');
}
GM_registerMenuCommand("nascondi/mostra box",provac4);
 //dati per la conservazione
        const userdata = {color:'camcolor'}
        var mycolor= "#000000";//Inizializza con il valore di default
        //imposta la variabile del colore
        if(/^#+\w+$/.test(GM_getValue(userdata.color))){mycolor = GM_getValue(userdata.color);}//maggio 2024

    // salvare i dati personalizzati
    function saveSetting() {GM_setValue(userdata.color, mycolor);
    $('body, html').css("background", mycolor);
          }
///////////////////////////////////////////////////////////
            //Imposta lo stile CSS degli elementi nel menu
        GM_addStyle(`
#myMenu {font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', Arial, sans-serif; font-size:px; z-index: 2147483648;}

.button {margin-left:-5px;padding:3px 6px;line-height:16px;margin-top:-19px;display:inline-block;border:1px solid yellow;border-radius:3px;cursor:pointer;background:chocolate;}

#colorspan {font-size:13px!important;cursor:pointer;margin-left:1px;margin-bottom:-19px;color:lime;background-color:brown;border:1px solid yellow;border-radius:5px;text-decoration:none;width:55px;}

#seletcolor{margin-top:-47px; margin-left:5px;}

#setui{ width:auto;height:25px;margin-top:-14px; margin-left:0px;margin-right:0px; margin-bottom:0px;background-color:#293446;color:lime;}

#colorinput{cursor:pointer;margin-left:4px; margin-top:4px;height:25px;background-color:#3b3b3b;color:red; border:1px solid yellow;border-radius:5px;}
#datePicker1 {font-size:15px!important;display:inline-block;cursor:pointer; background:#3b3b3b;color:lime;border:1px solid yellow; border-radius:5px;margin:7px;text-align:center;width:max-content;}
            `);
setInterval(myTimer,90);
function myTimer() {
var d = new Date();
var t = d.toLocaleTimeString();
var mm = d.getMilliseconds();//millisecondi ottobre 2023
    ////////////////short  long
var date = new Date().toLocaleString('it', {'weekday': 'short', 'month': '2-digit', 'day': '2-digit','year':'numeric'});

document.getElementById("datePicker1").innerHTML =date +" "+ t +":"+ mm;
}
  //elemento html nel div   readonly datatime non fa comparire licona del calendario  linea 109 width:330px evita cambio forma quando viene spostato tutto a destra
   box.innerHTML=`
                      </p>
                       <fieldset style="background:#3b3b3b;border:2px solid red;color:lime;border-radius:7px;text-align:center;width:435px;height:50px;">
                       <legend>Clock</legend>
   <div id=setui>
<button id="colorspan" title="Hex value">${mycolor}</button> <input type="color" list="colors" id="colorinput" value="${mycolor}" title="Color picker"><div id="datePicker1" title="Data-ora"></div> <span class="button" title="Chiudi" id='close'>x</span>

                                    </p>
                    </div>
                    </fieldset>
            `;
            //aggiunta span close per chiudere il box direttamente
            var colorinputsetMenuClose=document.querySelector('#close');
            colorinputsetMenuClose.addEventListener('click',provac4,false);

            ////////////////////////////////////////
            var colorinput=document.querySelector('#colorinput');
            var colorspan = document.querySelector('#colorspan');
            ////////////////////////////////////////
    colorinput.addEventListener('input', function(event){colorChange(event)},false);
     $('body, html').css("background", mycolor);
           //evento della tavolozza dei colori body
            function colorChange (e) {
            mycolor = e.target.value;
            colorspan.innerHTML=e.target.value;
            $('body, html').css("background", mycolor);
            GM_setValue(userdata.color, mycolor);
            }

})();
//////////////////////////////pulsante torna in alto
var $ = window.jQuery;
$(document).ready(function() {
 $('body').append('<img class="toPageTop1" title="Sali in alto" style="position:fixed;z-index:999999999999999999;bottom:320px;right:0px;cursor:pointer;border-radius:100%;width:70px;height:70px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IAr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+LrMbjGAejAZAvRqEwDAxnHYxjKwFQHS8E/KcJ0ZlV5LSXXaACDd/lIbtQAYPa0lezUnl6YmL1qsXoreJ0MjJ0NplOjI6c6+9hJQHWzkAh0nV8lKb4GyOrSWQNrR5AWJMeeFhc/ieKUAJEthEI6I8MKUA9X08L8zv1Xqc5zSANTnMPTn7VjyWFHNudW91SMMf98/1H0TLLULLJry0BCqOl8qCeZDuBuZuDPUiRR158c3e52yM28kArIGrzUxCo+6EqClc0Ce8uTmhzC0lRfUPs/MPckpT+K8kSWwBESHQKfSJ+0iY9XpjsGn6UtSkbxOu9EI+C0/BFdtB3GbQW3dozQD3wg8iuGMynz6IoVgFUDWiB+fz+IQxA2+f2RNE6cK7R/hyFMwTWMHY52PHKTO5smtDUAVI2323QGwSXcTdO8iYBNmyaaNuwiwSXcTdO8iYBNmyaaNWx8B/wMj7yxftxxt6gAAAABJRU5ErkJggg==";/>');

        $(".toPageTop1").hide(0);
        $(window).scroll(function(){
            if($(window).scrollTop() >= 100){
                $(".toPageTop1").fadeIn(4000);
            }else{
                $(".toPageTop1").stop(true,true).fadeOut(2000);
            }
        });
        $(".toPageTop1").click(function(){
            $("html,body").animate({
                scrollTop:0
            },3000);
        });

    });
//passa alla pagina successiva richiede jquery
$(window).scroll(function() {
     if($(window).scrollTop() + $(window).height() == $(document).height()) {
       /////////////////////////////////////////////////////li:nth-last-child(1) > a ///
document.querySelector("#Ayg3aS21_paginationWrap_pagination > ul > li:nth-last-child(1) > a").click();//funziona
         }
});
//scrollbar
GM_addStyle(`
		/*####----BROWSER SCROLL BAR----####*/
		::-webkit-scrollbar {
        /*colore di spondo pulsanti su e giu */
		background:#303134!important;
		width:17px!important;
		}

        /*cursore che scorre*/
        ::-webkit-scrollbar-thumb {background-color:#676767!important;border-radius:5px!important;border:2px solid green!important;}

        /*parte colorata sotto lo scroll */
        body::-webkit-scrollbar-track {background:#303134;}

        /*pulsanti sotto freccine su e giu*/
        ::-webkit-scrollbar-button {background-color:#777777;}

        /*freccia nera sopra*/
        ::-webkit-scrollbar-button:single-button:vertical:decrement {display:block;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgFDgonQxmpnwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAc0lEQVQoz+XRMUoCAACF4Q/BSa/gHjl1Alu8QwguXcC7eApPIXQJt2iKjhAk+DcoJDjonP/8vulxJ1Wr6rNa3wpm1bZju2p5DUyqTfXTX2/Vw/lucAZGWOAZQ3zjgEe8VuMLhClesMc7vvBxwnM8/ecffwFSoEVS/hyFWgAAAABJRU5ErkJggg==)!important;
        background-size: cover!important;
		background-repeat: no-repeat!important;
        border:1px solid red;
		}
        /*freccia nera sotto*/
        ::-webkit-scrollbar-button:single-button:vertical:increment {display:block;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgFDTUIslAAowAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAdUlEQVQoz+XPIQoCUQCE4XnJ4Daz3UuIJ9lsNHoH457CUwhWD+ANBEGzYUG+Da6IsIhZ/zQwDDOT/B7lKTBP0iSZJGl7T5JRkmuSZSnl8JZGhQ0uuOPmwRlrjAdrMcPeixZbTD/uRY1jH9ph8dVRNDhhlT+hA0tUX1KVJjAXAAAAAElFTkSuQmCC)!important;
        background-size: cover!important;
		background-repeat: no-repeat!important;
        border:1px solid red;
		}
`);