Last active
May 9, 2020 16:24
-
-
Save oriadam/034f4926e35f993ef299740dd3fe6559 to your computer and use it in GitHub Desktop.
tremp tel hai user script
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
// ==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