| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 clickHide_deactivate(); | 111 clickHide_deactivate(); |
| 112 currentElement = savedElement; | 112 currentElement = savedElement; |
| 113 } | 113 } |
| 114 | 114 |
| 115 clickHide_filters = filters; | 115 clickHide_filters = filters; |
| 116 | 116 |
| 117 clickHideFiltersDialog = document.createElement("iframe"); | 117 clickHideFiltersDialog = document.createElement("iframe"); |
| 118 clickHideFiltersDialog.src = ext.getURL("block.html"); | 118 clickHideFiltersDialog.src = ext.getURL("block.html"); |
| 119 clickHideFiltersDialog.setAttribute("style", "position: fixed !important; visi bility: hidden; display: block !important; border: 0px !important;"); | 119 clickHideFiltersDialog.setAttribute("style", "position: fixed !important; visi bility: hidden; display: block !important; border: 0px !important;"); |
| 120 clickHideFiltersDialog.style.WebkitBoxShadow = "5px 5px 20px rgba(0,0,0,0.5)"; | 120 clickHideFiltersDialog.style.WebkitBoxShadow = "5px 5px 20px rgba(0,0,0,0.5)"; |
| 121 clickHideFiltersDialog.style.zIndex = 99999; | 121 |
| 122 // make sure that the dialog is above everything else, by setting | |
| 123 // the z-index to the highest z-index used in the document plus 1 | |
| 124 clickHideFiltersDialog.style.zIndex = Math.max.apply(null, Array.prototype.map .call( | |
| 125 document.all, function(el) | |
| 126 { | |
| 127 return parseInt(getComputedStyle(el).zIndex) || 0; | |
| 128 } | |
| 129 )) + 1; | |
|
Wladimir Palant
2014/06/24 10:31:39
Please just use the maximum possible value for zIn
Sebastian Noack
2014/06/24 13:07:52
Done.
| |
| 122 | 130 |
| 123 // Position in upper-left all the time | 131 // Position in upper-left all the time |
| 124 clickHideFiltersDialog.style.left = "50px"; | 132 clickHideFiltersDialog.style.left = "50px"; |
| 125 clickHideFiltersDialog.style.top = "50px"; | 133 clickHideFiltersDialog.style.top = "50px"; |
| 126 | 134 |
| 127 // Make dialog partly transparent when mouse isn't over it so user has a bette r | 135 // Make dialog partly transparent when mouse isn't over it so user has a bette r |
| 128 // view of what's going to be blocked | 136 // view of what's going to be blocked |
| 129 clickHideFiltersDialog.onmouseout = function() | 137 clickHideFiltersDialog.onmouseout = function() |
| 130 { | 138 { |
| 131 if (clickHideFiltersDialog) | 139 if (clickHideFiltersDialog) |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 577 | 585 |
| 578 clickHide_deactivate(); | 586 clickHide_deactivate(); |
| 579 } | 587 } |
| 580 break; | 588 break; |
| 581 default: | 589 default: |
| 582 sendResponse({}); | 590 sendResponse({}); |
| 583 break; | 591 break; |
| 584 } | 592 } |
| 585 }); | 593 }); |
| 586 } | 594 } |
| OLD | NEW |