mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-07-05 17:31:15 +02:00
💥 No more twitter cards
This commit is contained in:
@@ -2,6 +2,7 @@ Revision history for Lutim
|
||||
|
||||
0.16.0 ????-??-??
|
||||
- ⬆️ UUpdate jQuery
|
||||
- 💥 BREAKING CHANGE: no more twitter cards
|
||||
|
||||
0.15.0 2023-12-19
|
||||
- ✨ — Add --nuke option to image command
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
It means Let's Upload That Image.
|
||||
|
||||
## What does it do?
|
||||
It stores images and allows you to see them, download them or share them on social networks. From version 0.5, the gif images can be displayed as animated gifs in Twitter, but you need an HTTPS server (Twitter requires that. Lutim detects if you have a HTTPS server and displays a static image twitter card if you don't);
|
||||
It stores images and allows you to see them, download them or share them on social networks.
|
||||
|
||||
Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year.
|
||||
|
||||
|
||||
@@ -655,11 +655,11 @@ sub short {
|
||||
}
|
||||
}
|
||||
return $c->render(
|
||||
template => 'twitter',
|
||||
template => 'share',
|
||||
layout => undef,
|
||||
short => $short,
|
||||
filename => $image->filename,
|
||||
mimetype => ($c->req->url->to_abs()->scheme eq 'https') ? $image->mediatype : '',
|
||||
mimetype => $image->mediatype,
|
||||
width => $width,
|
||||
height => $height
|
||||
);
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, no default
|
||||
#tweet_card_via => '@foo',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, default is @framasky
|
||||
#tweet_card_via => '@framasky',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, default is @framasky
|
||||
#tweet_card_via => '@framasky',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, default is @framasky
|
||||
#tweet_card_via => '@framasky',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, default is @framasky
|
||||
#tweet_card_via => '@framasky',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, default is @framasky
|
||||
#tweet_card_via => '@framasky',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
# optional, default is 5
|
||||
#anti_flood_delay => 5,
|
||||
|
||||
# twitter account which will appear on twitter cards
|
||||
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
|
||||
# optional, default is @framasky
|
||||
#tweet_card_via => '@framasky',
|
||||
|
||||
# max image size, in octets
|
||||
# you can write it 10*1024*1024
|
||||
# optional, default is 10485760
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
/* vim:set sw=4 ts=4 sts=4 ft=css expandtab: */
|
||||
html {
|
||||
max-height:100%;
|
||||
}
|
||||
.height-97 {
|
||||
height: 97%;
|
||||
}
|
||||
.freezeframe {
|
||||
max-width: 100%;
|
||||
max-height:100%;
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
html{max-height:100%}.height-97{height:97%}.freezeframe{max-width:100%;max-height:100%}
|
||||
@@ -1,4 +0,0 @@
|
||||
freezeframe_options = {
|
||||
trigger_event: "click",
|
||||
animation_play_duration: 60000
|
||||
}
|
||||
@@ -69,7 +69,6 @@
|
||||
% # Display image informations
|
||||
<h4>
|
||||
<a href="<%= $url.'.'.stash('ext') %>" target="_blank"><%= stash('filename') %></a>
|
||||
<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%= $url %>?t"><span class="icon icon-twitter"></span></a>
|
||||
</h4>
|
||||
% my $delete_url = url_for('delete', {short => stash('real_short'), token => stash('token')})->to_abs();
|
||||
<form class="form">
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% use Mojo::Util qw(url_escape);
|
||||
% my $twitter_url = 'https://twitter.com/share';
|
||||
% my $url = url_for('/')->to_abs();
|
||||
% $twitter_url .= '?url='.url_escape("$url")
|
||||
% .'&text=Check out this %23Lutim instance! ';
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -32,7 +29,7 @@
|
||||
% }
|
||||
</head>
|
||||
<body>
|
||||
%= include 'partial/navbar', twitter_url => $twitter_url
|
||||
%= include 'partial/navbar'
|
||||
<div class="container">
|
||||
<div>
|
||||
% if (defined(config('hosted_by'))) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Lutim",
|
||||
"description": "Let's Upload That Image!\n\nThis is a simple image sharing app which use <%= url_for('/')->to_abs %> for storing the images. Once you have uploaded an image, you'll be provided differents links:\n a view link, which points directly to the image\n a download link, which force the download of the image\n a twitter link, which you can share on twitter : the image will natively appeared in twitter\n a delete link, which allows you to delete the image anytime you want\n\nThe image is stored on <%= url_for('/')->to_abs %> for a delay which you can define.\n\nThe particularity of Lutim is that the image is encrypted and its usage is as most anonymous as possible. See the information page (<%= url_for('about')->to_abs %>) for more details.\nLicense: AGPLv3 (https://www.gnu.org/licenses/agpl-3.0.html)",
|
||||
"description": "Let's Upload That Image!\n\nThis is a simple image sharing app which use <%= url_for('/')->to_abs %> for storing the images. Once you have uploaded an image, you'll be provided differents links:\n a view link, which points directly to the image\n a download link, which force the download of the image\n a social link, which you can share on social networks\n a delete link, which allows you to delete the image anytime you want\n\nThe image is stored on <%= url_for('/')->to_abs %> for a delay which you can define.\n\nThe particularity of Lutim is that the image is encrypted and its usage is as most anonymous as possible. See the information page (<%= url_for('about')->to_abs %>) for more details.\nLicense: AGPLv3 (https://www.gnu.org/licenses/agpl-3.0.html)",
|
||||
"launch_path": "<%= url_for('/') %>",
|
||||
"icons": {
|
||||
"32": "<%= url_for('/img/lutim32.png') %>",
|
||||
@@ -17,7 +17,7 @@
|
||||
"default_locale": "en",
|
||||
"locales": {
|
||||
"fr": {
|
||||
"description": "Envoyons cette image !\n\nCeci est une application de partage simple d'images qui utilise <%= url_for('/')->to_abs %> pour enregistrer les images. Une fois que vous avez envoyé une image, vous obtiendrez différents liens :\n un lien de visualisation, qui pointe directement sur l'image\n un lien de téléchargement, qui force le téléchargement de l'image\n un lien twitter, que vous pouvez partager sur twitter : l'image apparaîtra nativement dans twitter\n un lien de suppression, qui vous permet de supprimer l'image quand vous le souhaitez\n\nL'image est conservée sur <%= url_for('/')->to_abs %> pour un délai que vous pouvez définir.\n\nLa particularité de Lutim est que l'image est chiffrée et que son usage est aussi anonyme que possible. Voir la page d'information (<%= url_for('about')->to_abs %>) pour plus de détails.\nLicence : AGPLv3 (https://www.gnu.org/licenses/agpl-3.0.html)"
|
||||
"description": "Envoyons cette image !\n\nCeci est une application de partage simple d'images qui utilise <%= url_for('/')->to_abs %> pour enregistrer les images. Une fois que vous avez envoyé une image, vous obtiendrez différents liens :\n un lien de visualisation, qui pointe directement sur l'image\n un lien de téléchargement, qui force le téléchargement de l'image\n un lien de partage, que vous pouvez partager sur les réseaux sociaux\n un lien de suppression, qui vous permet de supprimer l'image quand vous le souhaitez\n\nL'image est conservée sur <%= url_for('/')->to_abs %> pour un délai que vous pouvez définir.\n\nLa particularité de Lutim est que l'image est chiffrée et que son usage est aussi anonyme que possible. Voir la page d'information (<%= url_for('about')->to_abs %>) pour plus de détails.\nLicence : AGPLv3 (https://www.gnu.org/licenses/agpl-3.0.html)"
|
||||
}
|
||||
},
|
||||
"activities": {
|
||||
|
||||
@@ -12,13 +12,6 @@ function cleanName(name, empty) {
|
||||
return name.replace(/</g, '<').replace(/>/g, '>');
|
||||
}
|
||||
}
|
||||
function tw_url(url) {
|
||||
return btn = [
|
||||
'<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>', url, '?t" class="btn btn-default">',
|
||||
'<span class="icon icon-twitter"></span>',
|
||||
'</a>'
|
||||
].join('');
|
||||
}
|
||||
function modifyImage(e) {
|
||||
e.preventDefault();
|
||||
var url = $(this).data('modlink');
|
||||
@@ -115,7 +108,6 @@ function buildMessage(success, msg) {
|
||||
'<a href="', link(msg.short, 't'), '" target="_blank" class="btn btn-default">',
|
||||
'<span class="icon icon-share" title="<%= l('Link for share on social networks') %>"></span>',
|
||||
'</a>',
|
||||
tw_url(msg.short),
|
||||
'</div>',
|
||||
'<input type="text" class="form-control" id="share', msg.real_short, '" value="', link(msg.short, 't'), '" readonly>',
|
||||
'<a href="#" class="input-group-addon copy-to-clipboard-link" title="<%= l('Copy to clipboard') %>">',
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% my $abs = url_for('/'.$short)->to_abs();
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lutim</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" type="image/png" href="<%= url_for('/img/favicon.png')->to_abs() %>">
|
||||
<meta property="og:title" content="Lutim" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= $abs %>?t" />
|
||||
<meta property="og:description" content="Image shared with Lutim" />
|
||||
<meta property="og:image" content="<%= $abs %>" />
|
||||
<meta property="og:image:url" content="<%= $abs %>" />
|
||||
<meta property="og:image:type" content="<%= $mimetype %>" />
|
||||
</head>
|
||||
<body>
|
||||
<img src="<%= $abs %>" alt="">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% my $g = ($mimetype eq 'image/gif') ? 1 : 0;
|
||||
% my $abs = url_for('/'.$short)->to_abs();
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lutim</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" type="image/png" href="<%= url_for('/img/favicon.png')->to_abs() %>">
|
||||
%= stylesheet '/css/twitter.min.css'
|
||||
<meta property="og:title" content="Lutim" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="<%= $abs %>?t" />
|
||||
<meta property="og:image" content="<%= $abs %>" />
|
||||
<meta property="og:image:url" content="<%= $abs %>" />
|
||||
<meta property="og:image:type" content="<%= $mimetype %>" />
|
||||
% if (config('tweet_card_via')) {
|
||||
<meta name="twitter:site" content="<%= config('tweet_card_via') %>">
|
||||
% }
|
||||
<meta name="twitter:image:src" content="<%= $abs %>">
|
||||
% if ($g) {
|
||||
<meta name="twitter:card" content="player">
|
||||
<meta name="twitter:image" content="<%= $abs %>">
|
||||
<meta name="twitter:player" content="<%= $abs %>?t">
|
||||
<meta name="twitter:title" content="<%= $filename %>">
|
||||
<meta name="twitter:player:width" content="<%= $width %>">
|
||||
<meta name="twitter:player:height" content="<%= $height %>">
|
||||
%= javascript '/js/jquery-3.7.1.min.js'
|
||||
%= javascript '/js/freezeframe.min.js'
|
||||
%= javascript '/js/twitter.js'
|
||||
% } else {
|
||||
<meta name="twitter:card" content="photo">
|
||||
% }
|
||||
</head>
|
||||
<body<%== ($g) ? '' : ' class="height-97"' %>>
|
||||
<img class="freezeframe" src="<%= $abs %><%= '.gif' if ($g) %>" alt="<%= $filename %>">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
% # Display image informations
|
||||
<h4>
|
||||
<a href="<%= $url.'.'.stash('ext') %>" target="_blank"><%= stash('filename') %></a>
|
||||
<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%= $url %>?t"><span class="icon icon-twitter"></span></a>
|
||||
</h4>
|
||||
% my $delete_url = url_for('delete', {short => stash('real_short'), token => stash('token')})->to_abs();
|
||||
<form class="form">
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
||||
% use Mojo::Util qw(url_escape);
|
||||
% my $twitter_url = 'https://twitter.com/share';
|
||||
% my $url = url_for('/')->to_abs();
|
||||
% $twitter_url .= '?url='.url_escape("$url")
|
||||
% .'&text=Check out this %23Lutim instance! ';
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -33,7 +30,7 @@
|
||||
%= stylesheet '/css/korrigan.css'
|
||||
</head>
|
||||
<body class="<%== current_route %>">
|
||||
%= include 'partial/navbar', twitter_url => $twitter_url
|
||||
%= include 'partial/navbar'
|
||||
<div class="container">
|
||||
<div class="upload-info"><!-- Warning: ends in index.html.ep -->
|
||||
<div>
|
||||
@@ -64,7 +61,7 @@
|
||||
% if (defined(config('piwik_img'))) {
|
||||
<img src="<%== config('piwik_img') %>" class="border-zero" alt="">
|
||||
% }
|
||||
%= javascript '/js/jquery-3.2.1.min.js'
|
||||
%= javascript '/js/jquery-3.7.1.min.js'
|
||||
%= javascript '/partial/manifest.js'
|
||||
%= javascript '/js/toastify.js'
|
||||
%= javascript '/js/bootstrap.min.js'
|
||||
|
||||
@@ -12,13 +12,6 @@ function cleanName(name, empty) {
|
||||
return name.replace(/</g, '<').replace(/>/g, '>');
|
||||
}
|
||||
}
|
||||
function tw_url(url) {
|
||||
return btn = [
|
||||
'<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>', url, '?t" class="btn btn-default">',
|
||||
'<span class="icon icon-twitter"></span>',
|
||||
'</a>'
|
||||
].join('');
|
||||
}
|
||||
function modifyImage(e) {
|
||||
e.preventDefault();
|
||||
var url = $(this).data('modlink');
|
||||
@@ -115,7 +108,6 @@ function buildMessage(success, msg) {
|
||||
'<a href="', link(msg.short, 't'), '" target="_blank" class="btn btn-default">',
|
||||
'<span class="icon icon-share" title="<%= l('Link for share on social networks') %>"></span>',
|
||||
'</a>',
|
||||
tw_url(msg.short),
|
||||
'</div>',
|
||||
'<input type="text" class="form-control" id="share', msg.real_short, '" value="', link(msg.short, 't'), '" readonly>',
|
||||
'<a href="#" class="input-group-addon copy-to-clipboard-link" title="<%= l('Copy to clipboard') %>">',
|
||||
|
||||
Reference in New Issue
Block a user