Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Daft House Prices
// ==UserScript==
// @name Daft House Prices
// @namespace http://ideasasylum.com
// @version 0.2
// @description Replace Daft house prices with CB deposit and income limits
// @author Jamie Lawrence @ideasasylum
// @match https://www.daft.ie/*
// @grant none
// ==/UserScript==
$('.PropertyInformationCommonStyles__costAmountCopy').each(function(index, element){
var price_string = $(element).text();
var price = price_string.replace(/\D/g,'');
var house_income_required = Math.floor(price / 3.5);
var house_deposit = Math.floor(price * 0.1);
if(price > 222000){
house_deposit += Math.floor((price - 222000) * 0.2);
}
$(element).html("<s>"+price_string+"</s> Deposit of €"+house_deposit+" and €"+house_income_required+" income required");
});
@ideasasylum
Copy link
Author

ideasasylum commented Feb 6, 2015

Example:

Screen Shot on 2019-07-01 at 12-06-31

@ideasasylum
Copy link
Author

ideasasylum commented Feb 6, 2015

The script just converts the house prices on https://www.daft.ie into the deposit and income requirements specified by the central bank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment