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
[...document.querySelectorAll('.invite-card')].forEach(card => { | |
const headline = card.querySelector('.headline').textContent; | |
const accept = card.querySelector('.bt-invite-accept'); | |
const decline = card.querySelector('.bt-invite-decline'); | |
const name = card.querySelector('.name').textContent; | |
if(headline.match(/recruit/gi)) { | |
console.log(`Nah. ${name} looks a little fishy to me. 🚷🚷🚷`); | |
decline.click(); | |
} else { |
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
#!/bin/bash - | |
############################################################################### | |
# File: js-validation-git-pre-commit-hook.sh | |
# | |
# Description: Git pre-commit that checks your code for js errors before you commit it | |
# | |
# Prerequisites: jshint to install run: "npm install jshint -g" | |
# | |
# Instructions: Place this file in your project's .git/hooks renamed to "pre-commit" | |
# run: "chmod +x .git/hooks/pre-commit" |