Browse Source

Rename

new-api
Luke Childs 6 years ago
parent
commit
c7057c0fca
  1. 4
      manifest.json
  2. 4
      readme.md
  3. 8
      src/content.js

4
manifest.json

@ -1,8 +1,8 @@
{
"name": "Coinbias",
"name": "Coinflict of Interest",
"version": "0.0.1",
"description": "Show user biases on crypto Twitter.",
"homepage_url": "https://github.com/lukechilds/coinbias",
"homepage_url": "https://github.com/lukechilds/coinflict-of-interest",
"manifest_version": 2,
"minimum_chrome_version": "36",
"content_scripts": [

4
readme.md

@ -1,6 +1,6 @@
# Coinbias
# Coinflict of Interest
> Show user biases on crypto Twitter.
> Browser extension to show user biases on crypto Twitter.
## License

8
src/content.js

@ -22,14 +22,14 @@ const getData = async username => {
const preloadTweetData = () => {
Array.from(document.querySelectorAll('.tweet')).forEach(tweet => {
if (tweet.dataset.coinbiasPreloaded) {
if (tweet.dataset.coinflictPreloaded) {
return false;
}
const username = tweet.dataset.screenName;
getData(username);
tweet.dataset.coinbiasPreloaded = true;
tweet.dataset.coinflictPreloaded = true;
});
};
@ -39,10 +39,10 @@ const injectChart = async () => {
const profileHoverContainer = document.querySelector('#profile-hover-container');
const profileCard = profileHoverContainer.querySelector('.profile-card');
if (!(profileCard && !profileCard.dataset.coinbias)) {
if (!(profileCard && !profileCard.dataset.coinflict)) {
return;
}
profileCard.dataset.coinbias = true;
profileCard.dataset.coinflict = true;
const username = profileCard.querySelector('[data-screen-name]').dataset.screenName;
const data = await getData(username);

Loading…
Cancel
Save