Skip to content

Instantly share code, notes, and snippets.

View TechWithTy's full-sized avatar
🎯
Focusing

TechWIthTy TechWithTy

🎯
Focusing
View GitHub Profile
// OnScroll Hide (Mobile)
var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos || document.body.scrollTop <= 10) {
document.getElementById('navbar').style.top = '0';
// document.getElementById('navbar').style.opacity = '1';
} else {
document.getElementById('navbar').style.top = '-500px';
}
@TechWithTy
TechWithTy / instalike.js
Created May 28, 2019 04:58 — forked from jadeallencook/instalike.js
Scripts that auto likes posts on instagram via tag.
let likesGiven = 0;
setInterval(() => {
let heart = document.getElementsByClassName('glyphsSpriteHeart__outline__24__grey_9'),
arrow = document.querySelector('.coreSpriteRightPaginationArrow');
if (heart[1]) {
heart = heart[1].parentElement;
likesGiven++, heart.click();
}
arrow.click();
console.log(`You've liked ${likesGiven} post(s)!`);