jerone / UserScripts

šŸµ My UserScripts
https://github.com/jerone/UserScripts#readme
GNU General Public License v3.0
339 stars 39 forks source link

(Twitter profile retweets hider) no longer hides retweets in profiles #36

Closed darkred closed 9 years ago

darkred commented 9 years ago

The script no longer hides retweets in profiles. I use Firefox 33.1.1 with GM 2.3 and v2 of the script.

That's what appears in Browser Console (if it's relevant):

unsafeWindow.$ is not a function Twitter_profile_retweets_hider.user.js:117

jerone commented 9 years ago

Actually, all my scripts stopped working in GM because of that error. The problem appears to be that unsafeWindow is undefined. I don't know how that happens. The scripts work in Scriptish. I couldnā€™t find any related issues on GM issues.

darkred commented 9 years ago

I've found this in https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/

Greasemonkey Version 2.0 Released June 17, 2014 Backwards incompatible changes:

  • For stability, reliability, and security the privileged sandbox has been updated to match the new changes to unsafeWindow for the Add-on SDK.
    In order to write values to unsafeWindow you will need to use the new methods cloneInto(), exportFunction(), and/or createObjectIn().
    ...

Otherwise, these changes will break some scripts. These scripts will need to be updated to work correctly again. We don't take breaking changes lightly. It's been just under two years since version 1.0 when we last introduced major changes, and it these particular changes are both important and valuable in the long run.

darkred commented 9 years ago

I just tried the script in Scriptish (both latest stable 0.1.12 and nightly 2014-11-20 with Firefox 35.0.1 stable) and it doesn't work neither- the same error is shown in Browser Console: ReferenceError : unsafeWindow is not defined twitterprofi: ...117

jerone commented 9 years ago

I'm open for a PR. Otherwise I'll probably deprecate both Twitter scripts as I have no use for both scripts.

darkred commented 9 years ago

I've tried a lot (with my limited javascript knowledge) to properly convert the forementioned line, but without any success.

darkred commented 9 years ago

The script works ok now (using FF38.0.5 with GM 3.2).