Someone mind adapting this for Opera?

Forums » General Opera topics » User JavaScript

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

11. April 2010, 23:05:33

Quadunit404

Someone

Posts: 366

Someone mind adapting this for Opera?

The other two scripts related to this work under Opera. This one doesn't. I would like it if this script were adapted for Opera, because it would help avoiding bad videos.
Go to ExtendOpera.org for all your customization needs.

12. April 2010, 21:44:32 (edited)

Frenzie

Posts: 15541

Add the following at the top of the script underneath the //userscript stuff.
if (typeof unsafeWindow == 'undefined') {
    var unsafeWindow = window;
}
The DnD Sanctuary — a safety net for My Opera's demise.

12. April 2010, 19:27:32

cremoso

Posts: 1061

Oh Frenzie, thank you very much!! This is going to be very useful, I'll try with other scripts too.

12. April 2010, 19:55:45

Avola

Posts: 577

Originally posted by Frenzie:

Add the following at the top of the script.



I still doesn't work for me. worried

12. April 2010, 20:43:30

Frenzie

Posts: 15541

Originally posted by cremoso:

Oh Frenzie, thank you very much!! This is going to be very useful, I'll try with other scripts too.


Also see http://www.howtocreate.co.uk/operaStuff/userJavaScript.html#gmfunctions
I don't personally use it anymore since I adapted the Textarea Backup script to function without GM functions, but if you think a certain GM script is really interesting it could just be the answer.

Originally posted by Avola:

I still doesn't work for me. worried


When I said top I didn't mean the very top of the file (where you have the //userscript stuff), but right underneath that, although technically you don't need to declare it until line 100 or whatever. That said, I think there's only one occurrence of unsafeWindow in the script, so you could just replace that with window. The method I used will preserve GM compatibility, however. If I were writing a script myself and I'd use window for some reason I'd add the reverse on top of the file for GM compatibility. p
The DnD Sanctuary — a safety net for My Opera's demise.

12. April 2010, 21:03:06

cremoso

Posts: 1061

Originally posted by Avola:

I still doesn't work for me. <img src=" width="17" height="17">


Mmm... just like Frenzie said, don't put it at the very top of the script. It worked for me:

estrellas1.PNG
estrellas2.PNG

12. April 2010, 21:21:48

Avola

Posts: 577

Originally posted by Frenzie:

When I said top I didn't mean the very top of the file (where you have the //userscript stuff), but right underneath that, although technically you don't need to declare it until line 100 or whatever. That said, I think there's only one occurrence of unsafeWindow in the script, so you could just replace that with window.


Yeah, that's what I did. Tried replacing the single occurrence too, but to no avail. Does it only work on the new Youtube design? I'm still on the old one.

12. April 2010, 21:45:40

Frenzie

Posts: 15541

I guess that'd be it. I thought everyone had been switched over by now? My wife's had the new design for months; I've had it since this week or last week or something and from all the stuff about it on Twitter I assumed the layout was out of the testing phase now.
The DnD Sanctuary — a safety net for My Opera's demise.

12. April 2010, 22:00:41

Avola

Posts: 577

I was automatically switched over to it too on April 1, but I cleared my cookies to bring back the old design. Can't stand that awful new design. I guess it's just a matter of time before I'm forced to use it though. bomb

12. April 2010, 22:08:56

Frenzie

Posts: 15541

I think it's missing some elements (star rating system for instance), but other than that it seems an improvement.

Admittedly I usually only bothered rating stuff I liked, so I'd usually only vote 4 or 5 stars, but I feel that especially the "meh" gradation is lost this way. A roughly equal number of up and down votes may have a similar result while looking at a list of videos (note that this is not present), but a bunch of stars makes it obvious real easy.

Anyway, that would seem to be essentially what this script does.
The DnD Sanctuary — a safety net for My Opera's demise.

12. April 2010, 22:50:15

Quadunit404

Someone

Posts: 366

Somebody mind providing me with a copy of this script with the Opera compatibility? Because I'm having a bit of trouble with that. Yes, I am placing it the top, underneath the //UserScript == stuff.
Go to ExtendOpera.org for all your customization needs.

13. April 2010, 02:02:56

Nailz

Posts: 754

Originally posted by Quadunit404:

Somebody mind providing me with a copy of this script with the Opera compatibility? Because I'm having a bit of trouble with that. Yes, I am placing it the top, underneath the //UserScript == stuff.


youtube-related-ratings.user.js

13. April 2010, 20:41:01

Quadunit404

Someone

Posts: 366

Originally posted by Nailz:

Originally posted by Quadunit404:

Somebody mind providing me with a copy of this script with the Opera compatibility? Because I'm having a bit of trouble with that. Yes, I am placing it the top, underneath the //UserScript == stuff.


youtube-related-ratings.user.js

Thank you smile
Go to ExtendOpera.org for all your customization needs.

15. April 2010, 20:53:12

Avola

Posts: 577

OK so now that we've been forced to use the new design these scripts are pretty helpful. But is it possible to get the ratings back on the frontpage as well (recommended for you, featured videos, etc)?

17. April 2010, 04:01:15

Quadunit404

Someone

Posts: 366

Not yet. If I knew JavaScript I could probably modify their source code to show the ratings on the main page, video response page, and whatever other page that is not on my mind right now. If I do manage to do so, I'll upload it to ExtendOpera. But I are noob at scripting, please try again after the beep. Beep.

Joking aside, "Most Liked" isn't really a good description of how GOOD a video actually is. It just tells you that a lot of people liked it. Not how many people liked it, not how many people rated it, not the quality of the video, just that it was liked a lot. Real descriptive, isn't it?
Go to ExtendOpera.org for all your customization needs.

18. April 2010, 14:22:27

dertbox

Posts: 832

I'd love to see yousabletube for opera updated, it's been broken since the site changed.

Forums » General Opera topics » User JavaScript