Skip to content

Instantly share code, notes, and snippets.

View josephNg95's full-sized avatar
🎯
Focusing

Joseph Ng josephNg95

🎯
Focusing
  • Hanoi/VietNam
  • 12:57 (UTC +07:00)
View GitHub Profile
@josephNg95
josephNg95 / get-youtube-video-title.js
Last active April 25, 2020 22:33
Get youtube video title in the list
function getYoutubeVideoTitleInList() {
let items = document.querySelectorAll('h4.style-scope')
let strTitles = ''
count = 0
while(count < items.length - 1) {
let title = items[count].innerText.trim()
strTitles += '\n' + title
count++
}
@josephNg95
josephNg95 / block-all-facebook-request.js
Last active October 21, 2020 01:42
Block all member request to the facebook group
function blockAllRequestGroup() {
let reqList = document.querySelector('.uiList._4kg._4kt._6-h._6-j').children
for (let i = 0; i < reqList.length; i++) {
let arrowActionButton = reqList[i].querySelector('.uiPopover').children[0].click()
let popOverActions = document.querySelector('.uiContextualLayer.uiContextualLayerBelowRight')
popOverActions.querySelector('ul').lastChild.click()
console.log(`%c ${reqList[i].querySelector('a._z_3').innerText} %c is blocked `, 'background:#35495e ; padding: 5px; border-radius: 3px 0 0 3px; color: #fff', 'background:#41b883 ; padding: 5px; border-radius: 0 3px 3px 0; color: #fff')
}