Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function taskXCPX(){
- // Select all the div elements inside the specified container
- let elements = document.querySelectorAll("#__next > div > div.room-layout > div > div.Store_storeDialog__K3NJB > div.Store_box__j6_U4.Store_modal-box-container__S2ExC.commons_uikit__Nmsxg.commons_frame__f5hXE.commons_purpleinset___KfX2 > div > div.Store_store-tabs-wrapper__OfH4C > div > div > div.Store_items-content__FtMRE > div");
- elements.forEach((element, index) => {
- // Get the inner text of the selected element
- let innerText = element.innerText;
- // Split the inner text into an array based on newline characters
- let textArray = innerText.split('\n');
- // Remove the first and last elements from the array
- textArray.shift();
- textArray.pop();
- // Select the first image inside the specified container if it exists
- let rewardIcon = document.querySelector("#__next > div > div.room-layout > div > div.Store_storeDialog__K3NJB > div.Store_box__j6_U4.Store_modal-box-container__S2ExC.commons_uikit__Nmsxg.commons_frame__f5hXE.commons_purpleinset___KfX2 > div > div.Store_store-tabs-wrapper__OfH4C > div > div > div.Store_items-content__FtMRE > div:nth-child(6) > div > div > div.Store_card-header__FTHH8 > div:nth-child(2) > div > img");
- rIcon = rewardIcon.src;
- // Select the second image inside the specified container if it exists
- let taskIcon = document.querySelector("#__next > div > div.room-layout > div > div.Store_storeDialog__K3NJB > div.Store_box__j6_U4.Store_modal-box-container__S2ExC.commons_uikit__Nmsxg.commons_frame__f5hXE.commons_purpleinset___KfX2 > div > div.Store_store-tabs-wrapper__OfH4C > div > div > div.Store_items-content__FtMRE > div:nth-child(12) > div > div > div.Store_card-img-wrapper__hyk51 > img");
- tIcon = taskIcon.src;
- rewardTask = textArray[0];
- tierTask = 'T' + textArray[1];
- qtyTask = textArray[2];
- nameTask = textArray[3];
- // Log the modified array to the console
- console.log(`${rewardTask} | ${tierTask} | ${qtyTask} | ${nameTask} | ${rIcon} | ${tIcon}`);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement