Native Discord multi image embeds
This commit is contained in:
@ -20,7 +20,20 @@
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }}) {% if verified %}☑️{% else %}{% endif %}" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:image" content="{{ pic[0] }}" />
|
||||
|
||||
{% if pic[1] %}
|
||||
<meta name="twitter:image" content="{{ pic[1] }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if pic[2] %}
|
||||
<meta name="twitter:image" content="{{ pic[2] }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if pic[3] %}
|
||||
<meta name="twitter:image" content="{{ pic[3] }}" />
|
||||
{% endif %}
|
||||
|
||||
<meta name="twitter:creator" content="@{{ user }}" />
|
||||
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
@ -23,7 +23,7 @@
|
||||
<meta property="og:video:height" content="480" />
|
||||
<meta property="og:title" content="{{ user }}" />
|
||||
<!--<meta property="og:description" content="{{ desc }}" />!-->
|
||||
<meta property="og:image" content="{{ pic }}" />
|
||||
<meta property="og:image" content="{{ pic[0] }}" />
|
||||
|
||||
<!--!-->
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlUserLink }}" type="application/json+oembed" title="{{ user }}">
|
||||
|
28
templates/redirect_script.html
Normal file
28
templates/redirect_script.html
Normal file
@ -0,0 +1,28 @@
|
||||
<script>
|
||||
function androidOrIOS() {
|
||||
const userAgent = navigator.userAgent;
|
||||
if(/android/i.test(userAgent)){
|
||||
return 'android';
|
||||
}
|
||||
if(/iPad|iPhone|iPod/i.test(userAgent)){
|
||||
return 'ios';
|
||||
}
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
function redirect() {
|
||||
const os = androidOrIOS();
|
||||
if(os === 'android'){
|
||||
window.location.href = 'twitter://status?status_id=1674915987789950982';
|
||||
window.location.href = 'https://twitter.com/pdxdylan/status/1674915987789950982'
|
||||
}
|
||||
if(os === 'ios'){
|
||||
window.location.href = 'twitter://status?id=1674915987789950982';
|
||||
setTimeout(() => {
|
||||
window.location.href = 'https://twitter.com/pdxdylan/status/1674915987789950982'
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
redirect();
|
||||
</script>
|
@ -25,7 +25,7 @@
|
||||
|
||||
<meta name="twitter:card" content="tweet" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }}) {% if verified %}☑️{% else %}{% endif %}" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:image" content="{{ pic[0] }}" />
|
||||
<meta name="twitter:creator" content="@{{ user }}" />
|
||||
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
@ -18,7 +18,7 @@
|
||||
<meta property="og:video:width" content="{{ videoSize['width'] }}" />
|
||||
<meta property="og:video:height" content="{{ videoSize['height'] }}" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }}) {% if verified %}☑️{% else %}{% endif %}" />
|
||||
<meta property="og:image" content="{{ pic }}" />
|
||||
<meta property="og:image" content="{{ pic[0] }}" />
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlUserLink }}&ttype=video&provider={{ appname }}" type="application/json+oembed" title="{{ user }}">
|
||||
|
Reference in New Issue
Block a user