尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Features extension script for eRepublik.com.
Players who support this project will have their avatars decorated with an animated border:
| 1M+ in currency | 3M+ in currency | 5M+ in currency |
|---|---|---|
| Choose your custom border |
If you donate 5M+ in total you can write me a message specifying which border you choose.
Basic feature inherited from Zordacz's old version.
The script is built with Vite and
vite-plugin-monkey.
The userscript header is generated from vite.config.ts and the version from package.json.
Run npm ci to install dependencies.
npm start to start the development server on port 8124.[DEV] eRepublik Stuff++ Unlocked.
You only need to do this once.The DEV script loads the code straight from the development server, so changes show up after refreshing the eRepublik page.
Run npm run build. The userscript is written to dist/index.user.js
and copied to src/index.user.js, which is the URL existing installations update from.
npm run typecheck - TypeScriptnpm run lint - ESLintnpm test - Vitest unit testsnpm run format:check - Prettier (npm run format to fix)All of them run in CI on every pull request.
The commit that reformatted the codebase with Prettier is listed in .git-blame-ignore-revs.
To skip it in git blame, run git config blame.ignoreRevsFile .git-blame-ignore-revs.
Run the "Release Version" workflow on GitHub. It bumps the minor version,
adds the commits since the last Bump X.Y commit to CHANGELOG.md,
builds the userscript and opens a pull request with the result.
Each feature in src/features is created with createFeature() and listed in src/index.tsx.
Features run on page load and again whenever the URL changes (changes of the hash alone don't count).
Before running a feature again, the runner cleans up everything its previous run registered
on the FeatureContext passed to execute:
mount(element, anchor, options) renders React next to or inside an element,signal removes listeners added with addEventListener(type, listener, { signal }),onCleanup(callback) undoes anything else, e.g. a class added to body.State that must outlive a rerun, like a running auto traveller, lives outside the components.
A feature that players can turn off gets a toggle in SETTINGS in src/settings/stuff-settings.ts,
which the settings panel lists. Toggles are kept in localStorage.stuff, where true means off,
like the legacy script stored them. A feature that acts without a click, like eating food,
is marked isAutomatic: it stays off until a player turns it on.
To react to the game's own requests, use onXhrLoad(urlPattern, listener, { signal }).
MapeRepublik replaces the global Map with its own object, which breaks React and other libraries.
vite.config.ts takes the original Map from a hidden iframe and makes all bundled code use it:
the production bundle is wrapped in a function with a Map parameter,
and in development every module gets a module-scoped Map constant.