| 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-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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 if(url) { | 292 if(url) { |
| 293 clickHideFilters.push(relativeToAbsoluteUrl(url)); | 293 clickHideFilters.push(relativeToAbsoluteUrl(url)); |
| 294 selectorList.push(elt.localName + '[src="' + url + '"]'); | 294 selectorList.push(elt.localName + '[src="' + url + '"]'); |
| 295 } | 295 } |
| 296 | 296 |
| 297 // Show popup | 297 // Show popup |
| 298 clickHide_showDialog(e.clientX, e.clientY, clickHideFilters); | 298 clickHide_showDialog(e.clientX, e.clientY, clickHideFilters); |
| 299 | 299 |
| 300 // Set background color in case it got selected using context menu | |
| 301 if (typeof currentElement_backgroundColor == "undefined") | |
|
Wladimir Palant
2013/12/18 11:57:05
Given that we never reset currentElement_backgroun
Thomas Greiner
2013/12/18 12:33:26
Done.
http://codereview.adblockplus.org/5661044793
| |
| 302 currentElement_backgroundColor = currentElement.style.backgroundColor; | |
| 303 | |
| 300 // Highlight the unlucky elements | 304 // Highlight the unlucky elements |
| 301 // Restore currentElement's box-shadow and bgcolor so that highlightElements w on't save those | 305 // Restore currentElement's box-shadow and bgcolor so that highlightElements w on't save those |
| 302 currentElement.style.setProperty("-webkit-box-shadow", currentElement_boxShado w); | 306 currentElement.style.setProperty("-webkit-box-shadow", currentElement_boxShado w); |
| 303 currentElement.style.backgroundColor = currentElement_backgroundColor; | 307 currentElement.style.backgroundColor = currentElement_backgroundColor; |
| 304 // Highlight the elements specified by selector in yellow | 308 // Highlight the elements specified by selector in yellow |
| 305 highlightElements(selectorList.join(",")); | 309 highlightElements(selectorList.join(",")); |
| 306 // Now, actually highlight the element the user clicked on in red | 310 // Now, actually highlight the element the user clicked on in red |
| 307 currentElement.style.setProperty("-webkit-box-shadow", "inset 0px 0px 5px #fd1 708"); | 311 currentElement.style.setProperty("-webkit-box-shadow", "inset 0px 0px 5px #fd1 708"); |
| 308 currentElement.style.backgroundColor = "#f6a1b5"; | 312 currentElement.style.backgroundColor = "#f6a1b5"; |
| 309 } | 313 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 | 563 |
| 560 clickHide_deactivate(); | 564 clickHide_deactivate(); |
| 561 } | 565 } |
| 562 break; | 566 break; |
| 563 default: | 567 default: |
| 564 sendResponse({}); | 568 sendResponse({}); |
| 565 break; | 569 break; |
| 566 } | 570 } |
| 567 }); | 571 }); |
| 568 } | 572 } |
| OLD | NEW |