unprint 0.18.16 → 0.18.17
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.
- package/package.json +1 -1
- package/src/app.js +1 -32
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -379,38 +379,7 @@ function prefixUrl(urlPath, originUrl, customOptions) {
|
|
|
379
379
|
return new URL(urlPath, origin).href;
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
|
|
383
|
-
function getQueryUrlArgs(selectorOrOptions, customOptions) {
|
|
384
|
-
if (customOptions) {
|
|
385
|
-
return {
|
|
386
|
-
selector: selectorOrOptions,
|
|
387
|
-
customOptions,
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
if (typeof selectorOrOptions === 'string') {
|
|
392
|
-
return {
|
|
393
|
-
selector: selectorOrOptions,
|
|
394
|
-
customOptions: null,
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
if (!selectorOrOptions) {
|
|
399
|
-
return {
|
|
400
|
-
selector: 'a',
|
|
401
|
-
customOptions: null,
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
return {
|
|
406
|
-
selector: 'a',
|
|
407
|
-
customOptions: selectorOrOptions,
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function queryUrl(context, ...args) {
|
|
412
|
-
const { selector, customOptions } = getQueryUrlArgs(...args);
|
|
413
|
-
|
|
382
|
+
function queryUrl(context, selector = 'a', customOptions) {
|
|
414
383
|
const options = {
|
|
415
384
|
...context.options,
|
|
416
385
|
attribute: 'href',
|