Skip navigation.

exploreopera

| Help

Sign up | Help

Arena - blog

Los amigos del barrio pueden desaparecer, pero los dinosaurios van a desaparecer

Skin update required for 9.50...

, , , ...

I found out I have to update my Carthago skin to make is usable for Opera 9.50. Well, consistent is probably a better word in this case. Anyway, tomu has been doing a wonderful job keeping track of the changes, so thanks to him I'll make some time to work on the latest additions to Opera's functionality and GUI.

Carthago skin updated

, , ,

I have finally updated my Carthago skin. The last time I did that was for the release of Opera 8.0 ( :eek: ) - that was more than 2 years ago! The most obvious omission was all the images related to Widgets, but also Content Blocking and Fraud Protection were lacking.

Those who actually use the skin are hopefully happy to see this new version. I promise that I'll try to update it more regularly. :o: Carthago is now suitable for Opera 7 - 9.


I would have liked to go through the entire skin again and redesign some parts - there are things I think still need improvement. (Suggestions are welcome.) However, a quick look at skin.ini was pretty discouraging. There are so many images in a skin! Is there a guide showing how the skin.ini sections are linked to Opera's GUI? (tomu? :smile:) If not, I think it would be highly beneficial to all skin authors to have one, e.g. on operawiki.info.

Five things I would like to see in Opera

, ,

Non-troppo and tomu tagged me, so it's my turn to post 5 things I'd like to see in Opera.

Read more...

New button creator tool for Opera

, , ,

There are several websites where you can create buttons for Opera's toolbars. I used to have a page where you could get predefined buttons (much like on operawiki.info/CustomButtons, Tomu's page or Pesala's page) and where you could write your own button code. What I didn't have was the step in between: a form offering the user some guidance (see for example byberg's page or operawiki's official unofficial Custom Button & Command Creator). What I missed in existing tools was a connection between these three approaches: an experienced user may wish to write the button code directly from scratch, whereas someone who has never experimented with Opera's commands will probably need as much help as possible. But what do you do when you select a predefined button from one of the aforementioned pages, but want to change the image or the button text?

I have completely rewritten my button page to suit everyone's needs (well, that's what I hope it does p:). It features the following:


  1. Some 50 predefined buttons for those who don't want to or don't know how to make things more complicated.
  2. A form with which one can build a button step by step or with which one can dissect one of the predefined buttons.
  3. A text field in which an experienced user can enter the button code directly.

One of the things I spent most time on was to make the tool as flexible as possible. I wanted to make it possible to let the user switch between the sections mentioned above. For example, if someone selects a predefined button, he can then change what the button does or what it looks like in the second section. Or, if someone gets a button's code from another page, he can insert that into the code field (section 3) and then go to section 2 to make some adjustments.

I hope you find this new page useful - if you have any comments, just let me know.

Great pictures - by accident

,

Sometimes when you get home and transfer new pictures from your camera to your computer, you'll find that some of them are much more spectacular than they looked on the camera's 2-inch screen. Here's an example of what I mean (you can click on it to get a larger version):

See other pictures from that same day in my Wadden Sea album.

NOS Headlines: trying to fix it with UserJS or UserCSS

, , ,

I've described the problem with NOSHeadlines.nl in a forum thread: the site's using a script targeted at non-Gecko/non-IE browsers to add dummy divs that can accomplish the same as one simple line of Mozilla-only CSS:

-moz-border-radius: 0px 8px 0px 0px;

Opera runs the script and creates the additional divs, but doesn't get an additional stylesheet to display them as intended, as does IE:

<!--[if lt IE 7]><link rel="stylesheet" href="http://www.nosheadlines.nl/templates/nosheadlines/css/ie6fix.css" type="text/css" /><![endif]-->

One way to fix the display problems in Opera is to stop it from running the JS function causing all this, namely fixBrowserIssues() (how ironic). But I want the rounded corners in Opera too! Not because it looks better, but because I can't imagine that Opera isn't capable of doing this...

The closest I got to a satisfying result is this, though:



...using the following UserCSS:

div.dummy-1 {
position: absolute !important;
top: -1px !important;
left: -1px !important;
height: 9px !important;
width: 10px !important;
background: url(http://www.nosheadlines.nl/templates/nosheadlines/img/layout/corners/upper-left.gif) no-repeat top left !important;
border: none !important;
padding: 0 !important;
}

div.dummy-2 {
position: absolute !important;
top: -1px !important;
right: -2px !important;
height: 9px !important;
width: 10px !important;
background: url(http://www.nosheadlines.nl/templates/nosheadlines/img/layout/corners/upper-right.gif) no-repeat top left !important;
border: none !important;
padding: 0 !important;
z-index: 2;
}


h3 div.dummy-2 {
top: 2px !important;
}


I'm hoping someone can help me with the last part.

Finally my first Mini post

Finally, I've been able to get Opera Mini on my cell phone. This is my first blog post from my Benq-Siemens S68. I had to buy a new phone and switch to
a different tariff plan, but at least I can immediately check the result. I discovered I have to add/change the small-screen CSS for my personal homepage to improve the Mini experience there.

Back from Norway

, , ,

I'm back from my trip to Finnmark and Troms in the north of Norway. I've created an album with some photos. No, I did not get the chance to see Oslo - I even had to run at the airport to catch my next flight so the total time I spent in Oslo must have been less than half an hour. :smile:

UserJS fix for Yahoo images search

, ,

Some time ago I wrote a script to "fix" links in AlltheWeb Image search results pages. Yahoo has exactly the same problem (namely, unreadable links) so I wrote another UserJS for this case. It also makes the links to context pages clickable and, most importantly, removes the horizontal scrollbar (and the need to scroll horizontally, of course :smile:). For anyone who's interested:

fix-yahoo-images-search
Btw, there's another script in this "series" available on userjs.org: Google Image frame bypasser by GreyWyvern

Driving directions: departure address

, , , ...

I do have a car, but I don't have a navigation system. I therefore use one of the many online services to get driving directions, but I don't always use the same service. That's because the one I usually prefer (Map24) sometimes crashes Opera and doesn't know new roads. For example, not so long ago it would still let you follow the Belgian coast to go from Amsterdam to Brest even though taking the A29 through Amiens would save you lots of kilometres. Moreover, their new beta doesn't work in Opera 8.54 and doesn't show maps in Opera 9. So I'm forced to switch to anwb.nl, mappy.com, viamichelin.com or one of many similar sites.

When getting driving directions from such a website, I mostly use my home address as the departure address, so I figured it would be nice to have the site remember that info. A cookie set by the website wouldn't work too well because I delete cookies when I close Opera. UserJS was my next option.

After examining a few dozens of route planners, I found out they all use code similar to this:
<label for="startStreet">Street:</label> <input type="text" name="startStreet">
<label for="startCity">City:</label> <input type="text" name="startCity">
<label for="startZip">Zip:</label> <input type="text" name="startZip">
<label for="startCountry">Country:</label> <select type="text" name="startCountry">...</select>

Of course, they all use different names for their elements; some sites use the id attribute instead. Some let you enter a State or Province (using either an <input type="text"> or a <select>); others ask for the house number and street name separately.
In short, there's little the route planners agree on.

And then there was another problem I had to solve if I wanted to write a script that would work with them all: in The Netherlands, the house number comes after the street name; in the US, they're reversed. In France, they put a comma between them. Furthermore, a French route planner may know what "Norvège" is, but a British one can only work with "Norway".

Finally, this is what I've done:

I have written a JS function that will figure out which element types have been used to contain the address info. Its input parameters are the names or id's of these elements. The function will get the correct information from an array that stores the street name, house number, zip code, city, state and country separately. The country is again an array consisting of several equivalents (in different languages, for instance). The user also sets what the right street address notation is (which can be overridden for specific sites)

Once I completed the function, it was relatively easy to make it work on the following sites (note that some pages simply use some other site's route planning service):
1bis
411.info
9292ov.nl
The AA Route Planner
Abacho.de
Allianz Routenplanung
Anwb.nl
AOL Travel
Aral Routenplaner
Auskunft.ch
Autobahn Tank & Rast
Autoroutes.fr
Autostadtplan.de
Bayerninfo.de
bottin.fr
BP The Netherlands
BP Route Finder
CNN Driving Directions
CompuServe Routeplanner
Deutscher Stadtplandienst
Drive Alive! Route Planner
Expedia
Fahrinfo Berlin
Falk.de Routenplaner
Free.fr Itinéraires
Freetrip.com
Google Maps
Green Flag Route Planning
Guia Campsa
InfoSpace
Iti.fr
KataWeb.it Mappe
klickTel.de
LeasePlan Nederland
Letsmove.be (also in French)
Lycos.de Routenplaner
Lycos.nl Routeplanner
Map24
Maporama.com
Mappy.com
MapQuest.com
Maps.com
Maps On Us
MSN Mappoint / Mapblast
Multimap.com
Onde Estou.br
Opel Route Planner
Planet.nl
QDQ.com
RAC Route Planner
Rand McNally Maps & Directions
RATP.fr
Reiseplanung.de / Routenplanung.de
Routemaster.nl
Routenet.nl / Routenet.be
Routenplaner-online.com
Routenplaner24.de
Routeplannerplaza.nl
Strassenroutenplaner.de / Strassenkarten-Europa.de
SuperPages.com / BigBook.com
T-Mobile Routenplaner
Terra.es Callejero
Touring.be (also in French)
Travelmate.com.au
VanAnaarB.nl
Veturo.com
Vialys.fr
ViaMichelin.com
Volkswagen.de Routenplaner
VTB/VAB.be (also in French)
Wanadoo.fr
Wanadoo.nl
Wannahaves.nl
Web.de
Yahoo! Deutschland Routenplaner
Yahoo! Driving Directions
Yahoo! France

I give up

I had written my own stylesheet for these pages, but there were too many small errors that were annoying enough to make me switch back to one of the default styles.
I may try again in the future - or I may only change the picture in the header... could this one be one of Moose's photos? :smile:

T-Mobile.nl says it doesn't support Opera

, ,

T-Mobile.nl redirects Opera users to a page saying that other browsers than IE5.01, IE5.5 and Netscape 6 are not supported. This warning will only be given once, so you can return to the main page (by modifying the address in the address field or by clicking on the logo - there's no obvious link on the page) and continue browsing without any problems.
A cookie remembers whether you've seen the error page before. So if you are not interested in keeping t-mobile's cookies, you'll be redirected more often than necessary. Here's a little UserJS that wil always skip that page:

if (window.location.href.indexOf('http://www.t-mobile.nl/global/htdocs/page/browser_not_supported.asp')>-1){
    window.location.replace('http://www.t-mobile.nl/')
}

UserJS - Skip Hotmail's Today page

, ,

This script immediately redirects the user to Hotmail's Mail tab (the inbox page) when he signs in. This way the Hotmail Today page (the regular "front page" that tells you how many messages you have) is skipped.

if (window.location.href.match(/http:\/\/(\w+\.){0,2}hotmail(\.msn)?\.com\/cgi-bin\/hmhome\?/)){
    if (document.referrer=='' || document.referrer.match(/http:\/\/login.passport.net\/uilogin/))
        location.href=location.href.replace('hmhome','HoTMaiL');
}



If referrer logging is enabled in Opera, the script will redirect the user only when he logs in; Opera Today can then be visited by clicking on the appropriate link. If referrer logging is disabled, Opera Today becomes virtually unreachable, as clicking on the link will automatically send the user to his inbox. All information displayed on that page is available elsewhere on Hotmail, though.

UserJS: Disable OperaShow

, ,

This script will "convert" OperaShow into Fullscreen mode, i.e. ignore stylesheets for media='projection' when you enter Fullscreen mode.

document.addEventListener(
  'load',
  function(){
    var l=document.getElementsByTagName('link'); 
    var s=document.getElementsByTagName('style');

    for (var i=0; i<s.length; i++){
      if (s[i[b][/b]].hasAttribute('media')){
        if (s[i[b][/b]].getAttribute('media').indexOf('screen')>-1 && s[i[b][/b]].getAttribute('media').indexOf('projection')==-1)
          s[i[b][/b]].setAttribute('media',s[i[b][/b]].getAttribute('media')+',projection'); 
        if (s[i[b][/b]].getAttribute('media').indexOf('projection')>-1 && s[i[b][/b]].getAttribute('media').indexOf('screen')==-1) 
          s[i[b][/b]].setAttribute('media',s[i[b][/b]].getAttribute('media').replace('projection','OperaShow'));
      } 
    }

    for (i=0; i<l.length; i++){
      if (l[i[b][/b]].hasAttribute('rel') && l[i[b][/b]].hasAttribute('media')){
        if (l[i[b][/b]].getAttribute('rel')=='stylesheet' && l[i[b][/b]].getAttribute('media').indexOf('screen')>-1 && l[i[b][/b]].getAttribute('media').indexOf('projection')==-1)
          l[i[b][/b]].setAttribute('media',l[i[b][/b]].getAttribute('media')+',projection');
        if (l[i[b][/b]].getAttribute('rel')=='stylesheet' && l[i[b][/b]].getAttribute('media').indexOf('projection')>-1 && l[i[b][/b]].getAttribute('media').indexOf('screen')==-1) 
          l[i[b][/b]].setAttribute('media',l[i[b][/b]].getAttribute('media').replace('projection','OperaShow'));
      }
    }
  },
  false
); 

AllTheWeb images search

, ,

When I do image searches with AllTheWeb, the status field displays a long url starting with http://av.rds.yahoo.com/ when I hover over the thumbnails and links. There's no way to see where the link will eventually lead to, even though the links all have an onmouseover attribute like this: "self.status='http://www.blezer.tmfweb.nl/trip2';return true".
I guess that Opera ignores that status text for security reasons, but as I said, it makes it impossible to know where you'll end up. I've written some UserJS (and looked at GwenWyvern's Google Image frame bypasser for an example) to fix this:

if (window.location.href.match(/http:\/\/www.alltheweb.com\/search.+cat=img/)) {
  window.opera.addEventListener(
    'AfterEventListener.load',
    function(){var s=document.getElementsByTagName('a');for (var i=0; i<s.length; i++){if (s[i[b][/b]].className=='thumbnail'){s[i[b][/b]].href=s[i[b][/b]].getAttribute('onmouseover').replace(/self\.status='(.+)';return true/,'$1');}}}, 
    false); 
}

Sony.com menu fix

, ,

EDIT: Sony have updated their Ultimate Dropdown Menu to version 4.42 and now support Opera 8.x.

Sony.com uses the Ultimate Dropdown Menu, but unfortunately they haven't upgraded it to the latest version supporting Opera 8. Therefore, I wrote the following UserJS fix:

if (window.location.href.indexOf('http://www.sony.com')>-1){
    window.opera.addEventListener(
        'BeforeScript',
        function(ev){if(ev.element.text.indexOf('um.o7=')>-1){ev.element.text=ev.element.text.replace(/um\.o7\)\{.*?\}/,'um.o7){um.o75=true;um.o73=true;um.o71=false;}')}},
        false);
}

CSS and MS Excel

When I was learning to work with MS Excel I quickly found it was impossible to let the formula of one cell affect a different cell. For example, you can create a formula that can be described as follows:

"If that cell's value is 20, then change this cell's value into 10"

but you can't do it the other way:

"If this cell's value is 10, change that cell's value into 20"

If you insist on having the latter, you have to use macros.

How does this relate to CSS? Well, I do not consider myself an expert in CSS and I sometimes still interpret a line like the following incorrectly:

li:hover > ul {display : block}

namely as:

"If the li is hovered, then change the ul's display into block"

A better interpretation starts from the ul's point of view, though:

"If this ul is a child of a hovered li, then change its display into block"


The error in the former description lies in the interpretation of '>' as a sort of arrow that connects causes to consequences, thus neglecting its reference to descendants. I have already made this mistakes several times when I tried to change the appearance of other elements than descendants by connecting them with the "arrow", with something like:

p:hover > div {display: none}

Thanks to Excel I realized that I'll have to use macros if I want a hovered p to hide a div. Well, JavaScript in this case.

UserJS for regional newspapers

, ,

When one publisher owns a couple of regional newspapers, it is to be expected that all related sites will use the same methods to annoy Opera users. The script to fix the issue is shorter than the list of sites to which it applies :smile:
I haven't been able to get it working using the easiest method to list the relevant websites, namely

// ==UserScript==
// @include...
// ==/UserScript==

But the script below does the trick anyway:

if (window.location.href.indexOf('http://www.leidschdagblad.nl')>-1 || window.location.href.indexOf('http://www.limburgsdagblad.nl/')>-1 || window.location.href.indexOf('http://www.telegraafholding.nl')>-1 || window.location.href.indexOf('http://www.hdcmedia.nl')>-1 || window.location.href.indexOf('http://www.limburgadverteren.nl')>-1 || window.location.href.indexOf('http://www.nhd.nl/')>-1 || window.location.href.indexOf('http://www.gooieneemlander.nl/')>-1 || window.location.href.indexOf('http://www.haarlemsdagblad.nl/')>-1 || window.location.href.indexOf('http://www.ijmuidercourant.nl/')>-1 || window.location.href.indexOf('http://www.dvhn.nl')>-1 || window.location.href.indexOf('http://www.vakantierecreatie.nl/')>-1 || window.location.href.indexOf('http://www.almerevandaag.nl/')>-1){
    window.opera.defineMagicVariable(
        'bSupportedBrowser',
        function(){return true;},
        null);
}

UserJS - Three fixes for one site.

,

Site: Huis-Aan-Bod

Problems:
1. Vertical text alignment: page contents are shifted to bottom of page
2. Navigation menu (CoolMenus 4.05 beta , feb 2002) doesn't work in Opera
3. Necessary pop-ups will be blocked by Opera unless it is set to allow all pop-ups. In other words: block unwanted pop-ups doesn't work

Fixes: Require the addition of the following lines of code to your UserJs file.

Fix for problem 1: Vertical text alignment is changed from "bottom" into "top".

// description: www.huis-aan-bod.nl - fix of (vertical) alignment of text
// last modified: 2005-04-02
if(window.location.href.indexOf('www.huis-aan-bod.nl')>-1){
window.opera.addEventListener('AfterEventListener.load',function(ev){var str=document.body.getElementsByTagName('tr'); for(var i=str.length-1;i>=0;i--){if(str[i[b][/b]].getAttribute('valign')=='bottom'){str[i[b][/b]].setAttribute('valign','top')}}; },false);
}

Fix for problems 2 and 3: CoolMenus are replaced by a working CSS menu; login pop-ups are allowed regardless of Opera's pop-up settings.

// description: www.huis-aan-bod.nl - (1) allow login/logout popups on page regardless of popup settings in Opera & (2) fix of navigation menu
// last modified: 2005-04-04
if(window.location.href.indexOf('www.huis-aan-bod.nl')>-1){
window.opera.addEventListener(
'BeforeScript',
function(ev){
var str=ev.element.text;
/*(1)*/
if (str.indexOf('function openWindow()')>-1){
str=('http://www.huis-aan-bod.nl/'+ev.element.text.match(/\".*?\"/)).replace(/\"/g,'');
ev.element.text='function openWindow(){}';
window.open(str)
} else {/*(2)*/ if (str.indexOf('Menu item creation')>-1){
var mnu=new Array;
var i=0; var txt;
while(str.indexOf('oM.makeMenu')>-1){
mnu[i]=str.match(/makeMenu.*?\);/)+'';
str=str.replace(/makeMenu.*?\);/,'');
i++
};
for (i=0;i<mnu.length;i++){
if (mnu[i].indexOf('.gif')>-1){
mnu[i]='<div class="ujsmnu"><a href="'+mnu[i].match(/mid[\d,]+/)+'"><img src="'+mnu[i].match(/imag.*?h\d\.gif/)+'"></a>';
} else {
txt=mnu[i].match(/,.*?,/)+'';
if(txt==",''," || txt.length==6){txt=''} else {txt=' class="ujssub"'};
mnu[i]='<li><a'+txt+' href="'+mnu[i].match(/mid[\d,]+/)+'">'+(mnu[i].match(/[^\']*?\',\'mid/)+'').replace("','mid","")+'</a></li>';
}
};
mnu[mnu.length-1]+='</div>';
ev.element.text="document.write('<style type=\"text/css\">.ujsmnu {float:left; margin-left: 44px;} .ujsmnu + .ujsmnu {margin-left: 4px;} .ujsmnu ul {display:none;} .ujsmnu:hover ul {display:block; background: #cc6; list-style:none; position:absolute; margin: 0; z-index:2; border: solid 1px #787878; width: 154px; font-size: 11px;} .ujsmnu ul a, .ujsmnu ul a:visited {display: block; color: #000; text-decoration: none; font-family: arial,sans-serif; padding: 2px 4px;} .ujsmnu ul a:hover {background-color: #a0b39f;} .ujssub:before {content: \"- \";} .ujssub {padding-left: 12px !important; font-size: 10px; color: #1e4c4c !important}</style>')\n";
for (i=0;i<mnu.length;i++){
if(mnu[i].indexOf('<div')>-1 && i>1){
if(mnu[i-1].indexOf('<li')>-1){
mnu[i]='</ul></div>'+mnu[i];
}else{
mnu[i]='</div>'+mnu[i];
}
};
if(mnu[i].indexOf('<div')>-1 && i<mnu.length-1){
if(mnu[i+1].indexOf('<li')>-1){
mnu[i]+='<ul>';
}
};
ev.element.text+="document.write('"+mnu[i]+"')\n";
};
}
}
},
false);
}

UserJS again - fixing a broken site

, ,

Edit (2005-09-13): the site has been fixed.

The (2nd) largest Dutch university has an error in its portal for students that prevents Opera from showing the page correctly. Just visit www.student.uva.nl to see how the dropdowns fail to function. This can easily be fixed, but so far I haven't received a reply to my request for a change in their code. That's why I've written a small piece of userjs that does the webmaster's job.

Refer to the following MyOpera Forums threads for more details about the site:
http://my.opera.com/forums/showthread.php?s=&threadid=83669 (Dutch)
http://my.opera.com/forums/showthread.php?s=&threadid=83736 (English)
http://my.opera.com/forums/showthread.php?s=&threadid=84232 (English)

Here's the code you have to add to your UserJS file:

if(window.location.href.indexOf('www.student.uva.nl')>-1){
window.opera.addEventListener('BeforeScript',function(ev){if (ev.element.text.indexOf('id="opleidingenbachelorsselect"')>-1 || ev.element.text.indexOf('id="opleidingenmastersselect"')>-1 || ev.element.text.indexOf('id="opleidingendoctoraalselect"')>-1 || ev.element.text.indexOf('id="opleidingenoverigselect"')>-1) {ev.element.text=ev.element.text+'document.wri[b][/b]teln("</sel[b][/b]ect>")[b][/b];';}},false);
}