Opera-10: put a script in your pocket!
Thursday, 17. September 2009, 14:50:54
Didn't it intrigue you when I wrote about difficult downloads of videos from a.o. YouTube when using Opera-10? Well, I wrote that and was intrigued myself. 'Download widgets' that lead me to sites trying to persuade me using FireFox instead or else produce errors are such things. There had to be a better way and there is: using a script. Opera allows using scripts, even on my Ubuntu operating system. So my experiences relate to that. However, many do not know scripts for Opera exist. They are so rare, that in the Opera program folder no trace of it can be found. For FireFox however there exist an abundancy of good scripts to perform various useful extra functions. Some of them may work in Opera-10 as well...
Setting up scripts in Opera-10 is simple. Just press Ctrl+F12 or use the Tools menu-> Preferences-> Advanced-> Content-> JavaScript Options (right button) to see in below: 'User JavaScript files'. Here you can choose the folder where your 'xyz.user.js'-scripts reside. But there is no such folder, so you must make one to receive the downloaded script that you will find in abundancy here.
In Ubuntu you can make a script folder in your /Home folder and there within the invisible .opera folder. So open your /Home folder and press Ctrl+H to see those invisible items. I made a new folder and called it: 'scripts'. Since I wanted to work with YouTube and get some more options there, bypassing some complications, I selected a very handy FireFox script that works with a few limitations also with Opera-10. Although Opera's User JavaScript event listeners and magic variables/functions may offer several advantages over FireFox Greasemonkey's more simplistic approach, but Greasemonkey offers a few features that Opera's User JavaScript does not have, we must install a 'converter'-script to adapt scripts. It is called "Emulate GM functions" and can be found here. Just download the page 'as is' under its name: aagmfunctions. This name with 'aa' upfront is important then it will load prior to all other FireFox GreaseMonkey scripts for Opera-10! Don't change the name for that reason. Next drag and drop aagmfunctions.js in your new 'scripts' folder in the .opera folder.
You now may find a YouTube Enhancer script that offers a variety of changes to the standard, cluttered YouTube pages. You can find that script here and see/read about its options. Amongst others downloading movies directly from within the browser, no widget access required. After downloading 'YouTube Enhancer' you follow the same procedure as before: drag 'n drop the youtube_enhancer.user.js into your Opera 'scripts' folder. Then restart the browser. In Ubuntu the same applies to FireFox, where in /Home you'll find a hidden .mozilla folder for that browser and within its '...default folder will be a gm-scripts folder for scripts. Provided you use the GreaseMonkey addon!
If you have both Opera-10 and FireFox do see these scripts first in FireFox. Go to a movie in YouTube and see the many new controls at the page. Mind also the download button top right in the bar above the movie. Shouldn't you hear sound or see some other anomaly it may mean you need to switch to a lower quality (Flash .flv for instance) with the buttons left below the viewing window. Not all movies have a higher or very high quality.
Now we do the same test with Opera-10. Since the way Opera works is different, we do see that. Annoying even, because it relates to the control-bar just under the viewing window: drawn 'icons' are failing, but the 'Help' function on 'mouse-over' still works. That way we can still see which square means what. It's a pity that these little details were overlooked in Opera.
This demonstrates though that Opera-10 can use GreaseMonkey scripts. At the Userscripts website you'll find far more useful items, but see to it that they are indicated to work under Opera as well. Of course you could view the above movie on 'Quietube', when embedding were allowed of course. Pitfalls are many in the multimedia world! Have fun scripting with Opera-10.
PS. I came across OperaFan who has lots of interesting Opera-related info to digest.
Update: I mentioned that the play-buttons in the YouTube Enhancer script were not visible. I investigated this. It then occurred to me that this is intermittently so! When you toggle (a few times!) the Reload button to renew the downloaded page, this also resets the Script. It now -intermittently- shows the play button drawings (they aren't icons). Important to denote is, that at the top of the preview window (just left from the title window, r.click picture to view and see text with "101 East Chinese") sits an Options Button for simple enhancements or (to its right) 'General Options', producing a vast list with customizable presets! In the middle of that you'll find "Buffering: video load..." which I set to 10% to prevent stutters in the playback. It also means you'll have to wait a few seconds before a movie starts rolling!
John














Aadil # 15. September 2009, 22:25
although I'll need to use the terminal to add folders as this installation doesn't give me the prerequisite permissions from the graphical file manager!
But that's a good thing in a way since it forces me to learn more!
Angeliki # 16. September 2009, 00:57
I know the genius members of Opera will appreciate it very much!
scott cumming # 16. September 2009, 04:36
Dr. John v. Kampen # 16. September 2009, 05:58
@angeliki & scott: it's simply digging yourself in a few hours in a problem and (trying to) solve it. That is what I describe here. Setting up scripts is as you read really simple. You might even use my DropBox to collect the scripts here and unZIP the archive. Put those bloody .js script anywhere in some folder of your name and point Opera/FireFox as described above to that folder. Restart and you are on... That's it.
Like drinking your first beer, eating your first icecream (with chocolate) or having your first sex...
Aadil # 16. September 2009, 06:07
Dr. John v. Kampen # 16. September 2009, 06:08
Dr. John v. Kampen # 16. September 2009, 06:10
Aadil # 16. September 2009, 06:18
Dr. John v. Kampen # 16. September 2009, 06:38
Angeliki # 16. September 2009, 14:50
Originally posted by nepmak2000:
those need no brains
Originally posted by nepmak2000:
* 100 points extra to the brainy man! *
Dr. John v. Kampen # 16. September 2009, 19:44
Aadil # 16. September 2009, 23:16
Dr. John v. Kampen # 17. September 2009, 14:28