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
let ads = [...document.querySelectorAll("a")].filter(x=>x.textContent == "Sponsored") | |
for(let ad of ads){ | |
let y = ad.parentElement | |
while(y.parentElement.querySelector(`[data-pagelet='FeedUnit_{n}']`) == null){ | |
y=y.parentElement | |
} | |
y.style.display = "none"; | |
} |
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
static async signInRoute(req, res) { | |
// empID should be extracted from the AUTH token provided by the client-side | |
const { site_token } = req.params | |
const isObjectID = /^[0-9a-fA-F]{24}$/ | |
const site = decode(site_token); | |
// if not a valid object id | |
if (!isObjectID.test(site._id)) return res.status(400).send() | |
const site_id = site._id; | |
//! for testing |