Greasemonkey Script to Prevent Smartsheet Emails From Scrolling Off the Screen

On March 23, 2017, Smartsheet deployed a software update that made its alert emails very difficult to use in Gmail. They added blank space to the updated table rows that pushes content far off the right side of the screen. The image below shows the difference. The email on top is what alert emails previously looked like in Gmail; the email on the bottom is how they appear now.

I asked Smartsheet to fix this problem on April 11th. They assure me that the development team knows about the problem but they can’t provide a timeline of when it will be fixed.

Until then, I’ve created a Greasemonkey script that makes the alert emails usable again. Greasemonkey is a browser add-on that lets you run scripts to modify a web page once it is downloaded to your browser. Install Greasemonkey for Firefox here or Tampermonkey for Chrome here. Then click the following link:

Install Userscript to Resize Smartsheet in Gmail

Reload your Gmail tab and the script should be active. This script works by checking that the text “” appears on the page and then removes the width attribute from all “td” elements (table cells) and changes the min-width property to zero.

If you have an improvement to the script, please let me know. If the link above doesn’t work, here is the full script:

// ==UserScript==
// @name        Resize Smartsheet in Gmail
// @author      John Steele, Auxiliary Teams Inc.
// @namespace
// @description Resizes Smartsheet email content to fit inside Gmail.
// @version     2017-07-02
// @include     /^https?://mail\.google\.com//
// @match*
// @match*
// @grant       none
// @require
// ==/UserScript==


    Copyright (C) 2017 John Steele and Auxiliary Teams Inc. All Rights Reserved. 
    This work is distributed under the W3C(R) Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



$.fn.shrinksmartsheetgmail = function(){
    if ($('div:contains("")').length > 0) {