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:
parent
bf85c8d383
commit
f64ca567bd
27
content.js
27
content.js
@ -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);
|
||||
|
@ -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"]
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user