// ==UserScript==
// @name WhatsApp tools Bets tools for whatsapp download free NOW
// @namespace https://github.com/DeveloperMDCM/
// @homepage https://github.com/DeveloperMDCM/
// @version 1.3
// @description Nuevas opciones para tu whatsapp web
// @author MDCM
// @match *://*.whatsapp.com/
// @icon https://cdn-icons-png.flaticon.com/512/124/124034.png?w=360
// @grant none
// @compatible chrome
// @compatible firefox
// @compatible opera
// @compatible safari
// @compatible edge
// @connect https://web.whatsapp.com/
// @license MIT
// @downloadURL none
// ==/UserScript==
(function () {
// Whatsapp tools by: DeveloperMDCM MDCM
//https://github.com/DeveloperMDCM/whatsapp-web-tools
function cargarScript() {
let htmlCss = `
Whataspp
`;
const addButtonFlotant = document.querySelector("#pane-side");
if (addButtonFlotant != undefined) {
addButtonFlotant.insertAdjacentHTML("beforebegin", htmlCss);
}
let validoPrivacidad = 0;
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.keyCode === 16) {
const allDivs = document.querySelector("body");
validoPrivacidad += 1;
switch (validoPrivacidad) {
case 1:
allDivs.style.filter = "blur(10px)";
break;
case 2:
allDivs.style.filter = "blur(0)";
validoPrivacidad = 0;
break;
}
}
});
const changeTheme = document.querySelector("#tema_sistema > p");
if(changeTheme != undefined) {
changeTheme.addEventListener("click", () => {
const bodytheme = document.querySelector("body");
const classNamesTheme = document.querySelector("body").classList;
if (classNamesTheme[1] === "dark") {
changeTheme.textContent = "Activate Theme Dark";
bodytheme.classList.remove("dark");
} else {
bodytheme.classList.add("dark");
changeTheme.textContent = "Activate Theme Light";
}
});
}
const InputColorOpacity = document.querySelector("#colores");
if(InputColorOpacity != undefined) {
InputColorOpacity.addEventListener("input", function () {
document.body.style.setProperty(
"--conversation-panel-background",
InputColorOpacity.value
);
});
}
// // Función para cambiar los estados de un mensaje visto , entregado y leído commin soon
// function cambiarvisto() {
// let visto = document.querySelectorAll(".do8e0lj9.l7jjieqr.k6y3xtnu > span");
// let svgLeido =
// '';
// let svgEntregado =
// '';
// let svgEnviado =
// '';
// for (let i = 1; i < visto.length; i++) {
// visto[i].ariaLabel === " Entregado "
// ? (visto[i].innerHTML = svgEntregado)
// : visto[i].ariaLabel === " Enviado "
// ? (visto[i].innerHTML = svgEnviado)
// : (visto[i].innerHTML = svgLeido);
// }
// }
// Función para cambiar el fondo de los chats
let fondoEnriptado;
function handleFileSelect(evt) {
var files = evt.target.files; // FileList object
// Loop through the FileList and render image files as thumbnails.
for (let i = 0, f; (f = files[i]); i++) {
// Only process image files.
if (!f.type.match("image.*")) {
continue;
}
let reader = new FileReader();
// Closure to capture the file information.
reader.onload = (() => {
return function (e) {
// Render
fondoEnriptado = e.target.result;
let chatbg = document.querySelector(
".lhggkp7q.qq0sjtgm.tkdu00h0.ln8gz9je.ppled2lx.tbmiozwh.fq1kqmrp.shnvsdv4"
); // Fondo / bg chats
const vista = document.querySelector("#main > header");
const ventaIzquierdaChats = document.querySelector("#side");
if (
chatbg != undefined &&
vista != undefined &&
ventaIzquierdaChats != undefined
) {
document.body.style.setProperty(
"--conversation-panel-background",
"black"
);
document.body.style.setProperty(
"--conversation-panel-border",
"#00f19ce8"
);
document.querySelector(
"#main > div._2gzeB > div > div._5kRIK"
).style.backgroundColor = "";
document
.querySelector("html[dir] ._5kRIK")
.style.setProperty(
"background-image",
`url('${fondoEnriptado}')`
);
document
.querySelector("html[dir] ._5kRIK")
.style.setProperty("background-size", `cover`);
}
ventaIzquierdaChats.onclick = () => {
document
.querySelector("html[dir] ._5kRIK")
.style.setProperty("background-size", `cover`);
document
.querySelector("html[dir] ._5kRIK")
.style.setProperty(
"background-image",
`url('${fondoEnriptado}')`
);
};
};
})(f);
// Read in the image file as a data URL.
reader.readAsDataURL(f);
}
}
document
.getElementById("files")
.addEventListener("change", handleFileSelect, false);
}
let validoChats = 0;
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.altKey) {
const chats = document.querySelector("#app > div > div > div._2Ts6i._3RGKj");
validoChats += 1;
switch (validoChats) {
case 1:
chats.style.display = "none";
break;
case 2:
chats.style.display = "";
validoChats = 0;
break;
}
}
});
setInterval(() => {
const loadpague = document.querySelector('._1vjYt');
if(!loadpague) {
setTimeout(() => {
cargarScript();
document.querySelector("#app > div > div > div._2Ts6i._2xAQV > div > div > div._3q5qB > div._1vjYt > h1").textContent = 'WhatsApp Web Mod by: DeveloperMDCM'
}, 1000);
}
}, 1000);
// cargarScript();
})();