油猴脚本 - dicts.cn 单词自动跳转 双核浏览器可用

跳转格式 http://www.dicts.cn/?w=blight
20230605 更新

// ==UserScript== // @name dicts.cn 单词自动跳转 双核浏览器可用 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://www.dicts.cn/* // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... setTimeout(function () { console.info('code 111 run', document.getElementById('word')) document.getElementById('word').focus(); }, 100) console.info('code run') $(document).ready(function(){ document.getElementById('word').focus(); setTimeout(function () { console.info('code 111 run', document.getElementById('word')) document.getElementById('word').focus(); }, 200) const w = getQuery('w') if (w) { $('#word').val(w) window.select(); } }); function getQuery(variable) { var query = window.location.search.substring(1); console.info('query', query) var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if(pair[0] == variable){return pair[1];} } return(false); } })();

__EOF__

本文作者Reciter
本文链接https://www.cnblogs.com/pengchenggang/p/17457011.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   彭成刚  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示