Friday, 29. August 2008, 04:52:18
color picker userscript
Get last version!: get_color.js
Sometimes you want to get the color of some part of a web page. Here you can see my script called
Color Picker
This is an example:
This is the example code:
<style type="text/css">
h1 {
color: #ffff00;
background: #ffdddd;
border:3px solid;
border-bottom-color:#0000FF;
border-left-color:#00CC00;
border-right-color:#FF0000;
border-top-color:transparent;
}
</style>
<body>
<h1 id="h1">
<p style="color:#00ccff;">hello I'm a <p> tag into a <h1> tag</p>
</h1>
</body>
and this is what you get from my script
First, click over
P object:
Second, click out
P but inside
H1 object
as you can see there is a <p> tag into a <h1> tag, and <p> has no background, but it don't care, what you want to know is the background color that you are seeing. so if some element has transparent background the code check parentNodes until get some color background.
another thing is that you have the four borders, as you can see in the last picture, you can click over each little part to get the hexadecimal values.
Finally, how to use?
First of all, you have to click over the object you want, but maybe it's a link... so:
1. You have to just drop the mouse over the object. (Don't care where you clicked first)
2. Then you have to execute cp_getColor() function. So, you can put a button or some item into a context menu, like this:
Item, "Color Picker"="Go to Page,"javascript:cp_getColor()""
If you have inserted it into a context menu, you can right-click over anything, because Opera doesn't allow to check right-buttons events.
Thursday, 7. August 2008, 22:59:08
modal, window, userjs, showmodaldialog
Last release v1.1Compressed version hereMay be you clic in some element in a web site and nothing happen, but if you try in IE or FF it works fine, and a new window opens. The problem is because in the code there is a modal window, and Opera doesn't support it.
function showModalDialog() was implemented for MSIE. Now FF is compatible, but Opera not yet.
Because of that I've made
this script.
If the page want to show us a modal window, a confirm message box appears:

For a Modal Window emulation we've to click 'OK'

Otherwise, just 'Cancel' and a new window is opened

clic here to
see the example
Thursday, 24. July 2008, 19:49:31
canvas 3d
I've just finished the new version of
ase2opera (I think in the future I will call it ase2xml...)
So here are the steps to make a correct transform:
- Step1: Apply to each object in 3DMax an UVW planar map, be sure you put 0 in W value.

- Step2: Export each object as .ASE file one by one, with these options

- Step4: Add textures and objects! you can see an example here.
This is the difference between
Opera Canvas...

...and
3DMax
... just the background!
so, what's next? I have two new ideas in my mind, I want to transform a camera path to make animations more flexibles, and in a far future, a game like pac-man in first person mode...
Thursday, 24. July 2008, 01:21:38
canvas 3d
First, you have to export a selected object as ASCII file:


then you have to make sure just these check boxes are marked:

finally you have to enter to
my php ase2opera converter, upload your .ase file and get your .xml file
here is a teatpot example:

as you can see I don't made a good algorithm for u,v map coordinates... so I need somebody help...
you can see the example
here(you have to use the
last build of opera)