A Chrome extension that automates time entry for Jobcan time tracking system. This extension helps streamline your daily time logging by automatically filling in start times, end times, and break durations with either preset values or randomized realistic times.
- Automatic Time Entry: Fills in empty time fields on Jobcan automatically
- Fixed Time Mode: Set specific start/end times and break duration
- Random Time Mode: Generates realistic random times within configured ranges
- Start time: 08:30 - 09:00 (30-minute range)
- End time: 18:00 - 18:30 (60-minute range)
- Auto-Submit: Optionally auto-click the submit button after filling times
- Visual Feedback: Highlights filled fields with aqua background color
- Weekend Skip: Automatically skips Saturday (T7) and Sunday (CN) entries
- Multi-language Support: English and Vietnamese interface
-
Clone this repository:
git clone <repository-url> cd jobcan-extension
-
Install dependencies:
yarn install
-
Build the extension:
yarn dev
-
Load the extension in Chrome:
- Open Chrome and go to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
dist
folder
- Open Chrome and go to
If you have a dist.zip
file:
- Extract the zip file
- Load the extracted folder as an unpacked extension in Chrome
-
Open the Extension: Click the extension icon in your Chrome toolbar
-
Configure Settings:
- Start Time: Set your preferred start time (disabled in random mode)
- End Time: Set your preferred end time (disabled in random mode)
- Break Time: Set your break duration
- Auto click send request: Enable to automatically submit entries
- Random time: Enable for randomized time generation
-
Navigate to Jobcan: Go to your Jobcan time entry page
-
Apply Settings: Click the "Triển" button in the extension popup
-
Results: The extension will:
- Fill empty time fields with your configured or random times
- Highlight filled fields in aqua color
- Optionally submit the entries if auto-submit is enabled
- Node.js (v14 or higher)
- Yarn package manager
- Chrome browser for testing
jobcan-extension/
├── src/
│ ├── contentscript.ts # Main logic for filling time entries
│ └── popup-page/
│ ├── popup.html # Extension popup HTML
│ └── popup.tsx # React popup component
├── public/
│ └── manifest.json # Extension manifest
├── dist/ # Built extension files
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── webpack.config.js # Webpack build configuration
# Install dependencies
yarn install
# Build for development
yarn dev
# The built extension will be in the dist/ folder
- TypeScript: Main programming language
- React: Popup interface framework
- Styled Components: CSS-in-JS styling
- Webpack: Build tooling
- Chrome Extension API: Browser integration
When "Random time" is enabled:
- Start Time: Generates times between 08:30 and 09:00
- Format:
08:${30 + Math.floor(Math.random() * 31)}
- Format:
- End Time: Generates times between 17:30 and 18:30
- Uses smart logic to handle hour transitions
- Ensures proper zero-padding for minutes
The extension:
- Listens for messages from the popup
- Finds all day entries with class
align-middle border-left-0
- Skips weekend entries (containing 'T7' or 'CN')
- Locates time input fields by ID:
#editable_start
,#editable_end
,#editable_rest
- Fills empty fields with configured or random values
- Optionally clicks submit buttons with class
btn jbc-btn-secondary
The extension requires:
<all_urls>
: To work on Jobcan websitesactiveTab
: To interact with the current tab
You can modify the time ranges by editing src/contentscript.ts
:
// Start time range (currently 08:30 - 09:00)
;`08:${30 + Math.floor(Math.random() * 31)}`
// End time range (currently 17:30 - 18:30)
// See the IIFE in the code for the full logic
- The extension only fills empty time fields, preserving existing entries
- Weekend entries are automatically skipped
- Visual feedback (aqua highlighting) helps identify auto-filled fields
- The extension works universally on all URLs but is designed for Jobcan
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes
- Build and test the extension
- Commit your changes:
git commit -am 'Add feature'
- Push to the branch:
git push origin feature-name
- Submit a Pull Request
This project is licensed under the ISC License.
Disclaimer: This extension is designed to assist with time tracking workflows. Please ensure compliance with your organization's policies regarding automated time entry tools.