Greasy Fork 支持简体中文。

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.

發表回覆

登入以回復