Skip to content

Commit

Permalink
Fix domain access
Browse files Browse the repository at this point in the history
  • Loading branch information
Semper-Viventem committed May 17, 2024
1 parent f077693 commit 978cd4a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion content.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
margin: 0;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 50%;
transform: translate(-50%, -50%);
}
8 changes: 5 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Twitter Bird",
"description": "Extension which returns the Twitter bird icon back",
"version": "1.1",
"version": "1.2",
"action":
{
"default_icon": "images/icon_512.png"
Expand All @@ -20,7 +20,8 @@
],
"matches":
[
"https://twitter.com/*"
"https://twitter.com/*",
"https://x.com/*"
]
}
],
Expand All @@ -33,7 +34,8 @@
],
"matches":
[
"https://twitter.com/*"
"https://twitter.com/*",
"https://x.com/*"
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions scripts/content.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//const homeIcon = document.querySelector("div.css-901oao.r-1awozwy.r-18jsvk2.r-6koalj.r-18u37iz.r-16y2uox.r-37j5jr.r-a023e6.r-b88u0q.r-1777fci.r-rjixqe.r-bcqeeo.r-q4m81j.r-qvutc0");
console.log("twitter-bird " + document.readyState);

waitForElm("a[aria-label='X']").then((homeIconContainer) => {
waitForElm("a[aria-label=\"X\"]").then((homeIconContainer) => {
console.log("twitter-bird element is ready");
removeAllChildNodes(homeIconContainer);

Expand All @@ -14,8 +14,8 @@ waitForElm("a[aria-label='X']").then((homeIconContainer) => {
console.log("twitter-bird " + birdIconLink);

birdIcon.src = birdIconLink;
birdIcon.height = 50;
birdIcon.width = 50;
birdIcon.height = 32;
birdIcon.width = 32;
birdIcon.classList.add('centered-element-a');;

homeIconContainer.appendChild(birdContainer);
Expand Down
Binary file modified twitter-bird.zip
Binary file not shown.

0 comments on commit 978cd4a

Please sign in to comment.