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

Delta Between Two Patch Sets: safari/background.js

Issue 6369485355220992: Fixed reload issue in Chrome (Closed)
Left Patch Set: Created Nov. 15, 2013, 1:08 p.m.
Right Patch Set: Created Nov. 15, 2013, 1:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/background.js ('k') | safari/content.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 25 matching lines...) Expand all
36 }; 36 };
37 37
38 var LoadingTabEventTarget = function(target) 38 var LoadingTabEventTarget = function(target)
39 { 39 {
40 WrappedEventTarget.call(this, target, "message", false); 40 WrappedEventTarget.call(this, target, "message", false);
41 }; 41 };
42 LoadingTabEventTarget.prototype = { 42 LoadingTabEventTarget.prototype = {
43 __proto__: WrappedEventTarget.prototype, 43 __proto__: WrappedEventTarget.prototype,
44 _wrapListener: function(listener) 44 _wrapListener: function(listener)
45 { 45 {
46 return function (event) { 46 return function (event)
47 {
47 if (event.name == "loading" && event.message == event.target.url) 48 if (event.name == "loading" && event.message == event.target.url)
Felix Dahlke 2013/11/15 13:28:38 Shouldn't we check if event.target is an instance
Sebastian Noack 2013/11/15 13:45:29 Shouldn't be required here. Only tabs can send mes
48 listener(new Tab(event.target)); 49 listener(new Tab(event.target));
49 }; 50 };
50 } 51 }
51 }; 52 };
52 53
53 Tab = function(tab) 54 Tab = function(tab)
54 { 55 {
55 this._tab = tab; 56 this._tab = tab;
56 57
57 this._eventTarget = tab; 58 this._eventTarget = tab;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // clicked. While Chrome loads it everytime you click the icon. So in order to 526 // clicked. While Chrome loads it everytime you click the icon. So in order to
526 // force the same behavior in Safari, we are going to reload the page of the 527 // force the same behavior in Safari, we are going to reload the page of the
527 // bubble everytime it is shown. 528 // bubble everytime it is shown.
528 if (safari.extension.globalPage.contentWindow != window) 529 if (safari.extension.globalPage.contentWindow != window)
529 safari.application.addEventListener("popover", function() 530 safari.application.addEventListener("popover", function()
530 { 531 {
531 document.documentElement.style.display = "none"; 532 document.documentElement.style.display = "none";
532 document.location.reload(); 533 document.location.reload();
533 }, true); 534 }, true);
534 })(); 535 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld