Sleazy Fork is available in English.

Pornolab image preview

Lets you preview torrents first image by showing on hover on the tracker listing

  1. // ==UserScript==
  2. // @name Pornolab image preview
  3. // @description Lets you preview torrents first image by showing on hover on the tracker listing
  4. // @namespace https://pornolab.net/forum/index.php
  5. // @version 0.1
  6. // @description try to take over the world!
  7. // @author tobij12
  8. // @match https://pornolab.net/forum/tracker.php*
  9. // @require https://cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js
  10. // @grant GM_xmlhttpRequest
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. let links = window.document.querySelectorAll('.med .tLink');
  16.  
  17. links.forEach((el) => {
  18. el.opened = false
  19. el.onmouseenter = function() {
  20. el.opened = true
  21.  
  22. axios.get(el.href).then(function(res) {
  23. if (el.opened !== true) {
  24. return ;
  25. }
  26. let div = document.createElement('div');
  27. div.innerHTML = res.data;
  28. let source = div.querySelector('var.postImg').title;
  29. let img = document.createElement('img');
  30.  
  31. img.src = source;
  32. img.classList.add('appendedHoverIMg');
  33. img.style = 'position: absolute; left: 350px; margin-top: 25px; width: auto; height: 700px';
  34.  
  35. el.appendChild(img);
  36. el.style.textDecoration = 'underline';
  37. });
  38. };
  39.  
  40. el.onmouseout = function() {
  41. el.opened = false
  42. const node = el.querySelector('.appendedHoverIMg');
  43. if (node !== null) {
  44. node.remove();
  45. }
  46. }
  47. });
  48. })();