#Change your status
A small script to change your status automaticly as you start up whatsapp web
Just drop it into tampermonkey, save and you'r done!
Last active
August 29, 2016 17:05
-
-
Save StephanStanisic/8155adb2da89d75739c560f420bc2189 to your computer and use it in GitHub Desktop.
Change your whatsapp status to a random new one each time you start whatsapp web. For Tampermonkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Change Status | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://web.whatsapp.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Your code here... | |
var run = true; | |
function selectElementContents(el) { | |
var range = document.createRange(); | |
range.selectNodeContents(el); | |
var sel = window.getSelection(); | |
sel.removeAllRanges(); | |
sel.addRange(range); | |
} | |
window.changeStatus = function(txt){ | |
setTimeout(function(){ | |
if(run){ | |
console.log("Open settings"); | |
document.getElementById("updatemewowp").innerHTML = "10%"; | |
document.getElementById("updatemewow").innerHTML = "Stage 1/5"; | |
document.getElementsByClassName("avatar icon-user-default")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("Start editing the status"); | |
document.getElementById("updatemewowp").innerHTML = "20%"; | |
document.getElementById("updatemewow").innerHTML = "Stage 2/5"; | |
document.getElementsByClassName("lock-icon icon icon-pencil")[1].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("Fill it"); | |
document.getElementById("updatemewowp").innerHTML = "35%"; | |
document.getElementById("updatemewow").innerHTML = "Stage 3/5"; | |
document.getElementsByClassName("input-emoji")[1].childNodes[0].innerHTML = txt[0]; | |
setTimeout(function(){ | |
if(run){ | |
console.log("Open da keyboard"); | |
document.getElementById("updatemewowp").innerHTML = "50%"; | |
document.getElementById("updatemewow").innerHTML = "Stage 4/5"; | |
document.getElementsByClassName("icon icon-emoji icon-emoji-input")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("Click da keyboard"); | |
document.getElementById("updatemewowp").innerHTML = "55%"; | |
document.getElementsByClassName("icon icon-emoji-objects")[0].click();//icon icon-emoji-people | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("icon icon-emoji-people")[0].click();//icon icon-emoji-people | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("emojik emojiordered1349")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("Save da status"); | |
document.getElementById("updatemewowp").innerHTML = "90%"; | |
document.getElementsByClassName("lock-icon icon icon-checkmark")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("edit da username"); | |
document.getElementsByClassName("lock-icon icon icon-pencil")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("input-emoji")[0].childNodes[0].innerHTML = txt[1]; | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("icon icon-emoji icon-emoji-input")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("icon icon-emoji-objects")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("emojik emojiordered1313")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
document.getElementsByClassName("lock-icon icon icon-checkmark")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("Close da settings"); | |
document.getElementById("updatemewowp").innerHTML = "99%"; | |
document.getElementById("updatemewow").innerHTML = "Stage 5/5"; | |
document.getElementsByClassName("icon btn-close-drawer icon-back-light")[0].click(); | |
setTimeout(function(){ | |
if(run){ | |
console.log("Hide overlay"); | |
document.getElementById("updatemewowp").innerHTML = "-1%"; | |
document.getElementById("updatemewow").innerHTML = "Stage 6/5"; | |
document.getElementsByClassName("intro-text")[0].innerText = txt[1]; | |
document.getElementsByClassName("intro-title")[0].innerText = txt[0]; | |
setTimeout(function(){ | |
if(run){ | |
document.getElementById("itaoverlayme").style.display = "none"; | |
} | |
},150); | |
} | |
},100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
} | |
}, 100); | |
}; | |
var statuses = [ | |
// YOUR STATUS HERE YOUR PROFILE NAME HERE | |
//#| 10 20 30 40 50 60 70 80 90 100 110 120 130 |#| 10 20 |# | |
//#|123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678|#|123456789012345678901234|# | |
["“Nothing is ever free in life. You will always end up paying for it in the end.”", "Stephan S (~ Unknown)"], // | |
["“If you want to be wanted one must never take what they want, only one who gives it to you can give you the feeling that you are wanted.”", "Stephan S (~ Unknown)"], // | |
["“Wounds heal but men do not,” “For we all must pay for our sins.”", "Stephan S (~ Unknown)"], // | |
["“You are the happy memories of the past, the joyful moments of the present, and the hope and promise of the future for us all.”", "Stephan S (~ Unknown)"], // | |
["“Love is made up of three unconditional properties.” “Acceptance, understanding and appreciation.” “Remove one and it will fall apart”", "~ Vera Nazarian"], // | |
["“My love for you is like time, if you give it just one moment, it will last forever.”", "Stephan S (~ Unknown)"], // | |
["“It is forbidden to kill; therefore all murderers are punished unless they kill in large numbers and to the sound of trumpets.”", "~ Voltaire"], // | |
["“Never give up on someone you can’t go a day without thinking about.”", "Stephan S (~ Unknown)"], // | |
["“Money has no meaning unless you can spend it on the ones you love.”", "Stephan S (~ Unknown)"], // | |
["“War has a way of changing a man if he gets caught up in all the death.”", "Stephan S (~ Unknown)"], // | |
["“Never judge ones who are different from yourself.”", "Stephan S (~ Unknown)"], // | |
["“Life without love is a shadow of things that might be.”", "~ Neil"], // | |
["“No evil dooms us hopelessly except the evil we love, and desire to continue in, and make no effort to escape from.”", "~ George Eliot"], // | |
["“Men are not punished for their sins, but by them.”", "~ Kin Hubbard"], // | |
["“A gem cannot be polished without friction, nor a man perfected without trials.”", "~ Lucius Annaeus"], // | |
["“Do not look back over the past for it is gone; do not be troubled about the future, it has not yet come. Live in the present.”", "~ Ida Scott Taylor"], // | |
["“Sometimes, our eyes need to be washed by our tears so that we can see life with a clearer view again.”", "Stephan S (~ Unknown)"], // | |
["“Jealousy is the result of lack of self-confidence, self-worth, and self-acceptance. If you can't accept yourself, no one else will.”", "~ Sasha Azevedo"], // | |
["“When you're a beautiful person on the inside, there is nothing in the world that can change that about you.”", "~ Sasha Azevedo"], // | |
["“The truth hurts but it doesn't kill. The lie pleases but it doesn't heal one‘s heart.”", "Stephan S (~ Unknown)"], // | |
["“Every man must decide whether he will walk in the light of creative altruism or in the darkness of destructive selfishness.”", "~ Martin Luther King, Jr."], // | |
]; | |
var status = Math.floor(Math.random() * statuses.length); | |
status = statuses[status]; | |
var div = document.createElement("div"); | |
div.id = "itaoverlayme"; | |
div.style.position = "fixed"; | |
div.style.zIndex = "99999999"; | |
div.style.top = "0"; | |
div.style.bottom = "0"; | |
div.style.width = "100%"; | |
div.style.height = "100%"; | |
div.style.background = "rgba(0,0,0,0.5)"; | |
div.style.paddingTop = "20%"; | |
div.style.color = "#fff"; | |
div.style.textShadow = "1px 1px 1px #000"; | |
div.style.fontSize = "250%"; | |
div.style.textAlign = "center"; | |
//div.style.display = "none"; | |
div.innerHTML = "<h1>Wait while I</h1><h1>change your status</h1><br><small style='font-size:40%;width: 50vw;overflow: hidden;overflow-wrap: break-word;display: inline-block;'>"+status[0]+" <br> "+status[1]+"</small><br><small style='font-size:40%' id='updatemewow'>Stage 0/5</small><small style='font-size:40%'> • </small><small style='font-size:40%' id='updatemewowp'>0%</small><br><br><br><svg class=\"spinner-container\" width=\"50px\" height=\"50px\" viewBox=\"0 0 52 52\"><circle class=\"path\" cx=\"26px\" cy=\"26px\" r=\"20px\" fill=\"none\" stroke-width=\"4px\"></circle></svg><div style='position:fixed; bottom: 100px; width:100%; left:0;'><button style='padding:7px 12px; color:#fff; border:1px solid #fff; border-radius:100000px;position:relative; z-index:99999999999999999999999999999;' id='bttnn' onclick='' onmouseenter='' onmouseleave='this.style.background = \"rgba(0,0,0,0)\";'>Shut up!</button><button style='padding:7px 12px; color:#fff; border:1px solid #fff; border-radius:100000px;position:relative; z-index:99999999999999999999999999999; margin-left:5px;' id='newww'>Nah, gimme a new one.</button></div>"; | |
document.body.appendChild(div); | |
document.getElementById("bttnn").onclick = function() {document.getElementById("itaoverlayme").style.display = "none"; run = false;}; | |
document.getElementById("bttnn").onmouseenter = function() {this.style.background = "rgba(255,255,255,.15)";}; | |
document.getElementById("bttnn").onmouseleave = function() {this.style.background = "rgba(255,255,255,0)";}; | |
document.getElementById("newww").onclick = function() {window.location = '?';}; | |
document.getElementById("newww").onmouseenter = function() {this.style.background = "rgba(255,255,255,.15)";}; | |
document.getElementById("newww").onmouseleave = function() {this.style.background = "rgba(255,255,255,0)";}; | |
/*var i = 0; | |
var tt = setInterval(function(){ | |
if(i < 100){ | |
document.getElementById("updatemewowp").innerHTML = i+"%"; | |
i++; | |
} else { | |
clearInterval(tt); | |
} | |
}, 60);*/ | |
var t = setInterval(function(){ | |
if(document.getElementsByClassName("chat").length > 0) { | |
setTimeout(init, 500); | |
clearInterval(t); | |
} | |
},100); | |
function init(){ | |
changeStatus(status); | |
} | |
/*setTimeout(function(){ | |
changeStatus(status); | |
}, 10000);*/ | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment