Notes
![]() ![]() Notes - notes.io |
console.log("Script started: Downloading all paystubs...");
// Step 1: Expand the paystub list
let expandButton = document.querySelector(".ag-icon-tree-closed");
if (expandButton) {
expandButton.click();
console.log("Expanded paystub list...");
await new Promise(r => setTimeout(r, 3000)); // Wait for list to load
} else {
console.warn("Expand button not found!");
}
// Step 2: Get all "View Statement" buttons
let paystubButtons = document.querySelectorAll(".trinet-button-container");
if (paystubButtons.length === 0) {
console.warn("No paystub buttons found!");
return;
}
console.log(`Found ${paystubButtons.length} paystubs. Downloading now...`);
for (let i = 0; i < paystubButtons.length; i++) {
console.log(`Opening paystub ${i + 1}...`);
let button = paystubButtons[i];
button.click(); // Click "View Statement"
await new Promise(r => setTimeout(r, 5000)); // Wait for new tab to open
let newTab = window.open(); // Open a new tab
if (newTab) {
newTab.location.href = document.querySelector(".trinet-button-container").href;
console.log(`Opened new tab for paystub ${i + 1}.`);
} else {
console.warn("Failed to open new tab!");
}
await new Promise(r => setTimeout(r, 5000)); // Wait for page to load
// Step 3: Auto-download the PDF
let downloadButton = document.querySelector("button:contains('Download')"); // Adjust if necessary
if (downloadButton) {
downloadButton.click();
console.log(`Downloaded paystub ${i + 1}.`);
} else {
console.warn(`Download button not found for paystub ${i + 1}.`);
}
await new Promise(r => setTimeout(r, 3000)); // Wait before moving to the next
}
console.log("All paystubs downloaded successfully!");
})();
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team