Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
353 return null; | 353 return null; |
354 } | 354 } |
355 } | 355 } |
356 else | 356 else |
357 { | 357 { |
358 let browser = exports.getBrowser(window); | 358 let browser = exports.getBrowser(window); |
359 return (browser ? browser.currentURI : null); | 359 return (browser ? browser.currentURI : null); |
360 } | 360 } |
361 }; | 361 }; |
362 | 362 |
363 /** | 363 // for Seamonkey we have to ignore same document flag because of |
364 * Makes sure that a function is called whenever the displayed browser locat ion changes. | 364 // bug #1035171 (https://bugzilla.mozilla.org/show_bug.cgi?id=1035171) |
365 * For Seamonkey ignoreSameDoc attribute is useless while aFlags attribute i s missing in onLocationChange Listener. | 365 let origAddBrowserLocationListener = exports.addBrowserLocationListener; |
366 */ | 366 exports.addBrowserLocationListener = function sm_addBrowserLocationListener( window, callback, ignoreSameDoc) |
367 exports.addBrowserLocationListener = function addBrowserLocationListener(/** Window*/ window, /**Function*/ callback, /**Boolean*/ ignoreSameDoc) | 367 { |
368 { | 368 origAddBrowserLocationListener(window, callback, false); |
369 let browser = (exports.getBrowser ? exports.getBrowser(window) : null); | |
370 if (browser) | |
371 { | |
372 let dummy = function() {}; | |
373 let progressListener = | |
374 { | |
375 callback: callback, | |
376 onLocationChange: function(progress, request, uri) | |
saroyanm
2014/07/06 13:01:02
The issue looks caused by onLocationChange method
Wladimir Palant
2014/07/07 12:21:21
The code you are linking to is very outdated, the
saroyanm
2014/07/07 13:12:23
Thanks Wladimir for pointing on correct repository
| |
377 { | |
378 this.callback(); | |
379 }, | |
380 onProgressChange: dummy, | |
381 onSecurityChange: dummy, | |
382 onStateChange: dummy, | |
383 onStatusChange: dummy, | |
384 QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener, Ci.n sISupportsWeakReference]) | |
385 }; | |
386 browser.addProgressListener(progressListener); | |
387 | |
388 if (progressListeners.has(window)) | |
389 progressListeners.get(window).push(progressListener); | |
390 else | |
391 progressListeners.set(window, [progressListener]); | |
392 } | |
393 }; | 369 }; |
394 | 370 |
395 exports.contentContextMenu = ["contentAreaContextMenu", "mailContext"]; | 371 exports.contentContextMenu = ["contentAreaContextMenu", "mailContext"]; |
396 | 372 |
397 exports.defaultToolbarPosition = { | 373 exports.defaultToolbarPosition = { |
398 parent: ["PersonalToolbar", "msgToolbar"], | 374 parent: ["PersonalToolbar", "msgToolbar"], |
399 before: ["bookmarks-button", "button-junk"] | 375 before: ["bookmarks-button", "button-junk"] |
400 }; | 376 }; |
401 | 377 |
402 exports.statusbarPosition = { | 378 exports.statusbarPosition = { |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
971 event.state = {id: require("info").addonID}; | 947 event.state = {id: require("info").addonID}; |
972 browser._contentWindow.dispatchEvent(event); | 948 browser._contentWindow.dispatchEvent(event); |
973 }); | 949 }); |
974 }); | 950 }); |
975 }, true); | 951 }, true); |
976 }; | 952 }; |
977 | 953 |
978 break; | 954 break; |
979 } | 955 } |
980 } | 956 } |
LEFT | RIGHT |