TheOldReader - add links & full screen

Improve TheOldReader RSS feed reader interface

当前为 2018-06-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name TheOldReader - add links & full screen
  3. // @description Improve TheOldReader RSS feed reader interface
  4. // @namespace https://greasyfork.org/ro/scripts/37253
  5. // @include *theoldreader.com*
  6. // @include https://theoldreader.com/feeds/*
  7. // @grant GM_addStyle
  8. // @version 1.3
  9. // ==/UserScript==
  10.  
  11. // Changes to interface
  12. // =============================================================
  13.  
  14. GM_addStyle ( ".navbar-fixed-top { top: -55px !important}"); // hide header
  15. GM_addStyle ( ".reader .body-fixed-top { top: -10px !important; }"); //lift article reading area
  16. GM_addStyle ( ".static .page-header { margin-bottom: 2px; display:inline-flex; }"); //change feed identifying area
  17. GM_addStyle ( ".page-header { margin-top: 22px; }"); //change feed identifying area
  18. GM_addStyle ( ".reader .floating { background: #dcdcdc; padding: 3px 0 5px 0; }"); //change feed identifying area
  19. GM_addStyle ( ".floating { padding-left: 10px !important; padding-right: 10px !important; }"); // add some space
  20. GM_addStyle ( ".static .page-header h1 { font-size:16px; }"); //****
  21. GM_addStyle ( ".page-header .feedtop-buttons { padding-right:20px; }"); //****
  22. GM_addStyle ( ".cell.sidenav-cell { top: -21px !important; }"); //lift feed summary area from the left
  23. GM_addStyle ( ".sidebar .nano { 106% !important; }"); //not working
  24.  
  25. GM_addStyle ( ".well { background:none; }"); //eliminate grey background
  26. GM_addStyle ( ".post .btns { display:none; }"); //eliminate share buttons at the end of some articles
  27.  
  28. //GM_addStyle ( "a.dropdown-toggle { background-color: teal; top: 60px; }"); //eliminate share buttons at the end of some articles
  29.  
  30. GM_addStyle ( ".reader.has-notice .notice { padding: 0px !important; min-height: 0px !important }"); //hide notification
  31.  
  32.  
  33. GM_addStyle ( "XXXX { YYYY }"); //****
  34. GM_addStyle ( "XXXX { YYYY }"); //****
  35.  
  36.  
  37.  
  38. // Add links
  39. // =============================================================
  40.  
  41. document.getElementById("refresh-btn").addEventListener("click", myFunction);
  42.  
  43. myFunction();
  44.  
  45. var elemente = document.getElementsByTagName('strong');
  46. for (var j = 0; j < elemente.length; j++) {
  47. elemente[j].addEventListener("click",myFunction_cover );
  48. }
  49.  
  50. function myFunction_cover() {
  51. var titlu=document.getElementsByTagName("h1")[0].innerHTML;
  52. for(k=0;k<10;k++) {
  53. setTimeout(function(){
  54. var t=document.getElementsByTagName("h1")[0].innerHTML;
  55. if (t !== titlu) {
  56. //alert(k + ' / ' + titlu + ' // ' + t);
  57. myFunction();
  58. }
  59. } , 2000);
  60. }
  61. }
  62.  
  63. function myFunction() {
  64. var a, links;
  65. links = document.getElementsByClassName('well clearfix post listview');
  66. for (var i = 0; i < links.length; i++) {
  67. a = links[i];
  68. a.innerHTML=a.innerHTML.replace(/(<strong>)([^<]*?)(<\/strong>[\S\s]*?<h3 dir="ltr">)([\S\s]*?)(<\/h3>)/g , "$1$4$3$4$5");
  69. }
  70. }
  71.  
  72.  
  73.