Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

When will it be possible to sort the offers according to the time they were posted?

k9bangerk9banger Member
edited November 2024 in General

The offers page has now become totally nonsensical, with suppliers offering double bandwidth or whatever for replying in the thread just to ensure the offering stays at the top of the listings.

When is this going to change, and isn't it unfair to vendors who refuse to engage in these shenanigans?

Comments

  • its pretty fucking annoying as a guy trying to check offers too.

  • SilvengaSilvenga Member
    edited November 2024
  • I use this userscript

    // ==UserScript==
    // @name         LET | Sort Threads
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        https://lowendtalk.com/*
    // @match        https://www.lowendtalk.com/*
    // @icon         https://icons.duckduckgo.com/ip2/lowendtalk.com.ico
    // @grant        GM_xmlhttpRequest
    // @grant        GM_getValue
    // @grant        GM_setValue
    // ==/UserScript==
    
    (async () => {
        'use strict';
    
        function sleep(ms) {
            return new Promise(resolve => setTimeout(resolve, ms));
        }
    
        function addDate(div, dateStr) {
            function getRelativeTime(originalDate) {
                const currentDate = new Date();
                const timeDifference = Math.floor((currentDate - originalDate) / 1000);
    
                if (timeDifference < 60) {
                    return `${timeDifference} sec${timeDifference === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 3600) {
                    const minutes = Math.floor(timeDifference / 60);
                    return `${minutes} min${minutes === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 86400) {
                    const hours = Math.floor(timeDifference / 3600);
                    return `${hours} hour${hours === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 2592000) {
                    const days = Math.floor(timeDifference / 86400);
                    return `${days} day${days === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 31536000) {
                    const months = Math.floor(timeDifference / 2592000);
                    return `${months} month${months === 1 ? '' : 's'} ago`;
                } else {
                    const years = Math.floor(timeDifference / 31536000);
                    return `${years} year${years === 1 ? '' : 's'} ago`;
                }
            }
    
            const originalDate = new Date(`${dateStr}Z`.replace(' ', 'T'));
    
            const spanElement = document.createElement('span');
            spanElement.style.fontSize = 'x-small';
            spanElement.textContent = getRelativeTime(originalDate);
            div.insertBefore(spanElement, div.firstChild);
        }
    
    
        const titleDivs = document.querySelectorAll('div.Title[role=heading]');
    
        const isFirstPage = (() => {
            const path = location.pathname;
            if (path === "/") return true;
            const matched = path.match(/^\/(?:discussions|categories\/[^/]+)\/p(\d+)/);
            if (matched) {
                const num = parseInt(matched[1]);
                return num <= 1;
            }
            return true;
        })();
    
        let gotFeedData = false;
    
        for (const div of titleDivs) {
            const a = div.querySelector('a');
    
            if (!a) return;
    
            const num = a.href.split('/')[4];
            let savedData = await GM.getValue(num);
    
            if (savedData) {
                addDate(div, savedData);
                continue;
            }
    
            if (isFirstPage && !gotFeedData) {
                gotFeedData = true;
                const rssLink = document.querySelector('link[type="application/rss+xml"]');
                const rssUrl = rssLink ? rssLink.href : null;
                const response = await fetch(rssUrl);
                const xmlText = await response.text();
    
                const parser = new DOMParser();
                const xmlDoc = parser.parseFromString(xmlText, 'application/xml');
    
                const itemNodes = xmlDoc.querySelectorAll('item');
                for (const itemNode of itemNodes) {
                    const guid = itemNode.querySelector('guid').textContent;
                    const pubDate = itemNode.querySelector('pubDate').textContent;
    
                    const postId = guid.split('@')[0];
                    if (await GM.getValue(postId)) {
                        continue
                    }
                    await GM.setValue(postId, new Date(pubDate).toISOString().split('.')[0].replace('T', ' '));
                }
            }
    
            savedData = await GM.getValue(num);
    
            if (savedData) {
                addDate(div, savedData);
                continue;
            }
    
            GM_xmlhttpRequest({
                method: "GET",
                url: a.href.replace('#latest', '/p1'),
                headers: {
                },
                onload: async function (response) {
                    const matchedJson = response.responseText.match(/type="application\/ld\+json">(.+?)</);
                    if (matchedJson) {
                        const obj = JSON.parse(matchedJson[1]);
                        await GM.setValue(num, obj.dateCreated);
                        addDate(div, obj.dateCreated);
                    }
                },
                onerror: function (error) {
                    console.error(error);
                }
            });
            await sleep(700);
        }
    
        $('ul.DataList.Discussions').each(function () {
            $(this).html(
                $(this).find('li.ItemDiscussion').sort(function (a, b) {
                    const read = $(a).hasClass('Read') * 1 - $(b).hasClass('Read') * 1;
                    if (read) return read;
    
                    return String($(b).attr('id')).replace(/\D/g, '') - String($(a).attr('id')).replace(/\D/g, '');
                })
            );
        })
    })();
    
    Thanked by 2kkrajk DediRock
  • I added this into my RSS app and it shows "error since 2 months ago" and the last feed is 20 Sep something...

  • @JerryHou said:

    I added this into my RSS app and it shows "error since 2 months ago" and the last feed is 20 Sep something...

    https://lowendtalk.com/discussion/198966/let-rss-feed-not-working
    The problem is known but should not be solved :'(

  • @PaiJi said:

    @JerryHou said:

    I added this into my RSS app and it shows "error since 2 months ago" and the last feed is 20 Sep something...

    https://lowendtalk.com/discussion/198966/let-rss-feed-not-working
    The problem is known but should not be solved :'(

    RSS is dead...time to move on... :P

  • @JerryHou said:

    @PaiJi said:

    @JerryHou said:

    I added this into my RSS app and it shows "error since 2 months ago" and the last feed is 20 Sep something...

    https://lowendtalk.com/discussion/198966/let-rss-feed-not-working
    The problem is known but should not be solved :'(

    RSS is dead...time to move on... :P

    Mine is still alive
    https://i.ibb.co/9wtQfPn/IMG-0850.png

  • kevindskevinds Member, LIR

    @k9banger said:
    suppliers offering double bandwidth or whatever for replying in the thread just to

    There was a discussion thread about changing the rules to 'fix' this but I have no update other than new rules being discussed with the needed team..

    The discussion, the last I saw it, was just being bumped to keep it on page 1, nothing was being added besides the bumps.

  • @kevinds said:
    The discussion, the last I saw it, was just being bumped to keep it on page 1, nothing was being added besides the bumps.

    lol

  • @JerryHou said:

    I added this into my RSS app and it shows "error since 2 months ago" and the last feed is 20 Sep something...

    Welcome to our luxury Bot club!
    You now have official approval from cloudflare.

    @JerryHou said:
    RSS is dead...time to move on... :P

    RSS will outlive your grandchildren B)

    At least to make them see the same error on LET and bump the thread below :)

    @kevinds said:
    The discussion, the last I saw it, was just being bumped to keep it on page 1, nothing was being added besides the bumps.

    Thanked by 1JerryHou
  • k9bangerk9banger Member
    edited November 2024

    @Silvenga said:

    Thanks. I have tried it and it seems to be working okay.

  • @tototo said:
    I use this userscript
    ```
    // ==UserScript==
    // @name LET | Sort Threads
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author You
    // @match https://lowendtalk.com/*
    // @match https://www.lowendtalk.com/*
    // @icon https://icons.duckduckgo.com/ip2/lowendtalk.com.ico
    // @grant GM_xmlhttpRequest
    // @grant GM_getValue
    // @grant GM_setValue
    // ==/UserScript==

    Which addon do you use as a userscript manager?

    I get this message when I set it up in Styluls.

    I've become rather rusty in this area.

  • @k9banger said:

    Which addon do you use as a userscript manager?

    I get this message when I set it up in Styluls.

    I've become rather rusty in this area.

    https://www.tampermonkey.net/

    Thanked by 1k9banger
  • @tototo said:
    I use this userscript

    // ==UserScript==
    // @name         LET | Sort Threads
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        https://lowendtalk.com/*
    // @match        https://www.lowendtalk.com/*
    // @icon         https://icons.duckduckgo.com/ip2/lowendtalk.com.ico
    // @grant        GM_xmlhttpRequest
    // @grant        GM_getValue
    // @grant        GM_setValue
    // ==/UserScript==
    
    (async () => {
        'use strict';
    
        function sleep(ms) {
            return new Promise(resolve => setTimeout(resolve, ms));
        }
    
        function addDate(div, dateStr) {
            function getRelativeTime(originalDate) {
                const currentDate = new Date();
                const timeDifference = Math.floor((currentDate - originalDate) / 1000);
    
                if (timeDifference < 60) {
                    return `${timeDifference} sec${timeDifference === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 3600) {
                    const minutes = Math.floor(timeDifference / 60);
                    return `${minutes} min${minutes === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 86400) {
                    const hours = Math.floor(timeDifference / 3600);
                    return `${hours} hour${hours === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 2592000) {
                    const days = Math.floor(timeDifference / 86400);
                    return `${days} day${days === 1 ? '' : 's'} ago`;
                } else if (timeDifference < 31536000) {
                    const months = Math.floor(timeDifference / 2592000);
                    return `${months} month${months === 1 ? '' : 's'} ago`;
                } else {
                    const years = Math.floor(timeDifference / 31536000);
                    return `${years} year${years === 1 ? '' : 's'} ago`;
                }
            }
    
            const originalDate = new Date(`${dateStr}Z`.replace(' ', 'T'));
    
            const spanElement = document.createElement('span');
            spanElement.style.fontSize = 'x-small';
            spanElement.textContent = getRelativeTime(originalDate);
            div.insertBefore(spanElement, div.firstChild);
        }
    
    
        const titleDivs = document.querySelectorAll('div.Title[role=heading]');
    
        const isFirstPage = (() => {
            const path = location.pathname;
            if (path === "/") return true;
            const matched = path.match(/^\/(?:discussions|categories\/[^/]+)\/p(\d+)/);
            if (matched) {
                const num = parseInt(matched[1]);
                return num <= 1;
            }
            return true;
        })();
    
        let gotFeedData = false;
    
        for (const div of titleDivs) {
            const a = div.querySelector('a');
    
            if (!a) return;
    
            const num = a.href.split('/')[4];
            let savedData = await GM.getValue(num);
    
            if (savedData) {
                addDate(div, savedData);
                continue;
            }
    
            if (isFirstPage && !gotFeedData) {
                gotFeedData = true;
                const rssLink = document.querySelector('link[type="application/rss+xml"]');
                const rssUrl = rssLink ? rssLink.href : null;
                const response = await fetch(rssUrl);
                const xmlText = await response.text();
    
                const parser = new DOMParser();
                const xmlDoc = parser.parseFromString(xmlText, 'application/xml');
    
                const itemNodes = xmlDoc.querySelectorAll('item');
                for (const itemNode of itemNodes) {
                    const guid = itemNode.querySelector('guid').textContent;
                    const pubDate = itemNode.querySelector('pubDate').textContent;
    
                    const postId = guid.split('@')[0];
                    if (await GM.getValue(postId)) {
                        continue
                    }
                    await GM.setValue(postId, new Date(pubDate).toISOString().split('.')[0].replace('T', ' '));
                }
            }
    
            savedData = await GM.getValue(num);
    
            if (savedData) {
                addDate(div, savedData);
                continue;
            }
    
            GM_xmlhttpRequest({
                method: "GET",
                url: a.href.replace('#latest', '/p1'),
                headers: {
                },
                onload: async function (response) {
                    const matchedJson = response.responseText.match(/type="application\/ld\+json">(.+?)</);
                    if (matchedJson) {
                        const obj = JSON.parse(matchedJson[1]);
                        await GM.setValue(num, obj.dateCreated);
                        addDate(div, obj.dateCreated);
                    }
                },
                onerror: function (error) {
                    console.error(error);
                }
            });
            await sleep(700);
        }
    
        $('ul.DataList.Discussions').each(function () {
            $(this).html(
                $(this).find('li.ItemDiscussion').sort(function (a, b) {
                    const read = $(a).hasClass('Read') * 1 - $(b).hasClass('Read') * 1;
                    if (read) return read;
    
                    return String($(b).attr('id')).replace(/\D/g, '') - String($(a).attr('id')).replace(/\D/g, '');
                })
            );
        })
    })();
    

    What does this script do?

  • kevindskevinds Member, LIR

    @shashwat001 said:
    What does this script do?

    Sends your account credentials to @tototo :)

    Thanked by 1tototo
  • @shashwat001 said:

    What does this script do?

    All threads will be sorted in the order they were created. This means that even if there’s a reply to an old post, the thread will not pop to the top.

    Thanked by 1DediRock
  • DediRockDediRock Member, Patron Provider

    @tototo said:

    All threads will be sorted in the order they were created. This means that even if there’s a reply to an old post, the thread will not pop to the top.

    Thanks for the tip! B)

Sign In or Register to comment.