From 4639b8e62805efef88fa74003b99aa84baccfdb3 Mon Sep 17 00:00:00 2001 From: yakisova41 Date: Sat, 18 May 2024 15:14:52 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20SPA=20icon=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extension/twitterManifest.json | 2 +- extension/userscript.user.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extension/twitterManifest.json b/extension/twitterManifest.json index 96ff21e..af4cc50 100644 --- a/extension/twitterManifest.json +++ b/extension/twitterManifest.json @@ -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", diff --git a/extension/userscript.user.js b/extension/userscript.user.js index 3f53a24..3807d63 100644 --- a/extension/userscript.user.js +++ b/extension/userscript.user.js @@ -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"); @@ -728,7 +728,10 @@ function main() { if (head !== null) { clearInterval(i); headFound(head); - replaceManifest(head); + + setTimeout(() => { + replaceManifest(head); + }, 100) } }); }