Explorar el Código

Add basic MMRA Chrome extension

tags/v1.0
Matt Baer hace 6 años
padre
commit
fe18384ee0
Se han modificado 2 ficheros con 40 adiciones y 0 borrados
  1. +23
    -0
      background.js
  2. +17
    -0
      manifest.json

+ 23
- 0
background.js Ver fichero

@@ -0,0 +1,23 @@
//
// Make Medium Readable Again
//

var makeReadable = function() {
// Un-position:fixed the top nav bar
var topNav = document.querySelector('.metabar.u-fixed');
if (topNav != null) {
topNav.classList.remove('u-fixed');
}
// Remove the footer
var getUpdatesBar = document.querySelector('.js-stickyFooter');
if (getUpdatesBar != null) {
getUpdatesBar.style.display = 'none';
}
};

// Only run this on Medium sites.
// Ensure that by checking for <meta property="al:ios:app_name" content="Medium"> in the document <head />
var metaCheck = document.head.querySelector('meta[property="al:ios:app_name"]');
if (metaCheck != null && metaCheck.content == "Medium") {
makeReadable();
}

+ 17
- 0
manifest.json Ver fichero

@@ -0,0 +1,17 @@
{
"manifest_version": 2,

"name": "Make Medium Readable Again",
"description": "Neutralizes annoying parts of the Medium reading experience so it's more enjoyable to read things.",
"version": "1.0",

"permissions": [
"https://*/*"
],
"content_scripts": [
{
"matches": ["https://*/*"],
"js": ["background.js"]
}
]
}

Cargando…
Cancelar
Guardar