Can anyone help me figure out how to auto-click every button in Instagram's "hide story from" settings using console? I tried the following code:
for (let i = 0; i < 300; i++) {
document.getElementsByClassName('wbloks_1')[i]
.addEventListener('click', function (event) {
});
}
<div data-bloks-name="bk.components.Flexbox" class="wbloks_1" style="pointer-events: none; margin-right: 12px; flex-shrink: 0; align-items: center; flex-direction: row; justify-content: flex-end;"><div data-bloks-name="bk.components.Flexbox" class="wbloks_1" style="pointer-events: none;"><div data-bloks-name="bk.components.Flexbox" role="button" aria-label="Toggle checkbox" class="wbloks_1" style="pointer-events: none; display: none;"><div data-bloks-name="ig.components.Icon" class="wbloks_1" style="-webkit-mask-image: url("https://i.instagram.com/static/images/bloks/icons/generated/circle-check__filled__24-4x.png/219f67ac4c95.png"); -webkit-mask-size: contain; background-color: rgb(0, 149, 246); flex-shrink: 0; width: 24px; height: 24px;"></div></div><div data-bloks-name="bk.components.Flexbox" role="button" aria-label="Toggle checkbox" class="wbloks_1" style="pointer-events: none; display: none;"><div data-bloks-name="ig.components.Icon" class="wbloks_1" style="-webkit-mask-image: url("https://i.instagram.com/static/images/bloks/icons/generated/circle-check__filled__24-4x.png/219f67ac4c95.png"); -webkit-mask-size: contain; background-color: rgba(0, 149, 246, 0.3); flex-shrink: 0; width: 24px; height: 24px;"></div></div><div data-bloks-name="bk.components.Flexbox" role="button" aria-label="Toggle checkbox" class="wbloks_1" style="pointer-events: none;"><div data-bloks-name="ig.components.Icon" class="wbloks_1" style="-webkit-mask-image: url("https://i.instagram.com/static/images/bloks/icons/generated/circle__outline__24-4x.png/2f71074dce25.png"); -webkit-mask-size: contain; background-color: rgb(54, 54, 54); flex-shrink: 0; width: 24px; height: 24px;"></div></div></div></div>