Development :
K-Meleon Web Browser Forum
K-Meleon development related discussions.
Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 23, 2003 05:22PM
This assumes that you have the Macromedia Flash plugin installed for KM. Tested using KM 8.1.
1. Download the Mozilla / Firebird extension package, "flashblock.xpi", from here:
http://ted.mielczarek.org/code/mozilla/flashblock.xpi
2. Rename the file to "flashblock.zip" and extract the contents somewhere.
3. Copy the file "flashblock.jar" (from the extracted files) to the KM chrome folder (e.g., C:\Program Files\K-Meleon\chrome).
Ps. You can delete the extracted files after you've copied flashblock.jar.
4. Add the following line at the bottom of the "installed-chrome.txt" file in the KM chrome folder:
content,install,url,jar:resource:/chrome/flashblock.jar!/content/flashblock/
Ps. Be sure to leave an extra (blank) line at the very bottom of the file.
5. Add the following lines to "userContent.css" (Edit->Preferences->Settings->userContent.css tab):
object[classid$="
27CDB6E-AE6D-11cf-96B8-444553540000"],
object[codebase*="swflash.cab"]
{ -moz-binding: url("chrome://flashblock/content/flash.xml#obj"); }
6. Exit from KM (and loader, if running) and then re-open the browser.
Check a site with Flash content (e.g., emuleplus.sf.net) and you should now see the 'click to view' box instead of the Flash content; when clicked the Flash content should load normally.
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
Andrew
Date: December 23, 2003 05:30PM
MonkeeSage,
Nice. Now if we could work out an easy way to import these extensions into K-Meleon...
Re: Flash Click to View for KM
Posted by:
Marc (@box.)
Date: December 23, 2003 07:12PM
Great.
One problem though, it does not handle flash animation not linked in an <object> tag.
embed[type="application/x-shockwave-flash"]
is valid, but the the xml addon can't handle it. (the animation is displayed, not the message)
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 24, 2003 05:13PM
Yeah, in Mozilla / Firebird the extension suffers from the same defect...only works with <object> tags. I'm not sure if the author is going to make it work with <embed> tags or not, I just thought it was fun to play with.
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
Andrew
Date: December 24, 2003 08:12PM
MonkeeSage,
Many of the Mozilla/FB extensions rely on modifying the interface so those won't import over into K-Meleon. But what about others that rely exclusively on their own XUL interfaces? Can K-Meleon support XUL display outside of a pop-up dialog? One thing I would like to see brought over from Mozilla/FB is the Googlebar. Maybe that would be a good plugin project? That's something I would be willing to help on if someone could get the basics started.
Re: Flash Click to View for KM
Posted by:
Marc (@box.)
Date: December 24, 2003 09:56PM
The extension that MonkeeSage has presented here is XUL. And it works without an interface. (if you try you'll see)
As for the GoogleBar, I don't see how we could use it. Unless someone finds a way for KM to talk directly to the XUL package. (but I came to KM because it doesn't need XUL for its interface
Re: Flash Click to View for KM
Posted by:
John
Date: December 24, 2003 10:24PM
MS :, Whats going on with the next version of chrome ?
Re: Flash Click to View for KM
Posted by:
Andrew
Date: December 24, 2003 10:44PM
Marc,
I realize that we probably can't use Googlebar directly. But it seems that we shouldn't have to reinvent the wheel either since so much of the coding has already been done. The trick seems to me is how to get the operational bits working in K-Meleon without necessarily having to use the XUL interface.
Re: Flash Click to View for KM
Posted by:
j
Date: December 24, 2003 11:20PM
I think you guys should come to a small compromise.
You know what would be kinda cool.
If the alternate box was an actual flash file. !
One big animated [ f ]
)
What you think ? What about doin something like this for adds as well .
Also ,
Is there a way to have a macro for this ? , Toggle Flash On/Off ?
Re: Flash Click to View for KM
Posted by:
John
Date: December 24, 2003 11:21PM
Is the sourcecode available for this file somewhere ?
Re: Flash Click to View for KM
Posted by:
J
Date: December 24, 2003 11:23PM
Hate to post 3 times in a row but ...
I notice in my travels there are more than 1 flash files sometimes.
Can a flash file "count" be done somehow ????????????
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 25, 2003 05:17AM
Andrew:
Sadly, the Googlebar and most other extensions are just XUL overlays into the main browser chrome -- in effect they are like snap-in pieces of code that get treated like they are part of the main chrome. So it could be ported very easily, in the same basic way as the Flash Click to View extension, and then called from the URL bar with the chrome:// pseudo-protocol, but it wouldn't be linked to any browser object and would basically just be the toolbar with blank space below it where the browser would normally be, and none of the functions would work as expected (if at all).
What could (possibly) be done is to take it's basic overlay framework and tweak it a bit, linking it to an iframe to act as the browser object, but I think it would be a pretty big undertaking. Another possibility would be to take the basic JavaScript functions that drive the overlay, convert them into macros and make a native KM toolbar to call the macros; but that would still take a little elbow grease to get it working I imagine. I'll have a look in the next few days and post a new thread if I come up with anything useful.
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 25, 2003 05:23AM
John:
Re: "Is there a way to have a macro for this ? , Toggle Flash On/Off ?"
I hate to say it, but not really, since the bindings are done in userContent.css; you'd need native File I / O in the macroing system so you could add or subtract the lines from userContent.css using a macro. But that isn't very likely to happen since it isn't necessary for most macroing stuffs.
Re: "Is the sourcecode available for this file somewhere ?"
The sources are inside the .jar file (which is just a .zip file with a different extension). You can extract it and have a peek behind the scenes if you like, but it probably won't be very meaningful unless you know about XBL bindings and JavaScript.
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
KAMiKAZOW
Date: December 26, 2003 02:11PM
Problem
Posted by:
KAMiKAZOW
Date: December 26, 2003 04:30PM
The reason I asked to modify Grayrest's version is that it doesn't work (at least for me).
If I click on the Flash field, the Flash file does not load.
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 26, 2003 04:52PM
Ah-ha! You're right, I didn't try clicking it....the Flash object just disappears...hmmm. Let me take a look at it. Probably can just take the images from Grayrest's and stick them in Ted's (working) version.
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
Marc (@box.)
Date: December 26, 2003 05:29PM
No problem if you remove "display:table-cell; " from the firs <div> tag. But then the image is not vertically aligned, and is 1-2 pixels too big. (wrong when in popups)
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 26, 2003 05:40PM
Marc:
Good call (again!).
Table-cell is not supposed to be used unless it is nested inside another element with display set to table (cf.
http://www.w3.org/TR/REC-CSS2/tables.html#q2); so I set the first div to display: table; and the second to display: table-cell;, then added verticle-align: middle; to the second div as well. Seems to work now, AFAICT.
I uploaded the 'fixed' version here:
http://gratisdei.com/flashblock.jar
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
Marc (@box.)
Date: December 26, 2003 05:48PM
I was about to release almost the same version (mine was using <table> and <td> tags).
Yours still need one modification: use "border: 0px; " in the first <div> tag. Currently the box is a bit too large.
Re: Flash Click to View for KM
Posted by:
Marc (@box.)
Date: December 26, 2003 05:58PM
And if you really like the border, you can simply place it in the second <div> tag (the cell): border: 1px solid;
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 26, 2003 06:05PM
Thanks Marc!
The bordered version (as per your last post) is at the URL in link above, the borderless one is:
http://gratisdei.com/flashblock-noborders.jar
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
Andrew
Date: December 26, 2003 06:09PM
I did get the Aggreg8 RSS reader working in K-Meleon. But that's an unusual one in that it uses the whole browser window and can stand alone by itself. But it still works well.
Re: Flash Click to View for KM
Posted by:
MonkeeSage
Date: December 26, 2003 08:01PM
Andrew:
That's pretty cool! I was getting JS errors when I tried to change tabs in Aggreg8, though. I had to add xultmpl.xpt and xml-rpc.xpt to /components to get it to work w/ no errors.
Shelumi`El
Jordan
S.D.G
Re: Flash Click to View for KM
Posted by:
Andrew
Date: December 26, 2003 08:27PM
MonkeeSage,
I might have already added those.
Re: Flash Click to View for KM
Posted by:
Jp
Date: December 26, 2003 08:32PM
MS: What about a completely different aproach.
A dumby DLL file , so the real Flash SWF DLL file would only load on cue ?
At all Possible ?
Can you upload a screen shot of everything you have worked on so far ?
Thanks man.,
Jp
Re: Flash Click to View for KM
Posted by:
Jp
Date: December 26, 2003 08:40PM
Don't forget to make a -change log's- guys.
Re: Flash Click to View for KM
Posted by:
JP
Date: December 26, 2003 09:02PM
I'm goin crazy here , It seems as if I can't get all my Ideas out in one blow. !
Argh!
MS: For both FB & NMFB can we get a little blue boxed opaque [x] in the corner to remove completely.
A larger one directly oposite or something would be cool for removing all flash boxes.
A
box or query box ( You know the things you see over people's heads when they have an Idea ) to tell the user the flash file animation.
Maybe even have some info about size on the box itself.
I hope you can come up with these and make seperate poisons for us all
Thanks again, Jp
Re: Flash Click to View for KM
Posted by:
Jp
Date: December 26, 2003 09:04PM
Also is it possible to have the default boxed color set changed.
MS: Please review all my previouse post's if you can , you left some stuff out.