Created
October 11, 2017 08:53
-
-
Save DennisdeBest/861ddb564bd28d253c49cba02bd7b2a8 to your computer and use it in GitHub Desktop.
GreaseMonkey script to clean logic-immo.com and remove the scam ads
This file contains hidden or 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 LogicImmo | |
// @namespace hide stuff | |
// @description Hide scams | |
// @include http://www.logic-immo.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
//Remove useless stuff | |
document.querySelector('.afs-bottom-section-wrapper').remove(); | |
document.querySelector('.right-pub').remove(); | |
document.querySelector('footer').remove(); | |
document.querySelector('.footer-social-section').remove(); | |
document.querySelector('.offer-list-row').style.width = "100%"; | |
//Hide header (can't remove it as it contains scripts needed to load the page) | |
document.querySelector('header').style.display = "none"; | |
//Loop through all available apartments and remove the scams | |
document.querySelectorAll('[itemtype="http://schema.org/ApartmentComplex"]').forEach(function(item,index) { | |
var agency = item.querySelector('.offer-agency-name p').innerHTML; | |
if(agency === "DLT" || agency === "APL LOCATION"){ | |
item.remove(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment