1
0
mirror of https://github.com/thebaer/MMRA synced 2024-11-13 10:11:01 +00:00

Update manifest permissions to match medium url

This commit is contained in:
Roman Telicak 2018-03-07 20:04:32 +01:00
parent bf85c8d383
commit f64ca567bd
2 changed files with 15 additions and 18 deletions

View File

@ -58,24 +58,21 @@ var observer = new MutationObserver(function(mutations){
mutations.forEach(function(){
makeReadable();
shrinkHeaderImages();
});
});
});
var config = {attributes: true};
// Only run this on Medium sites.
if (document.querySelector('head meta[property="al:ios:app_name"][content="medium"]')) {
makeReadable();
shrinkHeaderImages();
makeReadable();
shrinkHeaderImages();
chrome.storage.sync.get(null, function(items) {
if (items.hideDickbar) {
hideDickbar();
}
if (items.disableLazyImages) {
disableLazyLoading();
}
});
chrome.storage.sync.get(null, function(items) {
if (items.hideDickbar) {
hideDickbar();
}
if (items.disableLazyImages) {
disableLazyLoading();
}
});
observer.observe(document.body, config);
}
observer.observe(document.body, config);

View File

@ -16,17 +16,17 @@
"chrome_style": true
},
"icons": {
"128": "icon.png"
"128": "icon.png"
},
"browser_action": {
"default_icon": "icon.png"
},
"permissions": [
"storage", "https://*/*"
"storage"
],
"content_scripts": [
{
"matches": ["https://*/*"],
"matches": ["https://medium.com/*"],
"js": ["content.js"]
}
]