Autofull Inoreader For Safari

Automatically load full content article in Inoreader for Safari

当前为 2024-01-25 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Autofull Inoreader For Safari
  3. // @namespace aytacesmebasi
  4. // @version 1.0
  5. // @description Automatically load full content article in Inoreader for Safari
  6. // @author aytacesmebasi
  7. // @match https://www.inoreader.com/all_articles
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. //----- configure (change as desired) -----
  12. const waitTime = 200; // time in ms to wait for page load (1 sec: 1000ms)
  13. //-----------------------------------------
  14.  
  15. // Check and load full article if "article_dialog" is visible
  16. function checkAndLoadFullArticle() {
  17. try {
  18. const articleDialog = document.getElementById('article_dialog');
  19. if (articleDialog && window.getComputedStyle(articleDialog).display === 'block') {
  20. const button = document.querySelector('.icon-article_topbar_mobilize_empty');
  21. if (button) {
  22. button.click();
  23. }
  24. }
  25. } catch (err) {
  26. console.log('An error occurred:', err);
  27. }
  28. }
  29.  
  30. // Run the check on page load and at regular intervals
  31. setInterval(checkAndLoadFullArticle, waitTime);
  32. checkAndLoadFullArticle();