利用 油猴脚本 每日填日志

1|0需求

每天填写日志要点好几下,比较麻烦,写个脚本自动点下

2|0代码

  • 我现在用的浏览器 双核浏览器

  • 浏览器 安装 油猴脚本 tampermonkey

  • http://extb.cqttech.com/search/tampermonkey

  • 点击 tampermonkey

  • 控制面板

  • 创建两个脚本(因为有一个页面跳转)

  • 脚本1 重点是 @match

// ==UserScript== // @name EveryLog // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://192.168.71.7:8080/TFKJ/ // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... $("#userName").val('name') $("#password").val('123456') doSubmit() // window.location.assign("./implementTemporary.do?act=init") })();
  • 脚本2
// ==UserScript== // @name EveryLog2 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://192.168.71.7:8080/TFKJ/implementTemporary.do?act=init // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... $("#add").click() $("#add_child").click() $("#taskProjectIds").val(435) $("#useTimeList>input").click() const a = window.frames["__calendarIframe"].document a.getElementById('selectTodayButton').click() $('#workTypeIds').val('71') $('#selectTodayButton').click() $('#normalTimes').val('8') $('#overTimes').val('0') })();
  • 脚本3
// ==UserScript== // @name EveryLogOpenWindow // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://192.168.71.7:8080/TFKJ/main.do?act=init* // @icon https://www.google.com/s2/favicons?sz=64&domain=gitee.io // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... window.frames["content"].location = 'implementTemporary.do?act=init' })();

__EOF__

本文作者Reciter
本文链接https://www.cnblogs.com/pengchenggang/p/16692170.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   彭成刚  阅读(170)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
历史上的今天:
2020-09-14 英语音标总结
点击右上角即可分享
微信分享提示