Last active
August 16, 2023 13:02
-
-
Save erhaem/ec079a3f695e98790a4c1107f2bdd6ad to your computer and use it in GitHub Desktop.
Facebook Tool: View Full Size Image. Copy the bookmarklet version, paste it on the bookmark bar; then click it.
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
| javascript:(function(a){var b=new URL(a.location);0>b.hostname.indexOf("facebook.com")?alert("Only works on Facebook's domains"):"/photo.php"!==b.pathname?alert("Only works at *.facebook.com/photo.php"):(b=b.searchParams.get("fbid"))?a.location.replace("https://m.facebook.com/photo/view_full_size/?fbid="+b):alert("`fbid` not found")})(window) |
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
| /** | |
| * Facebook Tool: View Full Size Image | |
| * @author Rifqi Haidar | |
| */ | |
| (function(e) { | |
| const currentUrl = new URL(e.location); | |
| if (currentUrl.hostname.indexOf("facebook.com") < 0) { | |
| alert("Only works on Facebook's domains"); | |
| return | |
| } | |
| if (currentUrl.pathname !== "/photo.php") { | |
| alert("Only works at *.facebook.com/photo.php"); | |
| return | |
| } | |
| const fbid = currentUrl.searchParams.get("fbid"); | |
| if (!fbid) { | |
| alert("`fbid` not found"); | |
| return | |
| } | |
| // console.log("Redirecting to full size image URL.."); | |
| e.location.replace(`https://m.facebook.com/photo/view_full_size/?fbid=${fbid}`) | |
| })(window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment