Advertisement
Guest User

Untitled

a guest
May 15th, 2018
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. javascript:(function() { function forceDownload(blob, filename) { var a = document.createElement('a'); a.download = filename; a.href = blob; a.click(); } function downloadResource(url, filename) { if (!filename) filename = url.split('\\').pop().split('/').pop(); fetch(url, { headers: new Headers({ 'Origin': location.origin }), mode: 'cors' }) .then(response => response.blob()) .then(blob => { let blobUrl = window.URL.createObjectURL(blob); forceDownload(blobUrl, filename); }) .catch(e => console.error(e)); } var id = "/i/models/" + location.href.split("/").slice(-1)[0]; var dl = prefetchedData[id].files[0].osgjsUrl; var loc = dl.replace("file.osgjs.gz",""); downloadResource(dl, "file.osgjs.gz"); var dl2 = loc + "model_file_wireframe.bin.gz"; downloadResource(dl2, "model_file_wireframe.bin.gz"); var dl3 = loc + "model_file.bin.gz"; downloadResource(dl3, "model_file.bin.gz"); })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement