image view fit-height furaffinity.net

make the submission image fit the height of the screen

// ==UserScript==
// @name        image view fit-height furaffinity.net
// @namespace   Violentmonkey Scripts
// @match       https://www.furaffinity.net/view*
// @grant       none
// @version     1.1.1
// @author      justrunmyscripts
// @license     MIT
// @description make the submission image fit the height of the screen
// ==/UserScript==
const element = document.querySelector('#submissionImg');
element.setAttribute('style', `
  max-height: calc(100vh - 110px);
`);

// NOTE: while this _does_ technically remove an ad
// which shouldn't be the responsibility of this script
// (get an ad blocker instead)
// this ad seems to not be used most of the time
// and in its unused state it still takes up vertial
// viewport space, pushing the main submission down...
const ad_el = document.querySelector('.leaderboardAd');
ad_el.remove();