Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Last active November 14, 2023 14:14
Show Gist options
  • Save Akkiesoft/4dc5d6e74b36e981979c57d19bab82a2 to your computer and use it in GitHub Desktop.
Save Akkiesoft/4dc5d6e74b36e981979c57d19bab82a2 to your computer and use it in GitHub Desktop.
X pictcollect
javascript:if(typeof b==="undefined"){let b};b=document.getElementById("react-root");if(typeof e==="undefined"){let e};e=document.createElement('div');e.style="position:fixed;top:0;left;0;z-index:999;background:#eeffef";b.insertBefore(e,b.firstChild);if(typeof l==="undefined"){let l};l=window.location.href.split("?")[0].split("/");if(typeof l==="undefined"){let l};l=window.location.href.split("?")[0].split("/");navigator.clipboard.writeText(l[3]+"_"+l[5]+"_");if(typeof ll==="undefined"){let ll};ll=document.getElementsByTagName("article")[0].getElementsByTagName("div")[0].getElementsByTagName("div")[0].getElementsByTagName("img");if(typeof c==="undefined"){let c;}c=0;for (var i=0; i < ll.length; i++) {if (! ll[i].src.includes('pbs.twimg.com/media')){continue;};c+=1;let lll=ll[i].src.split("?");if(typeof pc_params==="undefined"){let pc_params};pc_params=lll[1].split("&");if(typeof pc_ext==="undefined"){let pc_ext};for(var ii=0;ii < pc_params.length;ii++){let kv=pc_params[ii].split("=");if(kv[0] == "format"){pc_ext=kv[1];}};if(typeof pc_newurl==="undefined"){let pc_newurl};pc_newurl=lll[0]+"."+pc_ext+":orig";let new_e=document.createElement('a');new_e.href=pc_newurl;new_e.innerHTML=l[3]+"_"+l[5]+"_"+c+"<br>";e.appendChild(new_e);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment