-
Notifications
You must be signed in to change notification settings - Fork 0
/
instagram-press-next.js
23 lines (23 loc) · 1.1 KB
/
instagram-press-next.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var bn = 0;
var clickEvent = new MouseEvent('click', {
'view': window,
'bubbles': true,
'cancelable': false
});
var el = document.getElementsByClassName('_abl-');
el[bn].addEventListener(clickEvent, function (e) { /* ... */ }, false);
el[bn].dispatchEvent(clickEvent);
var tmrID = setInterval(function() {el[bn+1].dispatchEvent(clickEvent)}, 5000);
var btn = document.createElement('BUTTON');
btn.innerHTML = 'STOP';
btn.id = 'cscr';
btn.style.cssText = 'position: fixed; top:55px; right:0; z-index: 999;';
btn.onclick = function() {clearTimeout(tmrID), btn.remove()};
document.body.appendChild(btn);
var sheet = window.document.styleSheets[0];
sheet.insertRule('._ae65 {display: none !important}', sheet.cssRules.length);
sheet.insertRule('._aas7 {display: none !important}', sheet.cssRules.length);
/*sheet.insertRule('.M9sTE {width: 100%} ', sheet.cssRules.length);
sheet.insertRule('.EtaWk {display: none} ', sheet.cssRules.length);
sheet.insertRule('.JyscU ._97aPb {margin-right: 0 !important} ', sheet.cssRules.length);
sheet.insertRule('.JyscU.ePUX4 .eo2As {display: none} ', sheet.cssRules.length);*/