Size
2.9 KB
Version
1.0.1
Created
Apr 19, 2026
Updated
6 days ago
A new extension
1// ==UserScript==
2// @name Work.ink Auto-Continue
3// @description A new extension
4// @version 1.0.1
5// @match https://*.work.ink/*
6// @icon https://work.ink/favicon.png
7// ==/UserScript==
8(function() {
9 'use strict';
10
11 // Function to find and click the proceed button
12 function autoClickProceedButton() {
13 console.log('[Work.ink Auto-Continue] Looking for proceed button...');
14
15 // Find the proceed button using multiple selectors for reliability
16 const proceedButton = document.querySelector('.accessBtn') ||
17 document.querySelector('div.button.large') ||
18 document.querySelector('[class*="accessBtn"]') ||
19 document.querySelector('[class*="proceed"]') ||
20 Array.from(document.querySelectorAll('div.button')).find(btn => btn.textContent.includes('Proceed'));
21
22 if (proceedButton) {
23 console.log('[Work.ink Auto-Continue] Found proceed button, clicking...');
24 proceedButton.click();
25 return true;
26 }
27
28 console.log('[Work.ink Auto-Continue] Proceed button not found yet');
29 return false;
30 }
31
32 // Function to wait for the button to appear
33 function waitForButton() {
34 let attempts = 0;
35 const maxAttempts = 20; // Try for up to 10 seconds (20 * 500ms)
36
37 const checkInterval = setInterval(() => {
38 attempts++;
39
40 if (autoClickProceedButton()) {
41 clearInterval(checkInterval);
42 console.log('[Work.ink Auto-Continue] Successfully clicked proceed button');
43 } else if (attempts >= maxAttempts) {
44 clearInterval(checkInterval);
45 console.log('[Work.ink Auto-Continue] Could not find proceed button after maximum attempts');
46 }
47 }, 500);
48 }
49
50 // Start the automation when the page is ready
51 if (document.readyState === 'loading') {
52 document.addEventListener('DOMContentLoaded', waitForButton);
53 } else {
54 // DOM is already ready
55 waitForButton();
56 }
57
58 // Also observe for dynamic content changes
59 const observer = new MutationObserver((mutations) => {
60 // Debounce the observer callback
61 clearTimeout(window.workInkObserverTimeout);
62 window.workInkObserverTimeout = setTimeout(() => {
63 autoClickProceedButton();
64 }, 100);
65 });
66
67 // Start observing when the body is available
68 if (document.body) {
69 observer.observe(document.body, {
70 childList: true,
71 subtree: true
72 });
73 } else {
74 document.addEventListener('DOMContentLoaded', () => {
75 observer.observe(document.body, {
76 childList: true,
77 subtree: true
78 });
79 });
80 }
81
82 console.log('[Work.ink Auto-Continue] Extension loaded');
83})();