Cam4 Clean figuccio

cam colorato 2025

Versión del día 26/02/2025. Echa un vistazo a la versión más reciente.

  1. // ==UserScript==
  2. // @name Cam4 Clean figuccio
  3. // @description cam colorato 2025
  4. // @version 15.5
  5. // @author figuccio
  6. // @match https://*.cam4.com/*
  7. // @grant GM_addStyle
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // @grant GM_registerMenuCommand
  11. // @run-at document-end
  12. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
  13. // @namespace https://greasyfork.org/users/237458
  14. // @require http://code.jquery.com/jquery-latest.js
  15. // @require https://code.jquery.com/ui/1.13.2/jquery-ui.js
  16. // @icon https://cam4.com/favicon.ico
  17. // @license MIT
  18. // ==/UserScript==
  19. (function() {
  20. 'use strict';
  21. // Serie di selettori di messaggi di chat da tenere d'occhio (se 6 suule cam corregge scroll)
  22. const chatMessageSelectors = [
  23. '.ChatMobileMessages__msgHolder__3-Yju',
  24. '.ChatMobileMessages__msgHolderEmbed__2LQTu',
  25. '.ChatMobileMessages__msgHolderForMobile__3tDM4'
  26. ];
  27.  
  28. // Funzione per scorrere la pagina verso l'alto
  29. function scrollPageUp() {
  30. window.scrollTo(0, 0);
  31. }
  32.  
  33. // MutationObserver per osservare gli elementi specificati
  34. const observer = new MutationObserver((mutations) => {
  35. mutations.forEach((mutation) => {
  36. chatMessageSelectors.forEach((selector) => {
  37. if (mutation.target.matches(selector) || mutation.target.querySelector(selector)) {
  38. scrollPageUp();
  39. }
  40. });
  41. });
  42. });
  43.  
  44. // Inizia a osservare il corpo del documento per eventuali modifiche
  45. observer.observe(document.body, {
  46. childList: true,
  47. subtree: true
  48. });
  49. ////////////////////////////////////////////////////////////////////
  50. GM_addStyle(`
  51. /* Naked & Uncut: Tulum */
  52. .SegmentItem__container__NA2zm,
  53.  
  54. /* popup sopra */
  55. .Directory__subHeader__2O2A2,
  56.  
  57. /*set 2023 */
  58. .Footer__footer__202HR,
  59.  
  60. /*categorie funziona +parte sotto*/
  61. .ContentCard__title__2CLsx,
  62. .ContentCard__container__rOtbe,
  63. .LegalArea__legal__2bQcD,
  64. .QMBRc,
  65. .BYmt2,
  66. .jGkoG,
  67. .SnYAk,
  68. .yId07,
  69. /*correlate set 2023*/
  70. .Directory__aboveFooterWrap__sLRuI {
  71. display: none!important;
  72. }
  73. `);
  74.  
  75. //continua cookie
  76. // Function to save cookies to local storage
  77. function saveCookiesToLocalStorage() {
  78. const cookies = document.cookie.split(';');
  79. cookies.forEach(cookie => {
  80. const [name, value] = cookie.split('=');
  81. if (name.trim() === 'disclaimer18' || name.trim() === 'disclaimerMobile18') {
  82. GM_setValue(name.trim(), value);
  83. }
  84. });
  85. }
  86.  
  87. // Function to set cookies from local storage
  88. function setCookiesFromLocalStorage() {
  89. const disclaimer18 = GM_getValue('disclaimer18');
  90. const disclaimerMobile18 = GM_getValue('disclaimerMobile18');
  91. if (disclaimer18) {
  92. document.cookie = `disclaimer18=${disclaimer18}; domain=.cam4.com; max-age=315360000`;
  93. }
  94. if (disclaimerMobile18) {
  95. document.cookie = `disclaimerMobile18=${disclaimerMobile18}; domain=.cam4.com; max-age=315360000`;
  96. }
  97. }
  98.  
  99. // Save cookies to local storage when the script runs
  100. saveCookiesToLocalStorage();
  101.  
  102. // Set cookies from local storage when the page loads
  103. window.addEventListener('load', setCookiesFromLocalStorage);
  104.  
  105. if (!localStorage.getItem('reload')) {
  106. setTimeout(() => {
  107. document.location.reload();
  108. }, 2000);
  109. localStorage.setItem('reload', '1');
  110. }
  111. setCookiesFromLocalStorage();
  112. //popup questo sito utilizza cookie visibile senza estensione blocca publicita rifunziona
  113. GM_addStyle('.index__cookieConsent__2M-8D {display: none!important}');//sett 2023
  114. //foto publicita in alto prova un esperienza piu intima rifunziona
  115. GM_addStyle('.PageHeaders__wrapper__3I9TX .PageHeaders__title__Wms1b {display: none!important}');
  116. //parte sotto paginazione marzo 2224
  117. GM_addStyle('#root > div > footer {display: none!important}');
  118. //scritta scorrevole ottobre 2023
  119. GM_addStyle('.CampaignCTAButton__offer__3uTR- {display:none!important}');
  120. //parte inutile sotto i numeri rifunziona
  121. 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
  122.  
  123. //x dentro video
  124. GM_addStyle('.index__closeButton__2llsj {display:none!important}');
  125. //ricordamelo dopo in chat ottobre
  126. GM_addStyle('.TokenAwarenessDesktop__container__3aA7r {display:none!important}');
  127. //popup badoo allinterno della cam
  128. GM_addStyle('.AdEmbeded__AddWrapperNoButton__28ZlR {display:none!important}');
  129. //current page color red
  130. GM_addStyle('.Pagination__pagination__3if3L li.Pagination__active__xYxuK a {background-color:red!important;color:lime!important;}');
  131. //////////////////////////////////////////////////////////////////////////////////////
  132. // Click "Accedi" button after 7 seconds
  133. setTimeout(() => {
  134. const accediButton = document.querySelector("#root > div > div.THmE0 > header > div.LzM4W._GM7Y > button.DicDC.SCZfE.yAILi.s1855.Wg2T7");
  135. if (accediButton) {
  136. accediButton.click();
  137. } else {
  138. console.error("Accedi button not found");
  139. }
  140. }, 7000);
  141.  
  142. // Fare clic sul pulsante "Continua" dopo 5 secondi
  143. var l_foundButton = false;
  144. function clickButton() {
  145. const continueIntervalId = setInterval(() => {
  146. const continueButton = document.querySelector("#tUZ2be9k_loginFrom_continueButton");
  147. if (continueButton) {
  148. continueButton.click();
  149. l_foundButton = true;
  150. clearInterval(continueIntervalId); // Ferma l'intervallo una volta trovato il pulsante
  151. }
  152. }, 5000); // Esegui l'intervallo ogni 5 secondi
  153. }
  154.  
  155. // Aggiunto controllo e log per debug
  156. if (l_foundButton) {
  157. console.log("Button clicked.");
  158. l_foundButton = false; // Reset per il prossimo ciclo
  159. } else {
  160. //console.log("Button not found.");
  161. }
  162.  
  163. // Chiama clickButton() ogni 1000 millisecondi (1 secondo) finché il pulsante non viene trovato
  164. var intervalId = setInterval(() => {
  165. if (!l_foundButton) {
  166. clickButton();
  167. } else {
  168. clearInterval(intervalId); // Interrompe l'intervallo una volta cliccato il pulsante
  169. }
  170. }, 1000);
  171.  
  172. // Esegui clickButton() all'avvio per gestire i bottoni già presenti
  173. clickButton();
  174.  
  175. // Fare clic sul pulsante "Invia" dopo 1 secondo
  176. const submitIntervalId = setInterval(() => {
  177. const submitButton = document.querySelector("#tUZ2be9k_loginFrom_submitButton");
  178. if (submitButton) {
  179. submitButton.click();
  180. clearInterval(submitIntervalId);
  181. }
  182. }, 2000);
  183.  
  184. //////////////////
  185.  
  186. // Aggiungi la funzione per il trascinamento limitato allo schermo
  187. function makeDraggableLimited(element) {
  188. element.draggable({
  189. containment: "window",
  190. stop: function(event, ui) {
  191. // Memorizza la posizione dopo il trascinamento
  192. GM_setValue('boxPosition', JSON.stringify(ui.position));//importante
  193. }
  194. });
  195. }
  196. ///////////////////////////////////////////color picker
  197. const $ = window.jQuery;
  198. const j5= $.noConflict();
  199. const body=document.body;
  200. const style=" position:fixed; top:-16px;left:530px;z-index:99999;"
  201. const box=document.createElement("div");
  202.  
  203. box.id="mycam";
  204. box.style=style;
  205. j5(box).draggable();
  206. body.append(box);
  207. // Ripristina la posizione salvata se presente
  208. const savedPosition = GM_getValue('boxPosition');
  209. if (savedPosition) {
  210. const parsedPosition = JSON.parse(savedPosition);
  211. $(box).css({ top: parsedPosition.top, left: parsedPosition.left });
  212. }
  213. ////////////marzo 2024
  214. // Rendi l'elemento trascinabile con limitazioni di schermo
  215. makeDraggableLimited($(box));
  216.  
  217. function provac4(){
  218. var box = document.getElementById('mycam');
  219. box.style.display = ((box.style.display!='none') ? 'none' : 'block');
  220. }
  221. GM_registerMenuCommand("nascondi/mostra box",provac4);
  222. //dati per la conservazione
  223. const userdata = {color:'camcolor'}
  224. var mycolor= "#000000";//Inizializza con il valore di default
  225. //imposta la variabile del colore
  226. if(/^#+\w+$/.test(GM_getValue(userdata.color))){mycolor = GM_getValue(userdata.color);}//maggio 2024
  227.  
  228. // salvare i dati personalizzati
  229. function saveSetting() {GM_setValue(userdata.color, mycolor);
  230. $('.dSgtq,body, html').css("background", mycolor);
  231. }
  232. // Funzione per osservare i cambiamenti nel DOM
  233. function observeDOMChanges() {
  234. // Creazione di un observer con una funzione di callback
  235. var observer = new MutationObserver(function(mutationsList, observer) {
  236. // Per ogni mutazione rilevata, esegui la funzione saveSetting
  237. for(var mutation of mutationsList) {
  238. saveSetting();
  239. }
  240. });
  241.  
  242. // Configurazione dell'observer per osservare cambiamenti nei nodi figlio e nei nodi attributo
  243. var config = {childList:true, attributes:true, subtree:true};
  244. // Inizia ad osservare il DOM target
  245. observer.observe(document.body, config);
  246. }
  247. // Avvia l'osservazione dei cambiamenti nel DOM
  248. observeDOMChanges();
  249. ///////////////////////////////////////////////////////////
  250. //Imposta lo stile CSS degli elementi nel menu
  251. GM_addStyle(`
  252. #myMenu {font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', Arial, sans-serif; font-size:px; z-index: 2147483648;}
  253.  
  254. .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;}
  255.  
  256. #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;}
  257.  
  258. #seletcolor{margin-top:-47px; margin-left:5px;}
  259.  
  260. #setui{ width:auto;height:25px;margin-top:-14px; margin-left:0px;margin-right:0px; margin-bottom:0px;background-color:#293446;color:lime;}
  261.  
  262. #colorinput{cursor:pointer;margin-left:4px; margin-top:4px;height:25px;background-color:#3b3b3b;color:red; border:1px solid yellow;border-radius:5px;}
  263. #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;}
  264. `);
  265. setInterval(myTimer,90);
  266. function myTimer() {
  267. var d = new Date();
  268. var t = d.toLocaleTimeString();
  269. var mm = d.getMilliseconds();//millisecondi ottobre 2023
  270. ////////////////short long
  271. var date = new Date().toLocaleString('it', {'weekday': 'short', 'month': '2-digit', 'day': '2-digit','year':'numeric'});
  272.  
  273. document.getElementById("datePicker1").innerHTML =date +" "+ t +":"+ mm;
  274. }
  275. //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
  276. box.innerHTML=`
  277. </p>
  278. <fieldset style="background:#3b3b3b;border:2px solid red;color:lime;border-radius:7px;text-align:center;width:435px;height:50px;">
  279. <legend>Clock</legend>
  280. <div id=setui>
  281. <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>
  282.  
  283. </p>
  284. </div>
  285. </fieldset>
  286. `;
  287. //aggiunta span close per chiudere il box direttamente
  288. var colorinputsetMenuClose=document.querySelector('#close');
  289. colorinputsetMenuClose.addEventListener('click',provac4,false);
  290.  
  291. ////////////////////////////////////////
  292. var colorinput=document.querySelector('#colorinput');
  293. var colorspan = document.querySelector('#colorspan');
  294. ////////////////////////////////////////
  295. colorinput.addEventListener('input', function(event){colorChange(event)},false);
  296. $('.dSgtq,body, html').css("background", mycolor);
  297. //evento della tavolozza dei colori body
  298. function colorChange (e) {
  299. mycolor = e.target.value;
  300. colorspan.innerHTML=e.target.value;
  301. $('.dSgtq,body, html').css("background", mycolor);
  302. GM_setValue(userdata.color, mycolor);
  303. }
  304.  
  305. })();
  306. //////////////////////////////pulsante torna in alto
  307. var $ = window.jQuery;
  308. $(document).ready(function() {
  309. $('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,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABINJREFUeF7tm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DAxnHYxjKwFQHS8E/KcJ0ZlV5LSXXaACDd/lIbtQAYPa0lezUnl6YmL1qsXoreJ0MjJ0NplOjI6c6+9hJQHWzkAh0nV8lKb4GyOrSWQNrR5AWJMeeFhc/ieKUAJEthEI6I8MKUA9X08L8zv1Xqc5zSANTnMPTn7VjyWFHNudW91SMMf98/1H0TLLULLJry0BCqOl8qCeZDuBuZuDPUiRR158c3e52yM28kArIGrzUxCo+6EqClc0Ce8uTmhzC0lRfUPs/MPckpT+K8kSWwBESHQKfSJ+0iY9XpjsGn6UtSkbxOu9EI+C0/BFdtB3GbQW3dozQD3wg8iuGMynz6IoVgFUDWiB+fz+IQxA2+f2RNE6cK7R/hyFMwTWMHY52PHKTO5smtDUAVI2323QGwSXcTdO8iYBNmyaaNuwiwSXcTdO8iYBNmyaaNWx8B/wMj7yxftxxt6gAAAABJRU5ErkJggg==";/>');
  310.  
  311. $(".toPageTop1").hide(0);
  312. $(window).scroll(function(){
  313. if($(window).scrollTop() >= 100){
  314. $(".toPageTop1").fadeIn(4000);
  315. }else{
  316. $(".toPageTop1").stop(true,true).fadeOut(2000);
  317. }
  318. });
  319. $(".toPageTop1").click(function(){
  320. $("html,body").animate({
  321. scrollTop:0
  322. },3000);
  323. });
  324.  
  325. });
  326. //passa alla pagina successiva senza reflesh febbr 2025
  327. let isScrolling = false;
  328. function scrollHandler() {
  329. if (isScrolling) return;
  330. if ($(window).scrollTop() + $(window).height() >= $(document).height()) {
  331. isScrolling = true;
  332. const currentPage = document.querySelector('a[aria-current="true"]');
  333. if (currentPage) {
  334. const nextPage = currentPage.nextElementSibling;
  335. if (nextPage && nextPage.tagName.toLowerCase() === 'a') {
  336. nextPage.click();
  337. setTimeout(function() {
  338. isScrolling = false;
  339. }, 3000); // Timeout per prevenire il doppio click
  340. }
  341. }
  342. }
  343. }
  344.  
  345. $(window).scroll(scrollHandler);
  346. ////////////////////////////////////////
  347. //scrollbar
  348. GM_addStyle(`
  349. /*####----BROWSER SCROLL BAR----####*/
  350. ::-webkit-scrollbar {
  351. /*colore di spondo pulsanti su e giu */
  352. background:#303134!important;
  353. width:17px!important;
  354. }
  355.  
  356. /*cursore che scorre*/
  357. ::-webkit-scrollbar-thumb {background-color:#676767!important;border-radius:5px!important;border:2px solid green!important;}
  358.  
  359. /*parte colorata sotto lo scroll */
  360. body::-webkit-scrollbar-track {background:#303134;}
  361.  
  362. /*pulsanti sotto freccine su e giu*/
  363. ::-webkit-scrollbar-button {background-color:#777777;}
  364.  
  365. /*freccia nera sopra*/
  366. ::-webkit-scrollbar-button:single-button:vertical:decrement {display:block;
  367. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgFDgonQxmpnwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAc0lEQVQoz+XRMUoCAACF4Q/BSa/gHjl1Alu8QwguXcC7eApPIXQJt2iKjhAk+DcoJDjonP/8vulxJ1Wr6rNa3wpm1bZju2p5DUyqTfXTX2/Vw/lucAZGWOAZQ3zjgEe8VuMLhClesMc7vvBxwnM8/ecffwFSoEVS/hyFWgAAAABJRU5ErkJggg==)!important;
  368. background-size: cover!important;
  369. background-repeat: no-repeat!important;
  370. border:1px solid red;
  371. }
  372. /*freccia nera sotto*/
  373. ::-webkit-scrollbar-button:single-button:vertical:increment {display:block;
  374. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgFDTUIslAAowAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAdUlEQVQoz+XPIQoCUQCE4XnJ4Daz3UuIJ9lsNHoH457CUwhWD+ANBEGzYUG+Da6IsIhZ/zQwDDOT/B7lKTBP0iSZJGl7T5JRkmuSZSnl8JZGhQ0uuOPmwRlrjAdrMcPeixZbTD/uRY1jH9ph8dVRNDhhlT+hA0tUX1KVJjAXAAAAAElFTkSuQmCC)!important;
  375. background-size: cover!important;
  376. background-repeat: no-repeat!important;
  377. border:1px solid red;
  378. }
  379. `);
  380.