I am doing a chrome extension that allows downloading images from Instagram (Save image as).
I already saw some similar questions but I didn't understand the answers. Here is the code: json:
{
"name": "Image Allower",
"version": "1.0",
"description": "Remove images from websites",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"manifest_version": 2
}
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Allow Images</title>
</head>
<body>
<button type="submit" align="center" style="width: 470px" id="button">Allow Download</button>
<script type="text/javascript" src="popup.js"></script>
</body>
</html>
js:
document.getElementById('button').addEventListener('click', remove);
function remove() {
document.querySelectorAll('._9AhH0').forEach(function(a){
a.remove();
})
}
(As you can see, I'm not very good at this... ) Thanks