Image Popup - usasexguide.nl

Display attached images in a lightbox and remove ads

  1. // ==UserScript==
  2. // @name Image Popup - usasexguide.nl
  3. // @namespace Violentmonkey Scripts
  4. // @match http://www.usasexguide.nl/forum/*
  5. // @match http://www.internationalsexguide.nl/forum/*
  6. // @grant none
  7. // @version 1.1.1
  8. // @author -
  9. // @description Display attached images in a lightbox and remove ads
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. let $head = document.querySelector('head')
  14. let $link = document.createElement('link')
  15. $link.rel = 'stylesheet'
  16. $link.href = '//cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css'
  17. let $script = document.createElement('script')
  18. $script.type = 'text/javascript'
  19. $head.append($link)
  20. $head.append($script)
  21. $script.onload = () => {
  22. jQuery('.attachments .postcontent a').addClass('glightbox')
  23. jQuery('.isgThumbnail.Attachment td>a').addClass('glightbox')
  24. jQuery('#attachmenttable td>a').addClass('glightbox')
  25. let lightbox = GLightbox({ height: 648 })
  26. console.log('done')
  27. }
  28. $script.src = '//cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js';
  29.  
  30. // Noise Removal
  31. (function() {
  32. var css = `
  33. .isg_background_border_banner,
  34. .isg_banner,
  35. #header a.logo-image,
  36. #uiISGAdFooter,
  37. #toplinks + div,
  38. #navtabs li:nth-child(6),
  39. #navtabs li:nth-child(7),
  40. #navtabs li:nth-child(8),
  41. #navtabs li:nth-child(9),
  42. .below_body,
  43. #isg_overlayDiv,
  44. #isg_shadowDiv,
  45. #isg_popupDiv,
  46. #thread_000
  47. {
  48. display: none;
  49. }
  50. #postlist .isg_background_border_banner.isg_Blog {
  51. display: block !important;
  52. }
  53. #pagination_top form.pagination {
  54. float: left !important;
  55. }
  56. .postrow {
  57. line-height: 1.3;
  58. }
  59. #postpagestats_above {
  60. float: none !important;
  61. }
  62. `;
  63. if (typeof GM_addStyle != "undefined") {
  64. GM_addStyle(css);
  65. } else if (typeof PRO_addStyle != "undefined") {
  66. PRO_addStyle(css);
  67. } else if (typeof addStyle != "undefined") {
  68. addStyle(css);
  69. } else {
  70. var node = document.createElement("style");
  71. node.type = "text/css";
  72. node.appendChild(document.createTextNode(css));
  73. var heads = document.getElementsByTagName("head");
  74. if (heads.length > 0) {
  75. heads[0].appendChild(node);
  76. } else {
  77. // no head yet, stick it whereever
  78. document.documentElement.appendChild(node);
  79. }
  80. }
  81.  
  82. // Kill the first-click pop-under
  83. window.initPu = () => {}
  84.  
  85. // Kill the new first-click pop-under - 2022-09-13
  86. setCookieISG('popundrisg', 24*365)
  87.  
  88. // Kill the isg_overlay popover - 2022-11-21
  89. setCookieISG('popupoverlayisg', 24*365)
  90. })();