-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstay_alive.js
1 lines (1 loc) · 2.02 KB
/
stay_alive.js
1
!function t(e=3){function n(t,e){var n=Math.ceil(t),o=Math.floor(e);return Math.floor(Math.random()*(o-n+1))+n}console.log("keepAlive"),setTimeout(function(){var o;document.evaluate("//div[@data-testid='guided_review_container']//table[@role='grid']//tr/td[@data-testid='guided_review_answer_option']",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength>0?function(){console.log("srt");var t=document.evaluate("//div[@data-testid='guided_review_container']//table[@role='grid']//tr/td[@data-testid='guided_review_answer_option']",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),e=Array.from(Array(t.snapshotLength-1).keys()),o=document.evaluate("//div[@data-testid='guided_review_container']//table[@role='grid']//td[contains(., 'Managed') or contains(., 'CRITICAL')]",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),a=document.evaluate("//div[@data-testid='simple_xui_dialog_footer']//a",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);if(a.snapshotLength>0)for(var i=0;i<a.snapshotLength;i++)a.snapshotItem(i).click();if(o.snapshotLength>0)t.snapshotItem(e[n(0,e.length-1)]).click();else{var l=n(1,3);for(i=0;i<l;i++)setTimeout(function(){var o=e[n(1,e.length-1)];e.splice(e.indexOf(o),1),t.snapshotItem(o).click()},n(4850,5900));t.snapshotItem(t.snapshotLength-1).click()}}():(console.log("bid"),setTimeout(function(){document.evaluate("//div[@data-uibase-classes=':intern:xui:tabbed-area:header']/div[@id[contains(., '!tab')] and @class[not(contains(., 'selected'))]]",document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(n(0,2)).click()},n(4850,5900)),setTimeout(function(){window.scroll({top:n(0,window.innerHeight),left:n(0,window.innerWidth),behavior:"smooth"})},n(4850,5900)),setTimeout(function(){window.scroll({top:n(0,window.innerHeight),behavior:"smooth"})},n(4850,5900))),--e?t(e):((o=document.evaluate("//div[@data-testid='guided_review_container']//button[text()='Reset']",document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)&&o.click(),t(3))},n(7e4,9e4))}();