Last active
March 8, 2020 08:41
-
-
Save gMan1990/7bef9e3cb0b69ef5140cd8de9365ac3b to your computer and use it in GitHub Desktop.
https://lastpass.com/ 导出 [demo]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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