Skip to content

Instantly share code, notes, and snippets.

@oriadam
Last active May 9, 2020 16:24
Show Gist options
  • Save oriadam/034f4926e35f993ef299740dd3fe6559 to your computer and use it in GitHub Desktop.
Save oriadam/034f4926e35f993ef299740dd3fe6559 to your computer and use it in GitHub Desktop.
tremp tel hai user script
// ==UserScript==
// @name לוח טרמפים בלי חפשנים
// @namespace https://www.facebook.com
// @version 3
// @author You
// @match https://www.facebook.com/groups/198031415602/*
// @grant unsafeWindow
// @updateURL http://softov.org/tremp.user.js
// @downloadURL http://softov.org/tremp.user.js
// ==/UserScript==
unsafeWindow.setInterval(function() {
'use strict';
let articles = unsafeWindow.document.querySelectorAll('[role="article"]:not(.keepitkeep)');
Array.from(articles).forEach(a => {
try{
let div = a.querySelector('.userContent,[dir]>div');
if (/^\S*\s*\S*\s*\S*\s*(מחפש|מישהו)/.test(div.innerText)){
a.parentNode.removeChild(a);
} else {
a.classList.add('keepitkeep');
}
}catch(e){}
});
},2222);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment