Sleazy Fork is available in English.

FetLife: save/copy images

Makes it possible to save/copy images on FetLife

  1. // ==UserScript==
  2. // @name FetLife: save/copy images
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Makes it possible to save/copy images on FetLife
  6. // @author You
  7. // @match https://fetlife.com/users/*/pictures/*
  8. // @icon https://fetlife.com/favicons/favicon.ico
  9. // @license GPL-3.0
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const observer = new MutationObserver((mutationsList) => {
  17. const filtered =
  18. mutationsList
  19. .filter(x =>
  20. x.addedNodes &&
  21. x.addedNodes[0] &&
  22. x.addedNodes[0].classList &&
  23. x.addedNodes[0].classList.contains("mx-auto"))
  24. .map(x => x.addedNodes[0]);
  25.  
  26. if (filtered.length > 1) {
  27. const parent = filtered[1].querySelector(".overflow-hidden");
  28. const img = parent.querySelector("img.mx-auto");
  29. const nav = parent.querySelector("nav.absolute");
  30.  
  31. img.style = "pointer-events: auto !important";
  32.  
  33. while (nav.childNodes.length > 0) {
  34. nav.childNodes[0].style.width = "20%";
  35. parent.appendChild(nav.childNodes[0]);
  36. }
  37.  
  38. nav.remove();
  39.  
  40. observer.disconnect();
  41. }
  42. });
  43.  
  44. observer.observe(document.documentElement, {
  45. childList: true,
  46. subtree: true,
  47. });
  48.  
  49. })();