Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/appSupport.js

Issue 6325312296058880: issue #290 - [seamonkey] blockable items list persists on tab changes (Closed)
Patch Set: Created July 6, 2014, 12:42 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 { 352 {
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
363 /**
364 * Makes sure that a function is called whenever the displayed browser locat ion changes.
365 * For Seamonkey ignoreSameDoc attribute is useless while aFlags attribute i s missing in onLocationChange Listener.
366 */
367 exports.addBrowserLocationListener = function addBrowserLocationListener(/** Window*/ window, /**Function*/ callback, /**Boolean*/ ignoreSameDoc)
368 {
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 };
362 394
363 exports.contentContextMenu = ["contentAreaContextMenu", "mailContext"]; 395 exports.contentContextMenu = ["contentAreaContextMenu", "mailContext"];
364 396
365 exports.defaultToolbarPosition = { 397 exports.defaultToolbarPosition = {
366 parent: ["PersonalToolbar", "msgToolbar"], 398 parent: ["PersonalToolbar", "msgToolbar"],
367 before: ["bookmarks-button", "button-junk"] 399 before: ["bookmarks-button", "button-junk"]
368 }; 400 };
369 401
370 exports.statusbarPosition = { 402 exports.statusbarPosition = {
371 parent: "status-bar" 403 parent: "status-bar"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 event.state = {id: require("info").addonID}; 971 event.state = {id: require("info").addonID};
940 browser._contentWindow.dispatchEvent(event); 972 browser._contentWindow.dispatchEvent(event);
941 }); 973 });
942 }); 974 });
943 }, true); 975 }, true);
944 }; 976 };
945 977
946 break; 978 break;
947 } 979 }
948 } 980 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld