Skip to content

Commit

Permalink
Merge pull request #29 from yakisova41/manifest-update
Browse files Browse the repository at this point in the history
🐛 Fix SPA icon change
  • Loading branch information
yakisova41 authored May 18, 2024
2 parents 2c3540f + 4639b8e commit 5eeedb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension/twitterManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
}
],
"short_name": "Twitter",
"start_url": "https://twitter.com/?utm_source=homescreen&utm_medium=shortcut",
"start_url": "https://x.com/?utm_source=homescreen&utm_medium=shortcut",
"theme_color": "#ffffff",
"scope": "/",
"android_package_name": "com.twitter.android",
Expand Down
7 changes: 5 additions & 2 deletions extension/userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ function trashSafari() {
* !! 拡張機能でのみ動作
*/
function replaceManifest(head) {
document.querySelector('link[rel="manifest"').remove();
document.querySelector('link[rel="manifest"]').remove();
const manifestEl = document.createElement("link");
manifestEl.setAttribute("rel", "manifest");
manifestEl.setAttribute("crossorigin", "use-credentials");
Expand Down Expand Up @@ -728,7 +728,10 @@ function main() {
if (head !== null) {
clearInterval(i);
headFound(head);
replaceManifest(head);

setTimeout(() => {
replaceManifest(head);
}, 100)
}
});
}
Expand Down

0 comments on commit 5eeedb9

Please sign in to comment.