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
let listOfRecentContacts = document.getElementsByClassName("_3j7s9"); | |
console.log("listOfRecentContacts.length = " + listOfRecentContacts.length); | |
var eventToSwitchMessageBox = new MouseEvent('mousedown', { | |
bubbles: true, | |
}); | |
let count =1; | |
let openMessageBox = setInterval(function(){ | |
// if(count>listOfRecentContacts.length) { | |
if(count>5) { | |
console.log("Clearing interval with clearInterval..."); |
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
// linkedin script | |
var listOfTopInvitations = document.getElementsByClassName("invitation-card__action-btn button-secondary-medium"); | |
for (var i = 0;i<listOfTopInvitations.length();i++) { listOfTopInvitations[i].click() } |
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
var listOfCommentBox = document.getElementsByTagName("article"); | |
//get the array list of all the div-s that has the comments | |
let extractedListOfFirstComment = []; | |
// store the author details of the comment | |
let listOfDiv = []; | |
//store the div-s of the comment | |
let count =0; | |
function generateComment(name,index) { |
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
let textToSend = "Hey There. I wanted to wish you Happy New Year. Hope you are doing great."; | |
textToSend = textToSend.split("."); | |
let count = 0; | |
let textbox = document.querySelector('div._2S1VP'); | |
let event = new InputEvent('input', { | |
bubbles: true | |
}); | |
let messageLoop = setInterval(function(){ | |
textbox.textContent =textToSend[count] ; | |
textbox.dispatchEvent(event); |
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
/* | |
This is an experimental HashMap implementation with some features I needed and didn't found in JS default Arrays and Objects | |
Features : | |
* Direct acces too elements throught .get(key) | |
* fast keys or values iteration using for (;;) instead of for in syntax (http://jsperf.com/array-keys-vs-object-keys-iteration/3 ) | |
*/ | |
class HashMap { | |
public length: number = 0; |