Last active
April 11, 2026 01:14
-
-
Save olee/b9a1d576fc2b02b553834d8fc616bb34 to your computer and use it in GitHub Desktop.
Blue Archive My Office Userscript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Blue Archive My Office | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2026-04-11 | |
| // @description Automatically handles Blue Archive My Office page | |
| // @author n/a | |
| // @match https://bluearchive.nexon.com/user/myoffice* | |
| // @match https://signin.nexon.com/pages/account/auth-selector | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=nexon.com | |
| // @updateURL https://gist.githubusercontent.com/olee/b9a1d576fc2b02b553834d8fc616bb34/raw/ba-my-office.js | |
| // @downloadURL https://gist.githubusercontent.com/olee/b9a1d576fc2b02b553834d8fc616bb34/raw/ba-my-office.js | |
| // @grant none | |
| // ==/UserScript== | |
| 'use strict'; | |
| function delay(delay) { | |
| return new Promise(r => setTimeout(r, delay)); | |
| } | |
| (async function () { | |
| if (window.location.pathname === '/user/myoffice') { | |
| window.cookieStore.set('BA_myOffice_FirstLogin', 'true'); | |
| await delay(3_000); | |
| const loginBtn = document.querySelector('#user[data-login="false"] button'); | |
| if (loginBtn) { | |
| loginBtn.click(); | |
| return; | |
| } | |
| // go to tasks | |
| document.querySelector('#nav ul li span[data-txt="Tasks"]')?.click(); | |
| await delay(2_000); | |
| // Click claim buttons | |
| const claimButtons = document.querySelectorAll('._contents button[data-state="opened"]'); | |
| for (const btn of claimButtons) { | |
| btn.click(); | |
| await delay(2_000); | |
| document.querySelector('#modal button.-close')?.click(); | |
| } | |
| } else if (window.location.pathname === '/pages/account/auth-selector') { | |
| await delay(1000); | |
| document.querySelector('.login-by-nexon button')?.click(); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment