image view fit-height furaffinity.net

make the submission image fit the height of the screen

当前为 2024-05-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name image view fit-height furaffinity.net
  3. // @namespace Violentmonkey Scripts
  4. // @match https://www.furaffinity.net/view*
  5. // @grant none
  6. // @version 1.1.1
  7. // @author justrunmyscripts
  8. // @license MIT
  9. // @description make the submission image fit the height of the screen
  10. // ==/UserScript==
  11. const element = document.querySelector('#submissionImg');
  12. element.setAttribute('style', `
  13. max-height: calc(100vh - 110px);
  14. `);
  15.  
  16. // NOTE: while this _does_ technically remove an ad
  17. // which shouldn't be the responsibility of this script
  18. // (get an ad blocker instead)
  19. // this ad seems to not be used most of the time
  20. // and in its unused state it still takes up vertial
  21. // viewport space, pushing the main submission down...
  22. const ad_el = document.querySelector('.leaderboardAd');
  23. ad_el.remove();