Skip to content

Instantly share code, notes, and snippets.

@mrlannigan
Created December 19, 2014 20:47
Show Gist options
  • Save mrlannigan/ef7ea0b3bef0af7ee037 to your computer and use it in GitHub Desktop.
Save mrlannigan/ef7ea0b3bef0af7ee037 to your computer and use it in GitHub Desktop.
// home value activation
(function () {
try {
var data = getApp().listing.data;
if (data.isHomeValue == true) {
activate();
}
} catch (e) {
// do nothing
}
})();
// for sale activation
(function () {
try {
var data = getApp().listing.data;
if (data.isHomeValue == false && data.isForeclosure == false && data.listing_status == 'FOR SALE') {
activate();
}
} catch (e) {
// do nothing
}
})();
// for rent activation
(function () {
try {
var data = getApp().listing.data;
if (data.isHomeValue == false && data.listing_status == 'FOR RENT' && data.isApartment == false) {
activate();
}
} catch (e) {
// do nothing
}
})();
// for rent apartment activation
(function () {
try {
var data = getApp().listing.data;
if (data.isHomeValue == false && data.listing_status == 'FOR RENT' && data.isApartment == true) {
activate();
}
} catch (e) {
// do nothing
}
})();
// foreclosure activation
(function () {
try {
var data = getApp().listing.data;
if (data.isHomeValue == false && data.listing_status == 'FOR SALE' && data.isForeclosure == true) {
activate();
}
} catch (e) {
// do nothing
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment