Skip to content

Instantly share code, notes, and snippets.

@jasonmarlin
Created February 21, 2025 17:11
Show Gist options
  • Save jasonmarlin/22b2ed428884ddffd0da8e301d87e35c to your computer and use it in GitHub Desktop.
Save jasonmarlin/22b2ed428884ddffd0da8e301d87e35c to your computer and use it in GitHub Desktop.
Resize TripAdviser Maps
// ==UserScript==
// @name New script tripadvisor.com
// @namespace Violentmonkey Scripts
// @match https://www.tripadvisor.com/TripDetails-*
// @grant none
// @version 1.0
// @author -
// @description 2/21/2025, 11:37:07 AM
// ==/UserScript==
// get the section that contains the class the map eventually
const section = document.querySelector('main div:nth-of-type(2)');
// set the width of the section to 100%
section.style.width = '100%';
// change columns on map container parent
const mapContainer = document.querySelector('main div:nth-of-type(2)>div');
mapContainer.style.gridTemplateColumns = '1fr 3fr';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment