unprint 0.15.3 → 0.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.js +1 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "description": "Simplify common web scraping tasks while staying in control of the data.",
5
5
  "main": "src/app.js",
6
6
  "scripts": {
package/src/app.js CHANGED
@@ -568,8 +568,6 @@ function queryStyleUrl(context, selector, styleAttribute, customOptions) {
568
568
  return null;
569
569
  }
570
570
 
571
- console.log('STYLE', styleAttribute, style);
572
-
573
571
  const url = style.match(/url\(['"]?(.*)['"]?\)/)?.[1];
574
572
 
575
573
  return url;
@@ -1074,7 +1072,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
1074
1072
  statusText: res.statusText,
1075
1073
  });
1076
1074
 
1077
- if (res.headers['content-type'].includes('application/json') && typeof res.data === 'object') {
1075
+ if (['application/json', 'application/javascript'].includes(res.headers['content-type']) && typeof res.data === 'object') {
1078
1076
  return {
1079
1077
  ...base,
1080
1078
  data: res.data,