The :focus selector is used to select the element that has focus. It is allowed on elements that accept keyboard events or other user inputs.
- HTMLInputElement
- HTMLSelectElement
- HTMLTextAreaElement
- HTMLAnchorElement
- HTMLButtonElement
- HTMLAreaElement
UPDATED 22.11.2022
It's been two years since the last update, so here's the updated working script as per the comments below.
Thanks to BryanHaley for this.
setInterval(function () {
video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];
video.querySelector('#primary button[aria-label="Action menu"]').click();Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
| Working with DOM | Working with JS | Working With Functions |
|---|---|---|
| Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
| Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
| Create DOM Elements | Conditionals |
| var OFF = 0, WARN = 1, ERROR = 2; | |
| module.exports = exports = { | |
| "env": { | |
| "es6": true | |
| }, | |
| "ecmaFeatures": { | |
| // env=es6 doesn't include modules, which we are using | |
| "modules": true |
I hereby claim:
To claim this, I am signing this object:
Block encapsulates a standalone entity that is meaningful on its own.
While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.
Holistic entities without DOM representation (such as controllers or models) can be blocks as well.
| const fetch = require('node-fetch') | |
| const Bacon = require('baconjs') | |
| function getInPortuguese(word) { | |
| // Google Translate API is a paid (but dirt cheap) service. This is my key | |
| // and will be disabled by the time the video is out. To generate your own, | |
| // go here: https://cloud.google.com/translate/v2/getting_started | |
| const apiKey = | |
| 'AIzaSyB4DyRHIsNhogQXmH16YKbZfR-lTXrQpq0' | |
| const url = |