]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/Resources/static/themes/material/js/tools.js
Merge pull request #3526 from wallabag/add-random-article
[github/wallabag/wallabag.git] / app / Resources / static / themes / material / js / tools.js
index 39398fd8a4c0fb4a15fd5ce2750ada6f2ca0e3ec..0b3d303856a5b0b806390bd795fab6c00c5ac3a6 100644 (file)
@@ -8,6 +8,7 @@ function initFilters() {
     $('#clear_form_filters').on('click', () => {
       $('#filters input').val('');
       $('#filters :checked').removeAttr('checked');
+
       return false;
     });
   }
@@ -21,4 +22,15 @@ function initExport() {
   }
 }
 
-export { initExport, initFilters };
+function initRandom() {
+  // no display if export (ie: entries) not available
+  if ($('div').is('#export')) {
+    $('#button_random').show();
+  }
+}
+
+export {
+  initExport,
+  initFilters,
+  initRandom,
+};