Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const sleep = (milliseconds) => {
- return new Promise(resolve => setTimeout(resolve, milliseconds))
- }
- ts = () => {
- return Math.round((new Date()).getTime() / 1000);
- }
- async function a() {
- let items = [];
- document.querySelectorAll('.SpreadsheetTaskList .ProjectSpreadsheetGridRow-subtaskToggleButton').forEach(async function(item) {
- items.push(item);
- });
- for(var i=0; i<items.length; i++) {
- items[i].click();
- await sleep(600);
- }
- }
- let u = window.location.href;
- async function b() {
- a();
- while(1) {
- let u1 = window.location.href;
- if (u1 != u && u1.indexOf('list') != -1) {
- a();
- u = u1;
- }
- await sleep(1000);
- }
- } b();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement