Revert "Merge pull request #17 from lazuee/patch-2"
This reverts commit30150cc0e5
, reversing changes made tofbce711a95
.
This commit is contained in:
parent
0201bc1f9d
commit
f8c0ab6bb9
@ -291,9 +291,9 @@ class WebEmbed {
|
|||||||
if (this.shorten) {
|
if (this.shorten) {
|
||||||
const url = await getShorten(fullURL);
|
const url = await getShorten(fullURL);
|
||||||
if (!url) console.log('Cannot shorten URL in WebEmbed');
|
if (!url) console.log('Cannot shorten URL in WebEmbed');
|
||||||
return (url || fullURL);
|
return this.hidden ? `${hiddenCharter} ${url || fullURL}` : (url || fullURL);
|
||||||
} else {
|
} else {
|
||||||
return fullURL;
|
return this.hidden ? `${hiddenCharter} ${fullURL}` : fullURL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -301,8 +301,8 @@ class WebEmbed {
|
|||||||
// Credit: https://www.npmjs.com/package/node-url-shortener + google :))
|
// Credit: https://www.npmjs.com/package/node-url-shortener + google :))
|
||||||
const getShorten = async (url) => {
|
const getShorten = async (url) => {
|
||||||
const APIurl = [
|
const APIurl = [
|
||||||
//'https://is.gd/create.php?format=simple&url=',
|
'https://is.gd/create.php?format=simple&url=',
|
||||||
'https://tinyurl.com/api-create.php?url=', //this looks fine to me
|
'https://tinyurl.com/api-create.php?url=',
|
||||||
// 'https://cdpt.in/shorten?url=', Redirects 5s :(
|
// 'https://cdpt.in/shorten?url=', Redirects 5s :(
|
||||||
];
|
];
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user