image view fit-height furaffinity.net

make the submission image fit the height of the screen

  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.2.0
  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 one ad still takes up a lot of vertial
  20. // viewport space, pushing the main submission down...
  21. const ad_el = document.querySelector('.leaderboardAd');
  22. ad_el.remove();
  23.  
  24. // try to preserve system message, but move it to unused part of page header
  25. // that way we free up even more vertial space.
  26. let system_message_element = document.querySelector('.news-block');
  27. let system_message = system_message_element.innerText;
  28. system_message_element.remove();
  29. let message_bar_desktop_element = document.querySelector('#ddmenu .message-bar-desktop');
  30. message_bar_desktop_element.innerText = system_message;
  31. message_bar_desktop_element.setAttribute('style', 'user-select: text;');
  32.  
  33. let header_element = document.querySelector('#header.has-adminmessage');
  34. header_element.removeClassName('has-adminmessage');
  35.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址