Просмотр исходного кода

Allow extension configurations to use select-input-changer (#8721)

Useful for https://github.com/FreshRSS/Extensions/pull/456
Alexandre Alapetite 3 недель назад
Родитель
Сommit
62b7dc37fe
2 измененных файлов с 8 добавлено и 0 удалено
  1. 1 0
      app/views/extension/index.phtml
  2. 7 0
      p/scripts/config.js

+ 1 - 0
app/views/extension/index.phtml

@@ -94,3 +94,4 @@
 <a href="#close" id="close-slider">
 	<?= _i('close') ?>
 </a>
+<script src="../scripts/config.js?<?= @filemtime(PUBLIC_PATH . '/scripts/config.js') ?>"></script>

+ 7 - 0
p/scripts/config.js

@@ -61,4 +61,11 @@ function onchange_maxNumbersOfAccounts(ev) {
 init_selectInputChanger();
 init_maxNumbersOfAccountsStatus();
 
+const slider = document.getElementById('slider');
+if (slider) {
+	slider.addEventListener('freshrss:slider-load', function (e) {
+		init_selectInputChanger();
+	});
+}
+
 // @license-end