Created
September 29, 2020 14:48
-
-
Save plateaukao/f8c3392e9f87f76f9a3de0d59b8a0c7b to your computer and use it in GitHub Desktop.
This file contains 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
function previewUrlInfo(url, isAutoSend = false) { | |
// handle facebook no preview issue | |
var oldUrl = new URL(url); | |
if (oldUrl.hostname.includes('facebook')) { | |
oldUrl.hostname = 'mobile.facebook.com'; | |
} | |
... | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment