thread වලට like දදා ඉඳල අත රිදෙනවද?

rukshrulz

Well-known member
  • Jul 16, 2013
    9,928
    16,918
    113
    Colombo
    මේක අරන් consol එකේ ගහපන්.

    // Find all span elements with the class "clickable"
    var elements = document.querySelectorAll('span.reaction-text.js-reactionText');

    // Click on each element
    for (var i = 0; i < elements.length; i++) {
    elements.click();
    }


    මම coding දන්නෙ නෑ. ඕකත් ගහගත්තෙ chatgpt එකෙන්. 2nd page වලට ගිහින් like කරන්න හදන්න බැලුව හරියන්නෙ නෑ,
    ඇඩ්ඩිං අයිය ටිපර් පාක් කරයිද දන්නෑ හැබැයි.
     

    rukshrulz

    Well-known member
  • Jul 16, 2013
    9,928
    16,918
    113
    Colombo
    kotuwe podi.jpg
     

    Lupine Solus

    Well-known member
  • Dec 2, 2022
    734
    1,669
    93

    Hutto code danne nathuwa owa gahanne :growl:

    :lol: thowa hack wei ohoma hama labbama gahanna gihilla
    It's just some DOM manipulation code. Not a security hole or something. It just does what we do manually though a script. However, you might get banned from some sites due to the extremely fast reaction time of liking. 😅 So don't try this out.
     
    • Like
    Reactions: Cypress

    EKGuest

    Well-known member
  • Nov 16, 2022
    3,206
    5,704
    113
    However, you might get banned from some sites due to the extremely fast reaction time of liking.

    This is possible. One workaround is to add a delay between iterations within the for loop. (I don't know much JS there can be better methods)

    JavaScript:
    async function LikeAll() {
        var elements = document.querySelectorAll('span.reaction-text.js-reactionText');
        for (var i = 0; i < elements.length; i++) {
            // elements[i].click();
            await new Promise(r => setTimeout(r, 5000)); // Wait 5 seconds between likes
        }
    }
    LikeAll();