Just my shot at doing this without using jQuery
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
const delayMs = 1000; | |
const keywords = ["#redeBBB","Big Brother","bbb","#BBB","#BBB22","#BBB222","#BBBB22","boninho","b0ninho","b0ninh0","boninh0","globoplay","Tadeu Schmidt","Schmidt","schimit","Pedro Scooby","Scooby","Arthur Aguiar","Brunna Gonçalves","Rhudson Victor","Rhudson","Rafa Kalimann","Kalimann","Luciano Estevan","Eslovenia Marques","Lucas Bissoli","lais caldas","Bissoli","Barbara Heck","Heck","Rodrigo Mussi","Mussi","Natalia Deodato","Paulo Andre Camilo","bigfone","bigphone","paredão","paredawn","paredaum","Eslovenia","Eliezer","Eli","Jessilane","Lais","Paulo Andre","Andre Camilo","anjo","imunidade","votação","projac"]; | |
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; | |
const addMutedKeyword = keyword => { | |
const input = document.querySelector("[name='keyword']"); | |
nativeInputValueSetter.call(input, keyword); | |
input.dispatchEvent(new Event('input', { bubbles: true })); |
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
function SearchingChallenge(str: string): string | number { | |
const openers = ['(', '[']; | |
const closers = [')', ']']; | |
const collection = []; | |
let counter: number = 0; | |
let isValid = true; | |
[...str].forEach((char)=> { | |
if(openers.includes(char)) { |
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
/* | |
* There are 3 key problems with the React code below. Can you find them? | |
* Assume fetchUserProfile exists elsewhere. | |
*/ | |
import React, { Suspense, useState, useEffect } from "react"; | |
const SuspensefulUserProfile = ({ userId }) => { |