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 e527be62 authored by Thierry BUGEAT's avatar Thierry BUGEAT

Merge branch 'hotfix-1.0.1'

parents 44235cfc d5f8ca0d
{
"name": "my Feeds",
"description": "RSS & ATOM feeds reader",
"version": "1.0.0",
"version": "1.0.1",
"launch_path": "/index.html",
"icons": {
"60": "/images/icon-60.png",
......
......@@ -84,6 +84,8 @@
var _onLine = "NA";
var _searchEntries = false;
var _previousNbDaysAgo = -1;
// Load params from SDCard.
// Create file if doesn't exists.
......@@ -1032,6 +1034,7 @@
function dspEntries(entries, nbDaysAgo, feedUrl) {
var start = performance.now();
var feedsEntriesScrollTop = feeds_entries.scrollTop;
ui.echo('feedsEntriesNbDaysAgo', document.webL10n.get('loading'), '');
ui.echo('feeds-entries', '', '');
......@@ -1121,9 +1124,9 @@
if (_entrie._myFirstImageUrl) {
if (_diff < params.entries.maxLengthForSmallEntries) {
_imageUrl = '<span class="my-'+_theme+'-image-container '+_theme+'-ratio-image-s"><img src="' + _entrie._myFirstImageUrl + '"/></span>';
_imageUrl = '<span class="my-'+_theme+'-image-container '+_theme+'-ratio-image-s"><img src="images/loading.png" data-src="' + _entrie._myFirstImageUrl + '"/></span>';
} else {
_imageUrl = '<span class="my-'+_theme+'-image-container '+_theme+'-ratio-image-l"><img src="' + _entrie._myFirstImageUrl + '"/></span>';
_imageUrl = '<span class="my-'+_theme+'-image-container '+_theme+'-ratio-image-l"><img src="images/loading.png" data-src="' + _entrie._myFirstImageUrl + '"/></span>';
}
}
......@@ -1144,7 +1147,7 @@
var _accountIcone = '';
if (_entrie._myFeedInformations._myAccount != 'local') {
_accountIcone = '<img src="images/' + _entrie._myFeedInformations._myAccount + '.' + _theme + '.png" />';
_accountIcone = '<img src="images/' + _entrie._myFeedInformations._myAccount + '.' + _theme + '.png" data-src="images/' + _entrie._myFeedInformations._myAccount + '.' + _theme + '.png" />';
}
// Content ( Normal / Small )
......@@ -1236,6 +1239,14 @@
params.entries.displaySmallEntries ?
ui._smallEntries('show') : ui._smallEntries('hide');
// Scroll if you stay in same day.
if (_previousNbDaysAgo == nbDaysAgo) {
feeds_entries.scrollTop = feedsEntriesScrollTop;
}
_previousNbDaysAgo = nbDaysAgo;
// ==================
// --- Add Events ---
// ==================
......@@ -1515,6 +1526,31 @@
myFeedsSubscriptions[_account].push(_feed);
}
}
/**
* Load images who are visibles in viewport
* */
function loadImages() {
var images = document.getElementsByTagName('img');
for (var i = 0; i < images.length; i++) {
if (isInViewport(images[i]) && (images[i].getAttribute('data-src') != images[i].getAttribute('src'))) {
images[i].setAttribute('src', images[i].getAttribute('data-src'));
}
}
}
/**
* Check if element is visible in viewport
* @param {object} elem DOM element
* @return {boolean} true / false
* */
function isInViewport(element) {
var rect = element.getBoundingClientRect()
var windowHeight = window.innerHeight || document.documentElement.clientHeight
var windowWidth = window.innerWidth || document.documentElement.clientWidth
return rect.bottom > 0 && rect.top < windowHeight && rect.right > 0 && rect.left < windowWidth
}
// ======================
// --- Ready to start ---
......@@ -1601,6 +1637,14 @@
var _timestampMax = _myTimestamp - (86400 * _maxNbDaysAgo);
gf.deleteOldEntries(_timestampMax);
}, 60000);
// ============================
// --- Load visibles images ---
// ============================
setInterval(function() {
loadImages();
}, 200);
// ==============
// --- Events ---
......
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