Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | <!-- This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | - License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
michael@0 | 4 | |
michael@0 | 5 | <html> |
michael@0 | 6 | <head> |
michael@0 | 7 | <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
michael@0 | 8 | <title>Library detector</title> |
michael@0 | 9 | <style type="text/css" media="all"> |
michael@0 | 10 | img { |
michael@0 | 11 | display: inline; |
michael@0 | 12 | width: 16px; |
michael@0 | 13 | height: 16px; |
michael@0 | 14 | } |
michael@0 | 15 | </style> |
michael@0 | 16 | <script type="text/javascript"> |
michael@0 | 17 | var icons = { |
michael@0 | 18 | 'jQuery' : 'jquery.ico', |
michael@0 | 19 | 'jQuery UI' : 'jquery_ui.ico', |
michael@0 | 20 | 'MooTools' : 'mootools.png', |
michael@0 | 21 | 'YUI' : 'yui.ico', |
michael@0 | 22 | 'Closure' : 'closure.ico', |
michael@0 | 23 | 'Modernizr': 'modernizr.ico', |
michael@0 | 24 | }; |
michael@0 | 25 | |
michael@0 | 26 | // Listen for mouse events over icons, in order to send a message up to |
michael@0 | 27 | // the panel and update its content with library name and version |
michael@0 | 28 | window.addEventListener('mouseover', function (event) { |
michael@0 | 29 | if (event.target.tagName == 'IMG') { |
michael@0 | 30 | addon.port.emit('setLibraryInfo', event.target.title); |
michael@0 | 31 | } |
michael@0 | 32 | }, false); |
michael@0 | 33 | |
michael@0 | 34 | addon.port.on('update', function (libraries) { |
michael@0 | 35 | // Cleanup previous content |
michael@0 | 36 | document.body.innerHTML = ''; |
michael@0 | 37 | |
michael@0 | 38 | // Create new updated list of icons |
michael@0 | 39 | libraries.forEach(function(library) { |
michael@0 | 40 | var img = document.createElement('img'); |
michael@0 | 41 | img.setAttribute('src', 'icons/' + icons[library.name]); |
michael@0 | 42 | img.setAttribute('title', library.name + "<br>Version: " + |
michael@0 | 43 | library.version); |
michael@0 | 44 | document.body.appendChild(img); |
michael@0 | 45 | }); |
michael@0 | 46 | }); |
michael@0 | 47 | </script> |
michael@0 | 48 | </head> |
michael@0 | 49 | <body></body> |
michael@0 | 50 | </html> |