Twitter Old Logo back - twitter.com

4/4/2023, 18:52:11

< 脚本Twitter Old Logo back - twitter.com的反馈

提问/评论

§
发表于:2023-04-06

What this software does:
1. Try to set an observer on the body (if it fails, set a timeout to prevent the replacement from failing even if it doesn't succeed immediately).
2. Select all xlinks with document.querySelectorAll('[*|href]:not([href])')
3. Replace the data:image link with the correct one (you can replace the twitter bird with whatever you like, just convert any image to base64).
4. Restart the script if the page location or scroll changes.

Version 1 only worked with setTimeout, page turning and scrolling, also I didn't find the original twitter image so I used a similar one.
Version 2 adds the rest and completes the script.

发表回复

登录以发表回复。