The Nude Improved

Declutters and hides ads, removes tracking from external links

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        The Nude Improved
// @namespace   https://gist.github.com/angrytoenail/bef6d23f43430f857e5c94cfc241954e
// @description Declutters and hides ads, removes tracking from external links
// @author      Angry Toenail
// @match       https://www.thenude.com/*
// @match       https://www.thenude.eu/*
// @match       http://staging.thenude.com/*
// @match       http://staging.thenude.eu/*
// @version     0.1
// @license     MIT
// @icon        https://www.google.com/s2/favicons?sz=64&domain=thenude.com
// @grant       GM.addStyle
// ==/UserScript==

// css selectors for elements to hide
const hideSelectors = [
  ".cams-footer-container ",
  ".metart-trial", // floating button
  "#home_page_top", // homepage banner
  "#home-page>h3.text-center", // amateur community link
  "#home-page>h2:has(+iframe)", // live girls chat now
  "#central-col>h1", // live chat in footer
  ":is(#home-page,#central-col)>iframe", // ad banner
  "#Carousel>p[style]", // live cam girls ad
  "#main-navbar>ul.nav>:not(li.dropdown)", // promotional links in navbar
  `body>div[style*="z-index"]`, // full-screen popups
  "#view-history", // floating button
  ":is(#recommendations, .row>div>.text-center)", // member recommended models
  ".row.essentials+.row", // add web link
  "hr+.row:has(.twitter-timeline)", // twitter feed
  ".sidebox-content:has(>a>img)", // featured models in sidebar
  // ".sidebox:is(.latest-updates,.top-ten,.top-ten-covers)", // latest updates
];

GM.addStyle(`
  ${hideSelectors.join(", ")} { display: none !important; }
  .sidebox-title {
    background-image: linear-gradient(to right, transparent, #99734d 25%, #99734d 75%, transparent);
    color: black !important;
    padding: 0.5rem 0;
  }
  .sidebox:is(.top-ten,.top-ten-covers) {
    margin-bottom:2rem;
    >a.pasttop { font-size: 0.8em; padding-top: 0.5em; }
  }
`);

// clean affiliate tracking codes from external links
window.document
  .querySelectorAll('a:is([data-link_class="model_pages"], [data-link_class="web_links"])')
  .forEach((a) => {
    const url = a.href
      .replace(/access\./i, "www.")
      .replace(/.*&html=(.*)$/i, "$1")
      .replace(/\/track\/[^\/]+/i, "")
      .replace(/imctrck.*bn=2528&url=(.*)$/i, "clubsweethearts.com$1")
      .replace(/(.*)(\?(ats|aff|nats|coupon|link_id)=.*)$/i, "$1")
      .replace(/.*u=(http.*)$/i, "$1");
    console.log(`✀ ${url}`);
    a.href = decodeURIComponent(url);
  });