X (Twitter) - own tweets

Adds a link to users' pages to search for tweets only from them (no retweets without comment).

< 脚本X (Twitter) - own tweets的反馈

提问/评论

§
发表于:2020-06-17
编辑于:2020-06-17

it only works on some twitter profiles...

Could you improve your script so it works well on all twitter profiles?

monnef作者
§
发表于:2020-06-17

I can try, but it's not easy, Twitter has almost everything obfuscated, so I have to use pretty unreliable stunts :(.

Could you please provide more details? What doesn't work? It doesn't show the link "own tweets", or the link doesn't work? Does it work after refreshing the user page? If it doesn't work on some user's profile consistently, could you please post here a link to their profile?

monnef作者
§
发表于:2020-06-17

I have discovered one quite rare case when the script didn't work, should be fixed now. Please update and try :).

§
发表于:2020-06-17
编辑于:2020-06-17

Hi, sorry for the lack of details on this thread.

The script doesn't show the link "own tweets" and i'm getting some errors whenever i visit an every random twitter profile for testing it. Even after refreshing the user page multiple times it doesn't work anymore!.

This time I get the error: "Uncaught TypeError: Cannot read property 'left' of undefined at work"

Twitter profiles where i have tested it already:

https://twitter.com/tiesto
https://twitter.com/BlogHogwarts
https://twitter.com/YourAnonNews

monnef作者
§
发表于:2020-06-17

Thank you for a detailed response. I see the problem, the script is relying on the fact that a follow button contains "follow" text (which is also in "unfollow" when you already follow someone). I know it's not a great solution, but the DOM structure of Twitter (after logging in) is very hostile to user scripts/styles.

It's kinda ironic, since my native language isn't English :D. Hopefully later today I'll fix the crash and see if I can add the follow string from your localization.

monnef作者
§
发表于:2020-06-17

I have modified targeting of the follow button, should be now more reliable across different languages (but may break more easily, twitter may remove the test attribute at anytime). But I don't know how to easily test it (previous and current version works for me in English localization), so please give it a try (after updating the script).

§
发表于:2020-06-17

Oops, i forgot to change my Display language, lol. And see, I also did suspect that "location" was the culprit here!, but i can confirm the script is working better now, ty. However, can you explain me why the script doesn't work on "verified" accounts such as Tiesto profile twitter and another accounts? (there are also another accounts without "verified" badge) (:

monnef作者
§
发表于:2020-06-18

Most likely picking element (the twitter handle) fails, because it's done in a visual way (it finds a box with user info and then looks at specific position inside the box to get the element with a handle, so it can inject a link to a correct place).

That's strange, it seems to work for me even after swapping a language ._.

发表回复

登录以发表回复。