Created
June 30, 2015 14:21
-
-
Save clintonhalpin/2826f184b2387a458c0c to your computer and use it in GitHub Desktop.
Neck b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "MyExtension", | |
"version": "1.0", | |
"manifest_version": 2, | |
"description": "Turn your avatar into a neckbeard", | |
"permissions": ["tabs", "http://*/*"], | |
"content_scripts": [ | |
{ | |
"matches": ["https://twitter.com/*", "https://github.com/*"], | |
"js": ["scripts.js"] | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(location.origin === "https://twitter.com") { | |
document.getElementsByClassName('DashboardProfileCard-avatarImage')[0].setAttribute('src', 'https://royal-crate.surge.sh/beard.JPG'); | |
} else if(location.origin === "https://github.com") { | |
var avatars = document.getElementsByClassName('avatar'); | |
console.log(avatars); | |
for(var i = 0; i < avatars.length; i++) { | |
console.log(avatars[i]); | |
avatars[i].setAttribute('src', 'https://royal-crate.surge.sh/beard.JPG'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment