diff --git a/CHANGELOG.md b/CHANGELOG.md index ed88c0bf1b90..1cdcd74760ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ * Fix update system via ZIP archive [#1498](https://github.com/FreshRSS/FreshRSS/pull/1498) * Work around for IE / Edge bug in username pattern in version 1.6.3 [#1511](https://github.com/FreshRSS/FreshRSS/issues/1511) * Fix *mark as read* articles when adding a new feed [#1535](https://github.com/FreshRSS/FreshRSS/issues/1535) + * Change load order of CSS and JS to help CustomCSS and CustomJS extensions [Extensions#13](https://github.com/FreshRSS/Extensions/issues/13), [#1547](https://github.com/FreshRSS/FreshRSS/pull/1547) * UI * New option for not closing the article when clicking outside its area [#1539](https://github.com/FreshRSS/FreshRSS/pull/1539) * Download icon 💾 for other MIME types (e.g. `application/*`) [#1522](https://github.com/FreshRSS/FreshRSS/pull/1522) diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 563393c9083c..90d6fae06bd9 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -80,7 +80,7 @@ private static function initI18n() { public static function loadStylesAndScripts() { $theme = FreshRSS_Themes::load(FreshRSS_Context::$user_conf->theme); if ($theme) { - foreach($theme['files'] as $file) { + foreach(array_reverse($theme['files']) as $file) { if ($file[0] === '_') { $theme_id = 'base-theme'; $filename = substr($file, 1); @@ -91,13 +91,13 @@ public static function loadStylesAndScripts() { $filetime = @filemtime(PUBLIC_PATH . '/themes/' . $theme_id . '/' . $filename); $url = '/themes/' . $theme_id . '/' . $filename . '?' . $filetime; header('Link: <' . Minz_Url::display($url, '', 'root') . '>;rel=preload', false); //HTTP2 - Minz_View::appendStyle(Minz_Url::display($url)); + Minz_View::prependStyle(Minz_Url::display($url)); } } - - Minz_View::appendScript(Minz_Url::display('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js'))); - Minz_View::appendScript(Minz_Url::display('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); - Minz_View::appendScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js'))); + //Use prepend to insert before extensions. Added in reverse order. + Minz_View::prependScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js'))); + Minz_View::prependScript(Minz_Url::display('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); + Minz_View::prependScript(Minz_Url::display('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js'))); } private static function loadNotifications() { diff --git a/data/extensions-data/.gitignore b/data/extensions-data/.gitignore new file mode 100644 index 000000000000..0a00d70141f2 --- /dev/null +++ b/data/extensions-data/.gitignore @@ -0,0 +1 @@ +*/ \ No newline at end of file diff --git a/data/extensions-data/index.html b/data/extensions-data/index.html new file mode 100644 index 000000000000..85faaa37ec7c --- /dev/null +++ b/data/extensions-data/index.html @@ -0,0 +1,13 @@ + + + + + +Redirection + + + + +

Redirection

+ +