Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit 162361d1 authored by Thierry BUGEAT's avatar Thierry BUGEAT

#27 Last feed update datetime

parent 23369517
......@@ -51,3 +51,4 @@ confirm-add-keyword=Are you sure you want add this keyword ?
keyword-was-added=Keyword was added.
keyword-was-not-added=Keyword was not added.
feedly-get-subscriptions-error=Feedly error:
no-news=No news
......@@ -51,3 +51,4 @@ confirm-add-keyword=¿Esta seguro de quere añadir esta palabra clave?
keyword-was-added=La palabra clave ha sido añadida.
keyword-was-not-added=La palabra clave no ha sido añadida.
feedly-get-subscriptions-error=Feedly error:
no-news=No noticia
......@@ -51,3 +51,4 @@ confirm-add-keyword=Voulez-vous vraiment ajouter ce mot clé ?
keyword-was-added=Le mot clé a été ajouté.
keyword-was-not-added=Le mot clé n'a pas été ajouté.
feedly-get-subscriptions-error=Erreur Feedly:
no-news=Pas d'actualité
......@@ -50,3 +50,4 @@ confirm-add-keyword=Are you sure you want add this keyword ?
keyword-was-added=Keyword was added.
keyword-was-not-added=Keyword was not added.
feedly-get-subscriptions-error=Feedly erro:
no-news=No notícia
......@@ -86,7 +86,7 @@
"max": -1 // Set by function "setEntriesIds"
// Depends of:
// - params.entries.dontDisplayEntriesOlderThan
// - isSmallEntry()
// - my.isSmallEntry()
// - search keyword value
},
"search": {
......@@ -956,7 +956,9 @@
_deleteIcone = '<button class="' + _class + '" account="' + _account + '" feedId="' + _feed._myFeedId + '"><span data-icon="delete"></span></button>';
}
_html[_account] = _html[_account] + '<li><a class="open" feedUrl="' + _feed.feedUrl + '"><p>' + _deleteIcone + '<button><span data-icon="' + _feed._myPulsationsIcone + '"></span></button>' + _feed.title + '</p><p><time>' + _feed._myLastPublishedDate + '</time></p></a></li>';
var _myLastPublishedDate = (_feed._myLastTimestamp == 0) ? "No news" : _feed._myLastPublishedDate;
_html[_account] = _html[_account] + '<li><a class="open" feedUrl="' + _feed.feedUrl + '"><p>' + _deleteIcone + '<button><span data-icon="' + _feed._myPulsationsIcone + '"></span></button>' + _feed.title + '</p><p><time>' + _myLastPublishedDate + '</time></p></a></li>';
}
_htmlFeeds = _htmlFeeds +
......@@ -1125,7 +1127,7 @@
// Small article or not ?
var _isSmallEntry = isSmallEntry(_entrie);
var _isSmallEntry = my.isSmallEntry(_entrie);
// 1st image
......@@ -1313,24 +1315,6 @@
}, 250); // Schedule the execution for later
}
/**
* Is it a small entry ?
* @param {object} entry
* @return {boolean} true, false
* */
function isSmallEntry(entry) {
var _out;
var _diff = entry.content.length - entry.contentSnippet.length;
if (_diff < params.entries.maxLengthForSmallEntries) {
_out = true;
} else {
_out = false;
}
return _out;
}
/**
* Set id max for entries. Variable "liveValues['entries']['id']['max']"
* Set id min for entries. Variable "liveValues['entries']['id']['min']"
......@@ -1339,7 +1323,7 @@
*
* Depends of settings...
* - params.entries.dontDisplayEntriesOlderThan
* - isSmallEntry()
* - my.isSmallEntry()
* - search keyword value
*
* @param {null}
......@@ -1356,7 +1340,7 @@
var _string = document.getElementById('inputSearchEntries').value || "";
while ((sortedEntries[_nb]._myTimestamp < liveValues['timestamps']['min'])
|| (!params.entries.displaySmallEntries && isSmallEntry(sortedEntries[_nb]))
|| (!params.entries.displaySmallEntries && my.isSmallEntry(sortedEntries[_nb]))
|| (_string !== "" && liveValues['entries']['search']['visible'] && (((JSON.stringify(sortedEntries[_nb])).toLowerCase()).indexOf(_string.toLowerCase()) == -1))
){
_nb = _nb - 1;
......@@ -1377,7 +1361,7 @@
var _string = document.getElementById('inputSearchEntries').value || "";
while ((sortedEntries[_nb]._myTimestamp > liveValues['timestamps']['max'])
|| ((params.entries.displaySmallEntries == false) && (isSmallEntry(sortedEntries[_nb]) == true))
|| ((params.entries.displaySmallEntries == false) && (my.isSmallEntry(sortedEntries[_nb]) == true))
|| (_string !== "" && liveValues['entries']['search']['visible'] && (((JSON.stringify(sortedEntries[_nb])).toLowerCase()).indexOf(_string.toLowerCase()) == -1))
){
_nb = _nb + 1;
......@@ -1844,7 +1828,7 @@
var _content = (sortedEntries[_previousEntryId]._myFeedInformations.title + ' ' + sortedEntries[_previousEntryId].title + ' ' + sortedEntries[_previousEntryId].contentSnippet).toLowerCase();
while ((sortedEntries[_previousEntryId]._myTimestamp < liveValues['timestamps']['min'])
|| (!params.entries.displaySmallEntries && isSmallEntry(sortedEntries[_previousEntryId]))
|| (!params.entries.displaySmallEntries && my.isSmallEntry(sortedEntries[_previousEntryId]))
|| (_string !== "" && liveValues['entries']['search']['visible'] && (_content.indexOf(_string.toLowerCase()) == -1))
){
_previousEntryId = _previousEntryId + 1;
......@@ -1861,7 +1845,7 @@
var _content = (sortedEntries[_nextEntryId]._myFeedInformations.title + ' ' + sortedEntries[_nextEntryId].title + ' ' + sortedEntries[_nextEntryId].contentSnippet).toLowerCase();
while ((sortedEntries[_nextEntryId]._myTimestamp > liveValues['timestamps']['max'])
|| (!params.entries.displaySmallEntries && isSmallEntry(sortedEntries[_nextEntryId]))
|| (!params.entries.displaySmallEntries && my.isSmallEntry(sortedEntries[_nextEntryId]))
|| (_string !== "" && liveValues['entries']['search']['visible'] && (_content.indexOf(_string.toLowerCase()) == -1))
){
_nextEntryId = _nextEntryId - 1;
......@@ -1878,7 +1862,7 @@
// [<]
if (isSmallEntry(sortedEntries[_nextEntryId])) {
if (my.isSmallEntry(sortedEntries[_nextEntryId])) {
dom['entry']['next'].setAttribute("i", _nextEntryId);
dom['entry']['next'].setAttribute("entry_link", sortedEntries[_nextEntryId].link);
} else {
......@@ -1888,7 +1872,7 @@
// [>]
if (isSmallEntry(sortedEntries[_previousEntryId])) {
if (my.isSmallEntry(sortedEntries[_previousEntryId])) {
dom['entry']['previous'].setAttribute("i", _previousEntryId);
dom['entry']['previous'].setAttribute("entry_link", sortedEntries[_previousEntryId].link);
} else {
......
......@@ -226,3 +226,22 @@ MyFeeds.prototype.error = function (message, arguments) {
window.console && console.error(message, _arguments);
}
}
/**
* Is it a small entry ?
* @param {object} entry
* @return {boolean} true, false
* */
MyFeeds.prototype.isSmallEntry = function (entry) {
var _out;
var _diff = entry.content.length - entry.contentSnippet.length;
if (_diff < params.entries.maxLengthForSmallEntries) {
_out = true;
} else {
_out = false;
}
return _out;
}
......@@ -292,6 +292,7 @@ GoogleFeed.prototype.addFeed = function(feed) {
var _myNewfeed = feed;
var _myNewEntries = feed.entries;
var _lastUpdateTimestamp = 0;
for (var i = 0; i < _myNewEntries.length; i++) {
_myNewEntries[i]._myFeedInformations = feed;
......@@ -305,9 +306,17 @@ GoogleFeed.prototype.addFeed = function(feed) {
// Pulsations ?
var _timestamps = [];
var _timestamp = 0;
for (var i = 0; i < _myNewEntries.length; i++) {
_timestamps.push(Math.round(new Date(_myNewEntries[i].publishedDate).getTime() / 1000));
_timestamp = Math.round(new Date(_myNewEntries[i].publishedDate).getTime() / 1000);
_timestamps.push(_timestamp);
if ((_lastUpdateTimestamp < _timestamp)
&& (((params.entries.displaySmallEntries == false) && (!_MyFeeds.isSmallEntry(_myNewEntries[i])))
|| (params.entries.displaySmallEntries == true))
){
_lastUpdateTimestamp = _timestamp;
}
}
var _timestampMin = Math.min.apply(Math, _timestamps);
......@@ -325,11 +334,11 @@ GoogleFeed.prototype.addFeed = function(feed) {
// /!\ The 3 following values are false. Entries are not sorted by dates.
var _date = new Date(_timestampMax * 1000);
var _date = new Date(_lastUpdateTimestamp * 1000);
_myNewfeed['_myLastPublishedDate'] = _date.toLocaleString(userLocale);
_myNewfeed['_myLastTimestamp'] = _timestampMax;
_myNewfeed['_myLastTimestampInMs'] = _timestampMax;
_myNewfeed['_myLastTimestamp'] = _lastUpdateTimestamp;
_myNewfeed['_myLastTimestampInMs'] = _lastUpdateTimestamp;
// Remove values.
......@@ -496,3 +505,22 @@ GoogleFeed.prototype.get = function (url, myParams) {
}); // Schedule the execution for later
});
}
/**
* Is it a small entry ?
* @param {object} entry
* @return {boolean} true, false
* */
GoogleFeed.prototype.isSmallEntry = function (entry) {
var _out;
var _diff = entry.content.length - entry.contentSnippet.length;
if (_diff < params.entries.maxLengthForSmallEntries) {
_out = true;
} else {
_out = false;
}
return _out;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment