Giter Club home page Giter Club logo

tech-study-js's Introduction

tech-study-js

原仓库

https://github.com/TechXueXi/techxuexi-js

基于原作者的原仓库,自行改进和完善

描述 Description

  • 灵活且貌似轻量的 学习强国 油猴插件。

  • 如果感觉功能不强大,去看看 Node.js 版 https://github.com/Xu22Web/tech-study-node

交流群 Telegram Group

注:介于脚本国内敏感,暂时不提供其他交流互动方式。

用法 Usage

  1. 装个浏览器插件Tampermonkey

    1. Microsoft Edge: 插件安装

    2. Google Chrome: 插件安装

  2. 点击插件里添加按钮,去掉编辑框里原来的代码,复制 tech-study.js 脚本,粘贴进编辑框保存。

  3. 开启这个脚本,然后进入网页强国 https://www.xuexi.cn

优化 Promote

  1. 优化整体交互设计,新增一体式扫码登录

  2. 新增用户信息显示,包括昵称、头像、总分以及当天分数

  3. 新增任务进度以及任务分数详情显示,任务情况清晰明了

  4. 优化答题逻辑,新增滑动验证,远离验证烦恼

  5. 新增同屏任务以及静默运行,仅需一个页面即可静默运行任务

  6. 兼容桌面端以及移动端,手机电脑均可运行(设备均需支持油猴脚本,此外,移动端需要开启同屏任务)

  7. 新增定时任务以及远程推送,定时刷新页面,远程微信推送登录二维码

使用流程 Process

  1. 用户登录

    登录
  2. 点击 开始学习,等待完成任务运行

    • 桌面端运行

      桌面端运行
    • 移动端运行

      移动端运行
  3. 完成学习任务

    完成学习

更新与维护 Update and Maintenance

  1. 修复同屏任务点击关闭后,任务无法继续进行的问题

  2. 优化视听学习的结束时间。若视频时长大于 120s ,则在 120s 左右关闭;否则在视频总时长左右关闭页面

  3. 新增文章选读、视听学习在页面无效时,自动跳过问题页面

  4. 发布基于 Node.js 以及 puppeteer 的全套解决方案,Node.js 版 解决了滑动验证问题等问题,实现全自动化

公告 announcement

  • 现征集在线题库,特此公告

    不知道大家有没有发现,在新版的脚本中,我将原本混乱的搜题API,替换成了自行整合的搜题API

    由于以下原因:

    1. 答题需要收集和优化题库,方便搜题请求

    2. 便于其他方式的调用,目前,搜题API的题库有7

    存在的问题:

    1. 题量有限

    2. 准确度欠佳

  • 如果大家发现新的题库或者对于题库有何建议,可以去下面的仓库反馈

  • 关于题库: answer-search-bank https://github.com/Xu22Web/answer-search-bank

最后,希望在大家的帮助下,提供更高质量、更优质的脚本!

关于开发 Development

  • 脚本配置

    1. 脚本配置 src/config/script.ts

    2. API 配置 src/config/api.ts

    3. URL 配置 src/config/url.ts

    4. 编译配置 src/config/compile.ts

    5. 任务配置 src/config/task.ts

  • CSS 文件

    src/css/index.css

    • 根据功能特性(i)

      // 将文件'./css/index.css'文本内容赋值到'css'
      import css from './css/index.css?raw';
    • 根据 Tampermonkey API 函数

      // 嵌入样式
      GM_addStyle(css);
  • 脚本内容

    src/tech-study.ts

  • 编译

    # 编译生成 'tech-study.js'
    pnpm build
    

     ✔ 完成编译: tech-study.ts -> tech-study.js
     ✔ 完成编译: ./config/api.ts -> tech-study.js
     ✔ 完成编译: ./config/url.ts -> tech-study.js
     ✔ 完成编译: ./utils/index.ts -> tech-study.js
     ✔ 导出文件: tech-study.js
    
  • 功能特性(基于TypeScript Compiler API

    1. 包含?raw结尾的import语句

      import var from 'file?raw';
      
      1. 文件file文本内容赋值到var

      2. 此类型import语句不会被编译到结果

    2. 普通的import语句

      import { funName } from 'file';
      
      1. 文件file文本插入到主文件一起导出,相当于合并多个*.ts文件导出为一个*.js文件

      2. 此类型import语句不会被编译到结果

tech-study-js's People

Contributors

xu22web avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.