simplification
This commit is contained in:
parent
64db9d65b2
commit
5c6d2aa253
1 changed files with 1 additions and 3 deletions
|
@ -13,11 +13,9 @@ bot.global.text(/(https?:\/\/[^ ,\)"]*)/ig, (b) => {
|
|||
var re = /<title[^>]*>([^<]*)<\/title>/gi;
|
||||
var match = re.exec(body);
|
||||
if (match && match[1]) {
|
||||
// b.respondEnvelope({ attachments: [] })
|
||||
// b.envelope.payload.quickReply({ attachments: [] });
|
||||
var extra = "";
|
||||
var link = res.request.uri.href;
|
||||
if (/youtube.com/.test(res.request.uri.href)) {
|
||||
if (/youtube.com/.test(link)) {
|
||||
if (t = /[?&]v=([^&]+)/.exec(link)) {
|
||||
link = "https://www.youtube.com/watch?v=" + t[1];
|
||||
extra += " - [no-cookie](https://www.youtube-nocookie.com/embed/" + t[1] + ")";
|
||||
|
|
Loading…
Reference in a new issue