{"id":14989005,"url":"https://github.com/xu22web/tech-study-js","last_synced_at":"2025-04-05T03:10:55.689Z","repository":{"id":56005865,"uuid":"523354548","full_name":"Xu22Web/tech-study-js","owner":"Xu22Web","description":"学习强国油猴插件 40分/天 强国脚本 A flexible and light userscript for xuexiqiangguo based on tampermonkey plugin","archived":false,"fork":false,"pushed_at":"2023-07-16T09:00:00.000Z","size":7689,"stargazers_count":491,"open_issues_count":21,"forks_count":125,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T02:06:44.489Z","etag":null,"topics":["css","javascript","qiangguo","study","tampermonkey","tampermonkey-userscript","typescript","xuexi","xuexiqiangguo"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xu22Web.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":null},"created_at":"2022-08-10T13:27:48.000Z","updated_at":"2025-03-25T07:18:09.000Z","dependencies_parsed_at":"2024-01-13T17:47:42.291Z","dependency_job_id":"41cbc1e2-2374-420c-a69b-ce5a63c1abce","html_url":"https://github.com/Xu22Web/tech-study-js","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xu22Web%2Ftech-study-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xu22Web%2Ftech-study-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xu22Web%2Ftech-study-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xu22Web%2Ftech-study-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xu22Web","download_url":"https://codeload.github.com/Xu22Web/tech-study-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","javascript","qiangguo","study","tampermonkey","tampermonkey-userscript","typescript","xuexi","xuexiqiangguo"],"created_at":"2024-09-24T14:17:33.851Z","updated_at":"2025-04-05T03:10:55.666Z","avatar_url":"https://github.com/Xu22Web.png","language":"JavaScript","readme":"# tech-study-js\n\n### 原仓库\n\n\u003e https://github.com/TechXueXi/techxuexi-js\n\n基于原作者的原仓库，自行改进和完善\n\n### 描述 Description\n\n- 灵活且貌似轻量的 `学习强国` 油猴脚本。\n\n- 与此同时，提供更加便捷的版本选择\n\n  - [Node.js 版](https://github.com/Xu22Web/tech-study-node 'Node.js 版')\n\n  - [Docker 版](https://github.com/Xu22Web/tech-study-docker 'Docker 版')\n\n### 交流群 Telegram Group\n\n- 链接： [tech-study 互动群](https://t.me/+IJ_YzNc-Iew0MGRl)\n\n- 二维码：\n\n  \u003cimg src=\"./images/group.png\" style=\"width:200px;\" alt=\"Telegram邀请二维码\"\u003e\n\n注：介于脚本国内敏感，暂时不提供其他交流互动方式。\n\n### 用法 Usage\n\n1. 装个浏览器插件`Tampermonkey`\n\n   1. Microsoft Edge: [插件安装](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd?hl=zh-CN)\n\n   2. Google Chrome: [插件安装](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=zh)\n\n2. 点击插件里添加按钮，去掉编辑框里原来的代码，复制 [tech-study.js](https://raw.githubusercontent.com/Xu22Web/tech-study-js/master/tech-study.js) 脚本，粘贴进编辑框保存。\n\n3. 开启这个脚本，然后进入网页强国 https://www.xuexi.cn 。\n\n### 优化 Promote\n\n1. 优化整体交互设计，新增一体式扫码登录\n\n2. 新增用户信息显示，包括昵称、头像、总分以及当天分数\n\n3. 新增任务进度以及任务分数详情显示，任务情况清晰明了\n\n4. 优化答题逻辑，新增滑动验证，远离验证烦恼\n\n5. 新增同屏任务以及静默运行，仅需一个页面即可静默运行任务\n\n6. 兼容桌面端以及移动端，手机电脑均可运行（设备均需支持油猴脚本，此外，移动端需要开启同屏任务）\n\n7. 新增定时任务以及远程推送，定时刷新页面，远程微信推送登录二维码\n\n### 使用流程 Process\n\n1. 用户`登录`\n\n   \u003cimg src=\"./images/login.png\" style=\"width:200px;\" alt=\"登录\"\u003e\n\n2. 点击 `开始学习`，等待完成任务运行\n\n   - `桌面端`运行\n\n     \u003cimg src=\"./images/pc.png\" style=\"width:1000px;\" alt=\"桌面端运行\"\u003e\n\n   - `移动端`运行\n\n      \u003cimg src=\"./images/mobile.png\" style=\"width:320px;\" alt=\"移动端运行\"\u003e\n\n3. `完成学习`任务\n\n   \u003cimg src=\"./images/done.png\" style=\"width:300px;\" alt=\"完成学习\"\u003e\n\n### 更新与维护 Update and Maintenance\n\n1. 修复有声视频播放后，页面倒计时不继续的问题（注：不同标签页的有声视频需要用户交互才能播放，手动播放后会展示倒计时）\n\n2. 与此同时，提供更加便捷的版本选择\n\n   - [Node.js 版](https://github.com/Xu22Web/tech-study-node 'Node.js 版')\n\n   - [Docker 版](https://github.com/Xu22Web/tech-study-docker 'Docker 版')\n\n### 关于开发 Development\n\n- 脚本配置\n\n  1. 版本配置 `src/config/version.ts`\n\n  2. 脚本配置 `src/config/script.ts`\n\n  3. 编译配置 `src/config/compile.ts`\n\n  4. 接口配置 `src/config/api.ts`\n\n  5. 链接配置 `src/config/url.ts`\n\n  6. 任务配置 `src/config/task.ts`\n\n- CSS 文件\n\n  `src/css/index.css`\n\n  - 根据功能特性（i）\n\n    ```js\n    // 将文件'./css/index.css'文本内容赋值到'css'\n    import css from './css/index.css?raw';\n    ```\n\n  - 根据 Tampermonkey API 函数\n\n    ```js\n    // 嵌入样式\n    GM_addStyle(css);\n    ```\n\n- 脚本内容\n\n  `src/tech-study.ts`\n\n- 编译\n\n  ```\n  # 编译生成 'tech-study.js'\n  pnpm build\n  ```\n\n  即\n\n  ```\n   ✔ 完成编译: index.ts -\u003e index.js\n   ✔ 已生成 用户脚本配置 注释!\n   ✔ 完成编译: ./config/api.ts -\u003e api.js\n   ✔ 完成编译: ./config/url.ts -\u003e url.js\n   ✔ 完成编译: ./config/task.ts -\u003e task.js\n\n   ... ...\n\n   ✔ 导出整合的脚本文件: tech-study.js\n  ```\n\n- 功能特性（基于`TypeScript Compiler API`）\n\n  1. 包含`?raw`结尾的`import`语句\n\n     ```\n     import var from 'file?raw';\n     ```\n\n     1. 文件`file`文本内容赋值到`var`\n\n     2. 此类型`import`语句不会被编译到结果\n\n  2. 普通的`import`语句\n\n     ```\n     import { funName } from 'file';\n     ```\n\n     1. 文件`file`文本插入到主文件一起导出，相当于合并多个`*.ts`文件导出为一个`*.js`文件\n\n     2. 此类型`import`语句不会被编译到结果\n\n- 类似组合式接口（类似 `Composition API`）\n\n  模拟 `ref`，`watch`，`watchEffect` 等 API。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxu22web%2Ftech-study-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxu22web%2Ftech-study-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxu22web%2Ftech-study-js/lists"}