Make Medium Readable Again https://makemediumreadable.com
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

35 строки
986 B

  1. //
  2. // Make Medium Readable Again
  3. //
  4. var makeReadable = function() {
  5. // Un-position:fixed the top nav bar
  6. var topNav = document.querySelector('.metabar.u-fixed');
  7. if (topNav != null) {
  8. topNav.classList.remove('u-fixed');
  9. }
  10. // Remove the footer
  11. var getUpdatesBar = document.querySelector('.js-stickyFooter');
  12. if (getUpdatesBar != null) {
  13. getUpdatesBar.style.display = 'none';
  14. }
  15. };
  16. var hideDickbar = function() {
  17. document.querySelector('.js-postShareWidget').style.display = 'none';
  18. document.querySelector('footer > .container:first-child').style.display = 'none';
  19. };
  20. // Only run this on Medium sites.
  21. // Ensure that by checking for <meta property="al:ios:app_name" content="Medium"> in the document <head />
  22. var metaCheck = document.head.querySelector('meta[property="al:ios:app_name"]');
  23. if (metaCheck != null && metaCheck.content == "Medium") {
  24. makeReadable();
  25. chrome.storage.sync.get(null, function(items) {
  26. if (items.hideDickbar) {
  27. hideDickbar();
  28. }
  29. });
  30. }