diff --git a/index.php b/index.php
index f84ec17f..8a456357 100644
--- a/index.php
+++ b/index.php
@@ -96,6 +96,8 @@ require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GL
if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl());
if (empty($GLOBALS['timezone'])) $GLOBALS['timezone']=date_default_timezone_get();
if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false;
+if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false;
+// I really need to rewrite Shaarli with a proper configuation manager.
autoLocale(); // Sniff browser language and set date format accordingly.
header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
@@ -1350,6 +1352,7 @@ function renderPage()
$GLOBALS['title']=$_POST['title'];
$GLOBALS['redirector']=$_POST['redirector'];
$GLOBALS['disablesessionprotection']=!empty($_POST['disablesessionprotection']);
+ $GLOBALS['disablejquery']=!empty($_POST['disablejquery']);
writeConfig();
echo '';
exit;
@@ -1951,6 +1954,11 @@ function lazyThumbnail($url,$href=false)
$html='';
// Lazy image (only loaded by javascript when in the viewport).
+ if (!empty($GLOBALS['disablejquery'])) // (except if jQuery is disabled)
+ $html.='';
- // No-javascript fallback:
+ // No-javascript fallback.
$html.='