Changeset 1030
- Timestamp:
- 2008-08-02 17:24:28 (2 months ago)
- Files:
-
- trunk/chrome/content/common/overlayFunctions.js (modified) (1 diff)
- trunk/chrome/content/dta/select.js (modified) (1 diff)
- trunk/chrome/content/integration/elements.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/common/overlayFunctions.js
r1027 r1030 201 201 url = url.url.spec; 202 202 } 203 else if (url instanceof Components.interfaces.nsIURL) { 204 url = url.spec; 205 } 203 206 try { 204 207 var scheme = this.ios.extractScheme(url); trunk/chrome/content/dta/select.js
r993 r1030 59 59 function() { 60 60 if (!this._icon) { 61 this._icon = getIcon(this.url , 'metalink' in this);61 this._icon = getIcon(this.url.url.spec, 'metalink' in this); 62 62 } 63 63 return this._icon; trunk/chrome/content/integration/elements.js
r1027 r1030 106 106 return; 107 107 } 108 108 109 109 var ref = DTA_AddingFunctions.getRef(doc); 110 110 111 111 for (var i = 0; i < lnks.length; ++i) { 112 112 var src = lnks[i].src; 113 if (!DTA_AddingFunctions.isLinkOpenable(src)) { 114 try { 115 src = DTA_AddingFunctions.composeURL(doc, src).spec; 116 } 117 catch (ex) { 118 DTA_debug.log("failed to compose: " + src, ex); 119 continue; 120 } 113 try { 114 src = DTA_AddingFunctions.composeURL(doc, src); 115 } 116 catch (ex) { 117 DTA_debug.log("failed to compose: " + src, ex); 118 continue; 121 119 } 122 120 // if it's valid and it's new … … 133 131 } 134 132 images.push({ 135 'url': new DTA_URL( DTA_AddingFunctions.ios.newURI(src, doc.characterSet)),133 'url': new DTA_URL(src), 136 134 'referrer': ref, 137 135 'description': desc … … 263 261 return i.filter( 264 262 function(e) { 265 var url = e.url.url;263 let url = e.url.url.spec; 266 264 if (url in known) { 267 265 return false; … … 275 273 if (turbo) { 276 274 DTA_debug.logString("findLinks(): DtaOneClick request from the user"); 277 } else { 275 } 276 else { 278 277 DTA_debug.logString("findLinks(): DtaStandard request from the user"); 279 278 } … … 289 288 var urls = []; 290 289 var images = []; 291 windows.forEach( 292 function(win) { 293 this.addLinks(win, urls, images, !all); 294 }, 295 this 296 ); 290 for each (let win in windows) { 291 this.addLinks(win, urls, images, !all); 292 } 297 293 urls = makeUnique(urls); 298 294 images = makeUnique(images); … … 307 303 DTA_AddingFunctions.saveLinkArray(true, urls, images); 308 304 return; 309 } catch (ex) { 305 } 306 catch (ex) { 310 307 DTA_debug.log('findLinks', ex); 311 308 DTA_Prompts.alert(window, this.getString('error'), this.getString('errorinformation'));
