Skip navigation.

web:config

tips and tricks for the interwebs

Plugsome Toolbar

, , , ,

I present you, right from xErath labs, beign these a two year old laptop (which works just fine), the "Plugsome Toolbar" user javascript. It's fairly simple to use, and very useful.
In the screenshot that follows you can have an idea of what it does::cool:



This script is an utility that add a small toolbar to plugins in webpages.:raider:
The toolbar by default has 3 buttons:
  • the 1st button is a Reload button which reload the plugin content
  • the 2nd button is a link to the external file that the plugin loaded. Somefiles might get special treatment, like in youtube. Instead of linking to youtube's media player swf, the script links to the video file. Click this link to save the file.
  • the 3rd button is a X which if clicked closes the toolbar, and if double-clicked removes the toolbar and plugin from the page. The space that the plugin occupied is preserved though.
The toolbar is dimmed by default, and it'll highlight when you hover it.
If the toolbar is attached to a Flash file, then you get two extra buttons: a play and a pause button. Note however, that play and pause might not pause/resume plyback in all flash files. This is due to the file's internal structure, and the way content is layed out in the Flash's timeline.

Download link:
xerath-plugsome-toolbar.js
Further updates will be annouced, the link above will point always to the latest version.

Technical details
The script applies different treatment to differents objects in different websites, when returning the link of the file feed to the plugin.
The script already support youtube.
To add your custom behavior for a specific website, the user script exports a small interface.

All functions and variables are grouped in the opera.PlugsomeToolbar object.
The object has the following properties:
  • version - script version
  • URLHandlers - an object with host names and custom functions to apply to a html OBJECT or EMBED to have the link that is available in the toolbar.
  • URLHandlerFallback - a fallback function that should be called when custom functions in URLHandlers require to work asynchronously, but fail to retrieve the file url
  • AllToolbars - an array with all the instantiated toolbars in the current page.
The object looks like this:
a.PlugsomeToolbar = {
    version: '1.0',
    URLHandlers: {'a':...}
    URLHandlerFallback: function(){...},
    AllToolbars: [...]
};

To code your own website rule, do something like this:
opera.PlugsomeToolbar.URLHandlers['.youtube.']=function(object, link){
    var fv = object.getAttribute('flashvars');
    if( fv ){
        /* ... */
        link.href = 'http://www.youtube.com/.....';
        return true;
    };
};
You can, and should place it in another file, because that way you can easily upgrade Plugsome Toolbar without loosing functionality.
The functions in URLHandlers receive 2 arguments, the plugin and the toolbar link to fill in the href. Each function returns true or false, respectively, in case of success or fail. The script, for each plugin, loops through all rules and aborts when one returns true, meaning that the link is known.



cow You might find the name "Plugsome Toolbar" familiar. The original one was invented to feed hype for a specific piece of software, when others did the same thing that the former advertised.
But we're not here to talk about Firefox,... whoops, I said it... :whistle:

EDIT (2008-June-11)
New update, version 1.0.2.

Changelog:
  • Option to show toolbar when plugins are disabled
  • Added Quicktime and windows media player controls toolbar
Note: the quicktime controls may not work in. It seems quicktime scripting is broken in Opera. But the work is done, until Opera get fixed.

Url filters - The Discipline of Annoyance & DemiseSQL challenge

Comments

Darken 30. May 2008, 03:36

Wow, nice works!

FataL 30. May 2008, 05:27

Nice! :up:
But Pause and Play don't work for me (Opera 9.5.10014)

kyleabaker 30. May 2008, 06:27

Nice!

EDIT:
Same results as FataL. It doesn't play or pause at:
http://kyleabaker.com/2008/05/29/facebook-gangsta-funk/

serious 30. May 2008, 06:57

can't download the file :frown:

Originally posted by http://files.myopera.com/xErath/files/xerath-plugsome-toolbar.js:

Warning

You should only open this file if you trust the person who referred it to you!

Opera Software ASA is not responsible for any files, images, code, other materials, or other information or content posted on our websites by our users and does not monitor, investigate, or verify that such websites or content contained on our websites is accurate, complete, or in accordance with relevant laws and third-party rights.

If you’re certain that the file you’re trying to access is not harmful in any way, and you know the person who referred you, then simply click on this link to advance:


and if I klick on "Download file" I just get the same thing again and again and again (and a number string is attached to the url each time)

E1: argh, those b****** require referrer info. now it works *checking it out*

E2: Really nice. Will you post updates to the script here in your log so I get an rss message? ^^

Zybex 30. May 2008, 08:46

It will be great to add 'download' option for content.
Download .flv files from youtube for example.

xErath 30. May 2008, 09:12

Will you post updates to the script here in your log so I get an rss message?

Yes.

It will be great to add 'download' option for content.
Download .flv files from youtube for example.


That's what Link does. Click it.

Thanks for the comments :smile:

GT500 30. May 2008, 21:25

Any thoughts of incorporating ideas from this?

d.i.z. 30. May 2008, 21:25

This tc seems to trick out script http://mikrokoszalin.pl/opbugs/flash_position.html
Almost impossible to find toolbar there. Doing different stuff will eventually show toolbar for right embed.

If it works on first try, try reloading.

_Grey_ 31. May 2008, 17:57

Hmm, doesn't work for me on youtube. Did a sample search on youtube for "bla" and picked the first video coming up.

"Link" gives me a swf (probably the player, without any video loaded), reload never ends, play and pause don't work. Using Opera 9.2x.

Good idea, though :up:

serious 1. June 2008, 07:16

reload, link and x work for me in 9.5. regarding play/pause see xErath's original post:

Note however, that play and pause might not pause/resume plyback in all flash files. This is due to the file's internal structure, and the way content is layed out in the Flash's timeline.

Yndi 1. June 2008, 08:53

Thanks, but the 3 standard buttons don´t work for me on youtube.
Opera 9.5 b10034

xErath 2. June 2008, 03:33

Here you have a small demo showing off the Pause/Play button for Flash.

plugsometest.html

Unfortunately, Pause/play will never work for video players, but that's a Flash limitation. Those button will only control Flash's main timeline.

Sweet17th 2. June 2008, 17:07

Hai Xerath..
it seems that "THE YELLOW LINE" is missing again..it's about 2 days ago..(now is June 1st, '08)
can u fix it..please..coz i used it very often (i like it)..and it help me a lot for downloading video from youtube..
oh, i used OPERA 9.25 and "userjs/videoscript.js" plugins.
Anyway Thanks 4 your help.

Cann't wait to see that friendly yellow line again on youtube.. ^_^

xErath 2. June 2008, 22:22

Cann't wait to see that friendly yellow line again on youtube.. ^_^

Please post that in the forums. You can get help from other people too.:wink:

dapxin 3. June 2008, 00:01

one word. brilliant !

As we say here in Lagos - Scraaaaaaaaaabada to you !

Yndi 3. June 2008, 13:18

ok, allright.

The testsite works just fine.

Sweet17th 4. June 2008, 16:56

"Cann't wait to see that friendly yellow line again on youtube.." ^_^
Please post that in the forums. You can get help from other people too.

Hehe..anyway..who knows better than the creat0r 1tself..
Oh well..now i have already used your new "plugsometoolbar".
On the 1st try, i didn't know how to use it..but when i clicked "back" button and "forward" button on youtube page which i would like to download..the toolbars button appeared..!!

Is that how it work?
Click back and forward to make your toolbar appear?
(it is still great anyway!!) ^_^ ~ bravo..!!

xErath 4. June 2008, 20:36

Is that how it work?
Click back and forward to make your toolbar appear?


No, just hover it. The toolbar always appears in the top left corner of a plugin, but it's dimed by default.

philry4n 7. June 2008, 14:15

so the toolbar won't show if i disabled the plugin?

xErath 11. June 2008, 22:42

New update, version 1.0.2.
Changelog:
  • Option to show toolbar when plugins are disabled
  • Added Quicktime and windows media player controls toolbar
Note: the quicktime controls may not work in. It seems quicktime scripting is broken in Opera. But the work is done until it works.

philry4n 12. June 2008, 01:04

:up:

serious 12. June 2008, 08:02

where? the download above reads version: 1.0.1
or did you just forget to replace the version number? ^^

xErath 12. June 2008, 22:31

or did you just forget to replace the version number? ^^


Homer: Doh!

philry4n 13. June 2008, 01:36

:lol:

serious 13. June 2008, 06:02

Forbidden

You don't have permission to access /xErath/files/xerath-plugsome-toolbar.js on this server.

:frown: the 9.5 release really screwed with the servers. everything is slow and buggy atm :sherlock: :wait:

planetrock 16. June 2008, 14:57

How do I install this? I see the download link but what do I do? Where do I save it and how do I run it?

thanks

LBob 19. June 2008, 21:57

Excellent script, thanks for sharing it with us !

DonVla 20. June 2008, 02:50

strange,
the link button just opens the video in a full vindow player.
right click -> save content/link saves nothing or only the googleplayer.

HaJotKE 20. June 2008, 11:52

Can't find V1.0.3... :frown:
Downloading always gives V1.02 (which even has two version #, 1.0 also).

Please check. p:

xErath 26. June 2008, 16:56

Homer: Doh! my bad.. again.. it's version 1.0.2

philry4n 30. June 2008, 00:49

:lol: Homer: Doh!

Orlin 2. September 2008, 18:24

Hi,
I just installed the script and I really liked it. I have a problem, that there are a few web sites, that are not supported. From the source code I read I understand that each such website should be handled for itself. I am ready and willing to help to expand the supported websites, the problem is I dont know how to find out which is the URI for downloads. If you can teach me I will help.

There is another thing that I would love to have. Apperantly we all know how *good* the flash implementation is, especially for linux. So a great idea would be to actualy make so, that there is a new button, like "save and play", which allows you to start saving the file and playing it with for example mplayer.
Thank you again

maturefan 3. September 2008, 10:52

great plugin!

Jurgi 13. April 2009, 06:07

I just tried it and it's really useful.

Originally posted by xErath:

the 3rd button is a X which if […] double-clicked removes the toolbar and plugin from the page.


Another button would be more handy than double-click.

But I've found a bug? The 'link' button does not work properly on YouTube content, when embedded on other site. Or maybe is it a conflict with CSS+JS Flash Blocker, but I don't think so. Here I have the problem, instead of downloading, the script opens content in a strange way.

xErath 13. April 2009, 15:55

Originally posted by Jurgi:

The 'link' button does not work properly on YouTube content, when embedded on other site.


Yes, I know that, and I'll fix it when I have the chance.

LZ2SDC 30. April 2009, 20:09

Thanks for a great JS! :up:
Can you make an easier way to add new sites with flash videos. In the current version, I do not know how to do it? :confused:

Until now I have not found universal application that works for all sites.
I hope in the Opera-10 has built-in option for downloading flash video. :rolleyes: :heart:

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

Download Opera, the fastest and most secure browser