Skip to content

Instantly share code, notes, and snippets.

@gMan1990
Last active March 8, 2020 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gMan1990/7bef9e3cb0b69ef5140cd8de9365ac3b to your computer and use it in GitHub Desktop.
Save gMan1990/7bef9e3cb0b69ef5140cd8de9365ac3b to your computer and use it in GitHub Desktop.
https://lastpass.com/ 导出 [demo]
jQuery(function ($) {
window._result = [];
let $itemButtonCellEdits = $(".itemButtonCell>.edit"),
openDialog = function (i) {
$("#dialogCloseButton").click();
$itemButtonCellEdits[i].click();
$.ajax({
headers: {
"x-csrf-token": "<your token>"
},
timeout: 5000,
cache: false,
url: "https://lastpass.com/lmiapi/jstrans",
complete: function () {
let $inputs = $(".formFieldValue input");
3 < $inputs.length && _result.push({
url: $("#siteDialogURL").val(),
fields: $inputs.map(function (i, e) {
return ["text", "password", "email"].includes(e.type) ? e.value : e.type;
}).get()
});
++i < $itemButtonCellEdits.length && openDialog(i);
}
});
};
openDialog(0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment