Advertisement
xpppppppaicyber

taskkkkkkkkkkkkkkkkkkk

Jul 13th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async function taskXCPX(){
  2.           // Select all the div elements inside the specified container
  3.           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");
  4.  
  5.           elements.forEach((element, index) => {
  6.               // Get the inner text of the selected element
  7.               let innerText = element.innerText;
  8.  
  9.               // Split the inner text into an array based on newline characters
  10.               let textArray = innerText.split('\n');
  11.  
  12.               // Remove the first and last elements from the array
  13.               textArray.shift();
  14.               textArray.pop();
  15.  
  16.               // Select the first image inside the specified container if it exists
  17.               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");
  18.  
  19.               rIcon = rewardIcon.src;
  20.  
  21.               // Select the second image inside the specified container if it exists
  22.               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");
  23.  
  24.               tIcon = taskIcon.src;
  25.  
  26.               rewardTask = textArray[0];
  27.               tierTask = 'T' + textArray[1];
  28.               qtyTask = textArray[2];
  29.               nameTask = textArray[3];
  30.  
  31.               // Log the modified array to the console
  32.               console.log(`${rewardTask} | ${tierTask} | ${qtyTask} | ${nameTask} | ${rIcon} | ${tIcon}`);
  33.           });
  34.  
  35.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement