IE Tab not matching preset domains

  1. acobb

    Member

    { #1 — 1 year ago }

    First let me thank you for a wonderful extension. I use it for both internet and local websites to help separate them as I switch back and forth.

    Some sites must be accessed with Internet Explorer, for which I use the IE Tab extension. Tabs rendered using the IE engine are colorized fine when using random colorization, but not when using preset domain coloring. The sites will match the everything "." rule, but nothing more specific.

    I have created a new profile to validate that no other extensions are interfering, and made sure everything is up to date.

    My system:
    Windows XP Pro
    Firefox 3.0.9
    ColorfulTabs 3.9.1
    IE Tab 1.5.20090207

    I have atteched images to show my preset URL settings as well as the results on several tabs.

    The first tab for binaryturf matches the "." domain and is colored orange. The second matches "." and then matches "msn.com", and is therefore colored red. The third is msn.com using IE tab. It seems to match the "." domain, but not the "msn.com" domain and is colored orange.

    I assume that IE tab is doing something strange with the URL internally, but I don't know how to verify this. It clearly presents some usable URL as it matches the everything rule.

    Ideally, I would like to know how to make a URL rendered with IE Tab match a preset domain colorization rule. I wouldn't mind specifying IE Tab somehow in the preset domain name, but different domains using IE Tab should be able to match different rules.

    Thank you for any feedback.

    Attachments

    1. Tab_Coloring.png (23 KB, 1 downloads) 1 year old
    2. Colorful_Tab_Options.png (6.3 KB, 0 downloads) 1 year old
  2. Administrator

    Key Master

    { #2 — 1 year ago }

    The location of the IE tab actually is

    chrome://ietab/content/reloaded.html?url=http://www.msn.com/

    Therefore it doesn't get colored. Another way of saying that ColorfulTabs doesn't work in IE.

  3. acobb

    Member

    { #3 — 1 year ago }

    I see. I hope you don't mind but I looked at the source and tweaked it to fit my need. Here are some observations:

    You are looking at the location.host, which for my url is ietab. So I can do a domain preset of ietab and it will match, but for all locations opened with ietab. This is a restriction due to using host instead of location.href. (the whole url).

    I switched to matching href and that works fine, but of course this causes unwanted non-host matching.
    For example, my domain rule of msn.com matches each of these:
    chrome://ietab/content/reloaded.html?url=http://www.msn.com/
    http://www.example.com/msn.com
    http://www.google.com/#hl=en&q=msn.com&fp=aaV-kzfDWBk
    I don't want these last two to match.

    The string.match() method supports regular expressions, so all I have to do is include some regexp characters in my domain preset. Specifically, my presets start with a ^ to signify start of the string, but this doesn't work. I found out this is because you strip "http://" from domain presets, and since I couldn't figure out why that would be necessary I removed that functionality. I also noticed that a valid url might contain regexp characters (specifically in my example, the "?" symbol), and these must be escaped by double-backslashes. So my IE Tab preset for msn.com could be chrome://ietab/content/reloaded.html\\?url=http://www.msn.com/

    This is where I stopped, and it is working well for me.
    By using href instead of host, I get more matching control, but it can be more complicated as you need to think about matching the middle of a url and whether or not that is desired. This can be solved by using regular expression characters, but again that is a little tricky if you don't know anything about them.

    By the way, this also allows me to have different presets for the regular and IE Tab version of a site, and also to have different presets for a site's subsites as requested in http://www.binaryturf.com/forum/topic/tab-color-by-url-instead-of-host (I'll post a quick reply in that thread as well.)

    I don't know if this change will be appropraite for everyone, but perhaps in a future version you could allow users to switch between url or host matching, leaving host as the default for novice users.

Reply

You must log in to post.