SubscribeStar Ellipsify69

Make the navigation easier.

Version vom 26.02.2024. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         SubscribeStar Ellipsify69
// @version      2024-02-16
// @description  Make the navigation easier.
// @author       ProtagNeptune
// @match        https://subscribestar.adult/*
// @match        https://www.subscribestar.com/*
// @exclude      https://subscribestar.adult/chats/*
// @exclude      https://subscribestar.adult/posts/*
// @exclude      https://www.subscribestar.com/chats/*
// @exclude      https://www.subscribestar.com/posts/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=subscribestar.adult
// @license      MIT
// @grant        none
// @namespace https://greasyfork.org/users/1267336
// ==/UserScript==

function ellipsify(str) {
    if (str.length > 69) {
        return str.substring(0, 69) + "...";
    } else {
        return str;
    }
}

function applyTruncation() {
    const trixElements = document.querySelectorAll('.trix-content');
    trixElements.forEach((element) => {
        element.textContent = ellipsify(element.textContent);
    });
}

// Call the function initially
applyTruncation();

// Repeat the function every three seconds
setInterval(applyTruncation, 3000); // 3000 milliseconds = 3 seconds