Skip to content

Instantly share code, notes, and snippets.

@ticky
Created April 25, 2017 06:20
Show Gist options
  • Save ticky/fbaf6ab520aadae4c00c5184d192d829 to your computer and use it in GitHub Desktop.
Save ticky/fbaf6ab520aadae4c00c5184d192d829 to your computer and use it in GitHub Desktop.
bad userscript to (try to) dump file paths from your Crashplan backup
window.__FILE__PATHS = [];
window.addEventListener('message', (event) => {
const initial_data = JSON.parse(event.data.split(' ').slice(1).join(' '));
const result_parsed = JSON.parse(initial_data.result.data);
result_parsed.data.forEach((file, index) => {
//console.debug(file.path, file.type, file.id);
window.__FILE__PATHS.push(file.path);
if (file.type === "directory") {
const element = $(`[title="${file.path}"] > a`);
//console.debug(`${file.path} is a directory! opening...`, element);
element.click();
}
});
});
$('[title="E:/"] > a, [title="E:/"] .directory > a').click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment