Skip to content

Instantly share code, notes, and snippets.

@mingsishendu
mingsishendu / mi-note-export.js
Created August 17, 2019 22:32 — forked from tvytlx/mi-note-export.js
小米便签导出, artoo.js 浏览器脚本
// 便签元素在 frame 里,不能直接用 artoo 处理,得先得到内部的 dom 元素,然后传给 artoo。
const iframe = 'iframe#js_note_mod_ctn.js_sandbox.business-mod-ctn.note-mod-ctn';
let get_container = (str)=>{return $(iframe)[0].contentDocument.body.querySelector(str)};
let notes_container = get_container('.home-bd .briefs-ctn.js_home_briefs_ctn');
// 开始抓取
let is_in_box = (this_)=>{
return (this_.attr('class')=='js_folder_brief folder-brief js_normal_folder js_lock') ||
(this_.attr('class')=='js_folder_brief folder-brief js_normal_folder')
};