Skip to content

Instantly share code, notes, and snippets.

@caylan
Created September 24, 2020 19:20
Show Gist options
  • Save caylan/5fc3f17a8ea94b96746d1ed920bfe014 to your computer and use it in GitHub Desktop.
Save caylan/5fc3f17a8ea94b96746d1ed920bfe014 to your computer and use it in GitHub Desktop.
Userscript that makes the photos in the Redfin map view way bigger.
// ==UserScript==
// @name Redfin Widescreen Mode
// @namespace https://caylan.me
// @version 0.1
// @description Enlarge photos in map view for better visibility
// @author Caylan Lee
// @match https://www.redfin.com/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
var CARD_WIDTH = 700;
var CARD_HEIGHT = (CARD_WIDTH - 400) * 0.7 + 400
GM_addStyle(`
.interactive.v2 {
width: ${CARD_WIDTH}px
}
`);
GM_addStyle(`
#right-container, .rightContainerWidth {
width: ${CARD_WIDTH * 2 + 78}px
}
`)
GM_addStyle(`
.similarHomecardHeight.PhotosView .HomeCardContainer > *, .similarHomecardHeight.PhotosView .HomeCardContainer > .HomeCard > .v2 {
height: ${CARD_HEIGHT}px !important
}
`)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment