小米便签(笔记)pdf导出工具

点击右上角打印按钮,打印本篇笔记。

  1. // ==UserScript==
  2. // @name 小米便签(笔记)pdf导出工具
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description 点击右上角打印按钮,打印本篇笔记。
  6. // @author aqni
  7. // @match https://i.mi.com/note/h5
  8. // @require https://cdn.jsdelivr.net/npm/jquery@3.1.1/dist/jquery.min.js
  9. // @require https://cdn.jsdelivr.net/npm/jQuery.print@1.5.1/jQuery.print.js
  10. // @grant none
  11. // ==/UserScript==
  12. (function(){
  13. /* globals $*/
  14. 'use strict';
  15. const iconHTML='<i class="icon-8zlI5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="1em" height="1em" fill="none"><path d="M14,15.3h4v-8H2v8h4V18h8v-5.3H6 M6,7.3V2.9C6,2.4,6.4,2,7,2h6c0.6,0,1,0.4,1,0.9v2.2" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></svg></i>';
  16. const btnCreate=`<button class="action-2Jcj0 action-btn-3pa39">${iconHTML}</button>`;
  17. const posSelect="span.action-group-record-21ymU";
  18. const noteSelect="div.editor-body-VJW45";
  19. $(document).ready(function(){
  20. $(posSelect).prepend(
  21. $(btnCreate).click(function(){
  22. $(noteSelect).print();
  23. })
  24. );
  25. });
  26. })();

QingJ © 2025

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