扇贝单词默认显示我的笔记标签

背单词时自动滚到页面底部并展示我的笔记

目前为 2019-12-27 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 扇贝单词默认显示我的笔记标签
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 背单词时自动滚到页面底部并展示我的笔记
  6. // @author wowo878787
  7. // @match https://web.shanbay.com/wordsweb/*
  8. // @require https://code.jquery.com/jquery-2.2.4.min.js
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. $("<style></style>").text(".Layout_page__2Wedt{padding-bottom:0}.index_left__3SFmQ{white-space:pre-line};").appendTo($("head"));
  14.  
  15. will_scroll = false
  16. is_detail_old = 0
  17.  
  18. var interval = setInterval(function(){
  19. is_detail = $('.VocabPronounce_word__17Tma').length
  20.  
  21. // 判断是否在单词详情页, 并决定 scroll 到页面底部
  22. if(is_detail_old === 0 && is_detail === 1){
  23. will_scroll = true
  24. is_detail_old = is_detail
  25. }
  26. else if(is_detail_old === 1 && is_detail === 0){
  27. will_scroll = false
  28. is_detail_old = is_detail
  29. }
  30. else{
  31. will_scroll = false
  32. }
  33.  
  34. if(will_scroll){
  35. $('.index_noteWrap__DZxrn .index_tabs__1CVfU .index_tab__37Cha:nth-child(2)').click();
  36. window.scrollTo(0,document.body.scrollHeight);
  37. }
  38. },500);
  39. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址