| Index: include.preload.js |
| =================================================================== |
| --- a/include.preload.js |
| +++ b/include.preload.js |
| @@ -29,7 +29,8 @@ |
| // Use Shadow DOM if available to don't mess with web pages that |
| // rely on the order of their own <style> tags. However |
| // the <shadow> element is broken in Chrome 32.0.1700 (#309) |
| - if ("webkitCreateShadowRoot" in document.documentElement && !/\bChrome\/32\.0\.1700\b/.test(navigator.userAgent)) |
| + var match; |
| + if ("webkitCreateShadowRoot" in document.documentElement && !((match = navigator.userAgent.match(/\bChrome\/32\.0\.(\d+)\b/)) && parseInt(match[1]) >= 1700)) |
|
Thomas Greiner
2014/04/17 17:39:00
Nit: That's an unnecessarily long line. You could
Sebastian Noack
2014/04/17 17:56:45
The reason I did it that way is, is to don't execu
|
| { |
| var shadow = document.documentElement.webkitCreateShadowRoot(); |
| shadow.appendChild(document.createElement("shadow")); |