Changeset 302

Show
Ignore:
Timestamp:
03/25/07 09:45:09 (20 months ago)
Author:
t-bone
Message:

Closes #44

  • Extract port and cheap "last 6 characters TLD" into host suffix when stripping subdomains.
Location:
extension/uppity
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • extension/uppity/content/uppity.js

    r300 r302  
    138138        //strip subdomains if there 
    139139        if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP 
    140             var hostSuff=host.substr(host.length-6); 
     140            var hostSuffix=''; 
     141            // strip port 
     142            var x=host.lastIndexOf(':'); 
     143            if (x>0) { 
     144                hostSuffix=host.substr(x); 
     145                host=host.substr(0, x); 
     146            } 
     147            // strip TLD 
     148            hostSuffix=host.substr(host.length-6)+hostSuffix; 
    141149            host=host.substr(0, host.length-6); 
    142150 
    143151            while (-1!=host.indexOf('.')) { 
    144152                host=host.replace(/[^.]*\./, ''); 
    145                 URLs[URLs.length]=scheme+host+hostSuff+'/'; 
     153                URLs[URLs.length]=scheme+host+hostSuffix+'/'; 
    146154            } 
    147155        } 
  • extension/uppity/install.rdf

    r298 r302  
    44        <em:id>{16cbd87c-eb99-4f5c-9825-83cf13ab7ff8}</em:id> 
    55        <em:name>Uppity</em:name> 
    6         <em:version>1.4.12</em:version> 
     6        <em:version>1.4.13</em:version> 
    77        <em:description>Navigate up one level (directory).</em:description> 
    88