Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Moshe Avni authored and Moshe Avni committed Mar 24, 2018
1 parent 5616886 commit 6a9a965
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NewWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ function copyStyles(source, target) {
Array.from(styleSheet.cssRules).forEach(cssRule => {
const { cssText, type } = cssRule;
let returnText = cssText;
// Check if the cssRule type is CSSImportRule (3) or CSSFontFaceRule (5) to handle local imports on a about:blank page
// '/custom.css' turns to 'http://my-site.com/custom.css'
if ([3, 5].includes(type)) {
returnText = cssText.split('url(').map(line => {
if (line[1] === '/') {
Expand Down

0 comments on commit 6a9a965

Please sign in to comment.