diff options
| author | 2022-05-15 21:52:52 +0200 | |
|---|---|---|
| committer | 2022-05-15 21:52:52 +0200 | |
| commit | 807ea755e0bddb814f5c55bdfa5321ce144fe816 (patch) | |
| tree | ac19704b8bea917d06fca95aecff828db804b204 /lib | |
| parent | 0cde4e898f94a10b5da7a221d5ddab904e0f2b1d (diff) | |
fix preview (#4291)
* fix
* Update extra.js
* reorga the scripts
* Update extra.js
* Several fixes
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1125472321
* More fixes
* Cleaning
* fix pr 4291
* Reorganise some script functions
* Remove unused popup-txt
And associated function openPopupWithMessage
* Fix archiving categories
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126924602
* Fix stats
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126983134
* Fix direct subscription
E.g. http://localhost/i/?c=subscription&id=735
* Fix subscription add
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126991621
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Minz/View.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Minz/View.php b/lib/Minz/View.php index 6cf811bff..8faeb9078 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -248,6 +248,9 @@ class Minz_View { } $scripts .= '<script src="' . $script['url'] . '"'; + if (!empty($script['id'])) { + $scripts .= ' id="' . $script['id'] . '"'; + } if ($script['defer']) { $scripts .= ' defer="defer"'; } @@ -265,20 +268,22 @@ class Minz_View { return $scripts; } - public static function prependScript ($url, $cond = false, $defer = true, $async = true) { + public static function prependScript ($url, $cond = false, $defer = true, $async = true, $id = '') { array_unshift(self::$scripts, array ( 'url' => $url, 'cond' => $cond, 'defer' => $defer, 'async' => $async, + 'id' => $id, )); } - public static function appendScript ($url, $cond = false, $defer = true, $async = true) { + public static function appendScript ($url, $cond = false, $defer = true, $async = true, $id = '') { self::$scripts[] = array ( 'url' => $url, 'cond' => $cond, 'defer' => $defer, 'async' => $async, + 'id' => $id, ); } |
