urlpurify 2.0.0 → 2.1.0
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/README.md +1 -1
- package/dist/clean.mjs +7 -17
- package/dist/defaults.mjs +2 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/node_modules/trousse/dist/urls.mjs +33 -4
- package/dist/unwraps/aceml.mjs +2 -4
- package/dist/unwraps/adjust.mjs +5 -5
- package/dist/unwraps/amazonSes.mjs +3 -5
- package/dist/unwraps/anchor.mjs +2 -3
- package/dist/unwraps/apptrkr.mjs +3 -3
- package/dist/unwraps/archiveToday.mjs +2 -2
- package/dist/unwraps/augure.mjs +2 -7
- package/dist/unwraps/bing.mjs +2 -2
- package/dist/unwraps/bingAds.mjs +5 -7
- package/dist/unwraps/bitrix.mjs +3 -2
- package/dist/unwraps/ciscoSecureWeb.mjs +4 -7
- package/dist/unwraps/cjNetwork.mjs +2 -8
- package/dist/unwraps/cse360.mjs +4 -7
- package/dist/unwraps/datalifeEngine.mjs +2 -2
- package/dist/unwraps/deployer.mjs +2 -2
- package/dist/unwraps/digikala.mjs +2 -2
- package/dist/unwraps/disqus.mjs +4 -1
- package/dist/unwraps/easyMarketing.mjs +2 -2
- package/dist/unwraps/facebook.mjs +5 -7
- package/dist/unwraps/feedStatistics.mjs +2 -2
- package/dist/unwraps/firebaseDynamicLinks.mjs +1 -1
- package/dist/unwraps/firstory.mjs +2 -4
- package/dist/unwraps/gfnLinkProxy.mjs +2 -2
- package/dist/unwraps/godcaster.mjs +3 -3
- package/dist/unwraps/govdelivery.d.mts +4 -0
- package/dist/unwraps/govdelivery.mjs +12 -0
- package/dist/unwraps/impact.mjs +3 -3
- package/dist/unwraps/indexHu.mjs +3 -3
- package/dist/unwraps/invisionNoExternalLinks.mjs +3 -3
- package/dist/unwraps/linksynergy.mjs +3 -3
- package/dist/unwraps/logicboard.mjs +3 -3
- package/dist/unwraps/mailinblack.mjs +2 -2
- package/dist/unwraps/mandrill.mjs +2 -2
- package/dist/unwraps/mimecast.mjs +1 -4
- package/dist/unwraps/mohtwize.mjs +2 -6
- package/dist/unwraps/mozillaOutgoing.mjs +2 -2
- package/dist/unwraps/newswire.mjs +2 -2
- package/dist/unwraps/postAffiliatePro.mjs +3 -3
- package/dist/unwraps/postmark.mjs +2 -2
- package/dist/unwraps/prezly.mjs +2 -7
- package/dist/unwraps/proofpointV1.mjs +6 -15
- package/dist/unwraps/proofpointV2.mjs +12 -2
- package/dist/unwraps/qualityClick.mjs +3 -3
- package/dist/unwraps/researchgate.mjs +3 -5
- package/dist/unwraps/reviveAdserver.mjs +3 -5
- package/dist/unwraps/serendipity.mjs +2 -2
- package/dist/unwraps/streak.mjs +3 -5
- package/dist/unwraps/surly.mjs +2 -8
- package/dist/unwraps/webArchive.mjs +2 -2
- package/dist/unwraps/xengentr.mjs +2 -2
- package/dist/unwraps/yahooJapanAmpViewer.mjs +2 -7
- package/dist/unwraps/yahooSearch.mjs +3 -2
- package/dist/unwraps/yandexMail.mjs +2 -2
- package/dist/unwraps/yourMembership.mjs +3 -3
- package/dist/utils.mjs +17 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ const unwrapExample = createParamExtractor({
|
|
|
76
76
|
cleanUrl(url, { unwrappers: [...defaultUnwrappers, unwrapExample] })
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
A value still encoded after one decode, starting with `http%3A` or `https%3A`, is decoded once more. For any other shape, write a plain `UrlUnwrapper`: a function that takes a `URL` and returns the target or `undefined`.
|
|
79
|
+
A value still encoded after one decode, starting with `http%3A` or `https%3A`, is decoded once more. A malformed escape, or one in a legacy charset such as `%E9` for é in Latin-1, stays as written. For any other shape, write a plain `UrlUnwrapper`: a function that takes a `URL` and returns the target or `undefined`.
|
|
80
80
|
|
|
81
81
|
### Tracking parameters
|
|
82
82
|
|
package/dist/clean.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { fixMalformedProtocol, isHttpUrl, isIpAddress, normalizeUrl, parseUrl, stripWww } from "./node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { defaultTrackingParams, defaultUnwrappers } from "./defaults.mjs";
|
|
3
3
|
//#region src/clean.ts
|
|
4
|
-
const replacementCharacter = "�";
|
|
5
4
|
const refDelimitersRegex = /[\s/?#\\:@]/;
|
|
6
5
|
const signatureParams = [
|
|
7
6
|
"sig",
|
|
@@ -62,13 +61,16 @@ const cleanTarget = (target) => {
|
|
|
62
61
|
return repaired;
|
|
63
62
|
};
|
|
64
63
|
const protocolRelativeRegex = /^\/\/[^/]/;
|
|
64
|
+
const bareHostRegex = /^[\p{L}\p{N}-]+(?:\.[\p{L}\p{N}-]+)+(?:[/?#:]|$)/u;
|
|
65
65
|
const addMissingScheme = (target) => {
|
|
66
|
-
if (!target
|
|
67
|
-
return `https:${target}`;
|
|
66
|
+
if (!target) return;
|
|
67
|
+
if (protocolRelativeRegex.test(target)) return `https:${target}`;
|
|
68
|
+
if (bareHostRegex.test(target)) return `https://${target}`;
|
|
69
|
+
return target;
|
|
68
70
|
};
|
|
69
71
|
const applyUnwrappers = (url, unwrappers) => {
|
|
70
72
|
for (const unwrap of unwrappers) {
|
|
71
|
-
const raw = addMissingScheme(unwrap(url));
|
|
73
|
+
const raw = addMissingScheme(unwrap(url)?.trim());
|
|
72
74
|
if (!raw || !isHttpUrl(raw)) continue;
|
|
73
75
|
const target = cleanTarget(raw);
|
|
74
76
|
if (target) return target;
|
|
@@ -81,7 +83,7 @@ const unwrapUrl = (url, unwrappers = defaultUnwrappers) => {
|
|
|
81
83
|
const parsed = parseUrl(url);
|
|
82
84
|
if (!parsed) return;
|
|
83
85
|
const target = applyUnwrappers(parsed, unwrappers);
|
|
84
|
-
if (!target
|
|
86
|
+
if (!target) return;
|
|
85
87
|
return parseUrl(target)?.href;
|
|
86
88
|
};
|
|
87
89
|
const stripTrackingParams = (url, trackingParams = defaultTrackingParams) => {
|
|
@@ -96,25 +98,13 @@ const cleanUrl = (url, options) => {
|
|
|
96
98
|
const maxUnwrapDepth = options?.maxUnwrapDepth ?? 6;
|
|
97
99
|
const parsed = parseUrl(url);
|
|
98
100
|
if (!parsed) return url;
|
|
99
|
-
let currentUrl = url;
|
|
100
101
|
let currentParsed = parsed;
|
|
101
|
-
let intactUrl = url;
|
|
102
|
-
let intactParsed = parsed;
|
|
103
102
|
for (let depth = 0; depth < maxUnwrapDepth; depth += 1) {
|
|
104
103
|
const target = applyUnwrappers(currentParsed, unwrappers);
|
|
105
104
|
if (!target) break;
|
|
106
105
|
const targetParsed = parseUrl(target);
|
|
107
106
|
if (!targetParsed) break;
|
|
108
|
-
currentUrl = target;
|
|
109
107
|
currentParsed = targetParsed;
|
|
110
|
-
if (!target.includes(replacementCharacter)) {
|
|
111
|
-
intactUrl = target;
|
|
112
|
-
intactParsed = targetParsed;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
if (currentUrl.includes(replacementCharacter)) {
|
|
116
|
-
currentUrl = intactUrl;
|
|
117
|
-
currentParsed = intactParsed;
|
|
118
108
|
}
|
|
119
109
|
deleteTrackingParams(currentParsed, trackingParams);
|
|
120
110
|
return currentParsed.href;
|
package/dist/defaults.mjs
CHANGED
|
@@ -151,6 +151,7 @@ import { unwrapGoogleNewsModern } from "./unwraps/googleNewsModern.mjs";
|
|
|
151
151
|
import { unwrapGoogleScholar } from "./unwraps/googleScholar.mjs";
|
|
152
152
|
import { unwrapGoogleTranslate } from "./unwraps/googleTranslate.mjs";
|
|
153
153
|
import { unwrapGoogleWebLight } from "./unwraps/googleWebLight.mjs";
|
|
154
|
+
import { unwrapGovdelivery } from "./unwraps/govdelivery.mjs";
|
|
154
155
|
import { unwrapGroupMail } from "./unwraps/groupMail.mjs";
|
|
155
156
|
import { unwrapGroupon } from "./unwraps/groupon.mjs";
|
|
156
157
|
import { unwrapGumball } from "./unwraps/gumball.mjs";
|
|
@@ -568,6 +569,7 @@ const emailTrackingUnwrappers = [
|
|
|
568
569
|
unwrapElasticEmail,
|
|
569
570
|
unwrapFanbridge,
|
|
570
571
|
unwrapGlueUp,
|
|
572
|
+
unwrapGovdelivery,
|
|
571
573
|
unwrapGroupMail,
|
|
572
574
|
unwrapHellohq,
|
|
573
575
|
unwrapHubspotSidekick,
|
package/dist/index.d.mts
CHANGED
|
@@ -154,6 +154,7 @@ import { unwrapGoogleNewsModern } from "./unwraps/googleNewsModern.mjs";
|
|
|
154
154
|
import { unwrapGoogleScholar } from "./unwraps/googleScholar.mjs";
|
|
155
155
|
import { unwrapGoogleTranslate } from "./unwraps/googleTranslate.mjs";
|
|
156
156
|
import { unwrapGoogleWebLight } from "./unwraps/googleWebLight.mjs";
|
|
157
|
+
import { unwrapGovdelivery } from "./unwraps/govdelivery.mjs";
|
|
157
158
|
import { unwrapGroupMail } from "./unwraps/groupMail.mjs";
|
|
158
159
|
import { unwrapGroupon } from "./unwraps/groupon.mjs";
|
|
159
160
|
import { unwrapGumball } from "./unwraps/gumball.mjs";
|
|
@@ -388,4 +389,4 @@ import { unwrapZhihu } from "./unwraps/zhihu.mjs";
|
|
|
388
389
|
import { unwrapZix } from "./unwraps/zix.mjs";
|
|
389
390
|
import { unwrapZscalerIsolation } from "./unwraps/zscalerIsolation.mjs";
|
|
390
391
|
import { ParamExtractorConfig, createParamExtractor } from "./utils.mjs";
|
|
391
|
-
export { type CleanUrlOptions, type ParamExtractorConfig, type TrackingParam, type UrlUnwrapper, advertisingUnwrappers, affiliateParams, affiliateUnwrappers, archiveProxyUnwrappers, campaignParams, cleanUrl, clickAttributionParams, clickCounterUnwrappers, createParamExtractor, defaultTrackingParams, defaultUnwrappers, downloadMeasurementUnwrappers, emailTrackingUnwrappers, housekeepingParams, linkShimUnwrappers, pressReleaseUnwrappers, searchClickUnwrappers, securityGatewayUnwrappers, signInShimUnwrappers, stripTrackingParams, trackingParamsLiterals, trackingParamsPatterns, unwrap12ft, unwrap2performant, unwrap4pda, unwrapA8Net, unwrapAboutCom, unwrapAcast, unwrapAccesstrade, unwrapAceml, unwrapAdcell, unwrapAdfly, unwrapAdjust, unwrapAdmitad, unwrapAdrecord, unwrapAdtraction, unwrapAffilae, unwrapAffiliateFuture, unwrapAffiliatesOne, unwrapAliexpress, unwrapAliyun, unwrapAllblog, unwrapAmazonAffiliate, unwrapAmazonSes, unwrapAmpCache, unwrapAnchor, unwrapAnonymTo, unwrapAnonymouse, unwrapAppsflyerOnelink, unwrapApptrkr, unwrapArchiveToday, unwrapArquivo, unwrapArttrack, unwrapArxiv, unwrapAsk, unwrapAugure, unwrapAusha, unwrapAvantlink, unwrapAwesound, unwrapAwin, unwrapAxigen, unwrapBabyblog, unwrapBacLacWebArchive, unwrapBale, unwrapBananatag, unwrapBarracudaLinkProtect, unwrapBig5Gate, unwrapBing, unwrapBingAds, unwrapBitrix, unwrapBitrixBanner, unwrapBizrate, unwrapBlubrry, unwrapBlueskyRedirect, unwrapBolPartner, unwrapBridgyFed, unwrapBusinessWire, unwrapButton, unwrapBuyAt, unwrapBuybox, unwrapBuzzstream, unwrapBytedance, unwrapCake, unwrapCalendly, unwrapCanva, unwrapCastPlus, unwrapCcbill, unwrapChartable, unwrapCheckPointHarmony, unwrapChitika, unwrapCiscoSecureWeb, unwrapCjNetwork, unwrapClaritas, unwrapCleverbridge, unwrapClevercomm, unwrapCloudhq, unwrapCloze, unwrapCohst, unwrapCommissionFactory, unwrapCommunicationads, unwrapConstantContact, unwrapContactMonkey, unwrapConvertiser, unwrapCsdn, unwrapCse360, unwrapCuelinks, unwrapDasBlog, unwrapDatalifeEngine, unwrapDeployer, unwrapDerefMail, unwrapDeviantartOutgoing, unwrapDigidip, unwrapDigikala, unwrapDirectMail, unwrapDisqus, unwrapDmmAffiliate, unwrapDognet, unwrapDouban, unwrapDropbox, unwrapDstats, unwrapDuckduckgo, unwrapDuckduckgoAds, unwrapDuomai, unwrapDyn, unwrapDzen, unwrapEClick, unwrapEasyMarketing, unwrapEbayRover, unwrapEbuzzing, unwrapEdgepilot, unwrapEffiliation, unwrapEhub, unwrapElasticEmail, unwrapEmbedly, unwrapEpn, unwrapEsva, unwrapEulerian, unwrapEvernote, unwrapExciteTranslate, unwrapExpediaAffiliate, unwrapFacebookShim, unwrapFanbridge, unwrapFederatedMedia, unwrapFeedStatistics, unwrapFeedblitz, unwrapFeedsportal, unwrapFinalsite, unwrapFirebaseDynamicLinks, unwrapFireeye, unwrapFirstory, unwrapFiveByFive, unwrapFiverr, unwrapFlexoffers, unwrapFlipboard, unwrapFortimail, unwrapFtc, unwrapGateSc, unwrapGeoriot, unwrapGfnLinkProxy, unwrapGitee, unwrapGlueUp, unwrapGodcaster, unwrapGoogle, unwrapGoogleAds, unwrapGoogleAmpViewer, unwrapGoogleNews, unwrapGoogleNewsModern, unwrapGoogleScholar, unwrapGoogleTranslate, unwrapGoogleWebLight, unwrapGroupMail, unwrapGroupon, unwrapGumball, unwrapGurunavi, unwrapHackerone, unwrapHashnode, unwrapHasoffers, unwrapHearthis, unwrapHellohq, unwrapHirkereso, unwrapHorde, unwrapHornetsecurity, unwrapHrefLi, unwrapHubspotSidekick, unwrapIcptrack, unwrapIgafnl, unwrapImpact, unwrapIndexHu, unwrapInfospace, unwrapInsiderAffiliate, unwrapInstagramShim, unwrapIntranetQuorum, unwrapInvisionNoExternalLinks, unwrapInvolveAsia, unwrapIrs, unwrapJianshuGo, unwrapJive, unwrapJuejin, unwrapJustwatch, unwrapKlook, unwrapLazada, unwrapLd246, unwrapLetscast, unwrapLeverAnalytics, unwrapLinkA, unwrapLinkconnector, unwrapLinkedin, unwrapLinksynergy, unwrapLinktrust, unwrapLinkwise, unwrapLivejournal, unwrapLnkam, unwrapLocWebArchive, unwrapLocaweb, unwrapLogicboard, unwrapMagellan, unwrapMagnetmail, unwrapMail2easy, unwrapMailRu, unwrapMailRuLink, unwrapMailchimp, unwrapMailinblack, unwrapMailpanion, unwrapMailpgn, unwrapMailstat, unwrapMailtrack, unwrapMandrill, unwrapMarketwire, unwrapMcas, unwrapMedium, unwrapMegalodon, unwrapMimecast, unwrapMinistryCloud, unwrapMintDownloads, unwrapMintFeeder, unwrapMohtwize, unwrapMoshimo, unwrapMozillaOutgoing, unwrapMyNewsletterBuilder, unwrapNarrativ, unwrapNatlibNz, unwrapNaverOutgoing, unwrapNcls, unwrapNdlWarp, unwrapNetaffiliation, unwrapNetcentrum, unwrapNewswire, unwrapNicoMs, unwrapNimble, unwrapNlaWebarchive, unwrapNodeseek, unwrapOkRu, unwrapOp3, unwrapOrkut, unwrapOsnova, unwrapOutlookSafelinks, unwrapOutlookWebAccess, unwrapPagefreezer, unwrapPartnerAds, unwrapPbs, unwrapPhilpapers, unwrapPinterest, unwrapPipedrive, unwrapPocket, unwrapPodcorn, unwrapPodder, unwrapPodkite, unwrapPodroll, unwrapPodscribe, unwrapPodsights, unwrapPodtrac, unwrapPodup, unwrapPostAffiliatePro, unwrapPostmark, unwrapPrNewswire, unwrapPrezly, unwrapPriceGrabber, unwrapPromoJukebox, unwrapProofpointIsolation, unwrapProofpointV1, unwrapProofpointV2, unwrapProofpointV3, unwrapPrweb, unwrapQualityClick, unwrapRakutenAffiliate, unwrapRamblerMail, unwrapRecruitics, unwrapRedditOut, unwrapRediffmail, unwrapRedirectingat, unwrapResearchgate, unwrapReverbnation, unwrapReviveAdserver, unwrapSalesdoubler, unwrapSalesflare, unwrapSalesforceiq, unwrapSaleshandy, unwrapSalsa, unwrapSapHelp, unwrapSbsAd, unwrapSegmentfault, unwrapSerendipity, unwrapShareasale, unwrapShareit, unwrapSkimlinks, unwrapSkyrock, unwrapSlack, unwrapSlickdeals, unwrapSmartAdserver, unwrapSmartredirect, unwrapSmry, unwrapSophos, unwrapSoundOn, unwrapSoundcloud, unwrapSoundstack, unwrapSquarespaceEmail, unwrapSspai, unwrapStay22, unwrapSteamLinkfilter, unwrapStorify, unwrapStreak, unwrapStreamsend, unwrapStumbleupon, unwrapSubscribeRu, unwrapSubstack, unwrapSurly, unwrapSurugaya, unwrapSwap, unwrapSymantecClicktime, unwrapSymplicity, unwrapTargetCircle, unwrapTeacup, unwrapTelegramIv, unwrapTheRegister, unwrapThreadsShim, unwrapTiktok, unwrapTitanhqLinklock, unwrapTopsec, unwrapToucharcade, unwrapTracdelight, unwrapTradedoubler, unwrapTradetracker, unwrapTravelpayouts, unwrapTrendMicro, unwrapTriplelift, unwrapTrustwaveScanmail, unwrapTrxHub, unwrapTumblr, unwrapTwitterRedirect, unwrapTwoCheckout, unwrapUinterbox, unwrapUkWebArchive, unwrapUkgwa, unwrapUnescoWebArchive, unwrapUnhcrWebArchive, unwrapUnisender, unwrapUpAudio, unwrapUrl, unwrapVadeSecure, unwrapValuePress, unwrapValuecommerce, unwrapVanilla, unwrapVbulletin, unwrapVefsafn, unwrapVgWort, unwrapViglink, unwrapVirgool, unwrapVisibli, unwrapVkAway, unwrapVocus, unwrapVoxnest, unwrapVpixl, unwrapVuture, unwrapWebArchive, unwrapWebcitation, unwrapWebgains, unwrapWebharvest, unwrapWikiwix, unwrapWikizero, unwrapWordpressEmail, unwrapWordpressGo2, unwrapWorldNomads, unwrapWpPoczta, unwrapXengentr, unwrapXiaoyuzhou, unwrapXimalaya, unwrapYahooJapan, unwrapYahooJapanAmpViewer, unwrapYahooSearch, unwrapYamm, unwrapYandexMail, unwrapYandexTranslate, unwrapYandexTurbo, unwrapYelp, unwrapYesware, unwrapYouTube, unwrapYourMembership, unwrapZanox, unwrapZayads, unwrapZemanta, unwrapZencastr, unwrapZhihu, unwrapZix, unwrapZscalerIsolation, visitorIdParams };
|
|
392
|
+
export { type CleanUrlOptions, type ParamExtractorConfig, type TrackingParam, type UrlUnwrapper, advertisingUnwrappers, affiliateParams, affiliateUnwrappers, archiveProxyUnwrappers, campaignParams, cleanUrl, clickAttributionParams, clickCounterUnwrappers, createParamExtractor, defaultTrackingParams, defaultUnwrappers, downloadMeasurementUnwrappers, emailTrackingUnwrappers, housekeepingParams, linkShimUnwrappers, pressReleaseUnwrappers, searchClickUnwrappers, securityGatewayUnwrappers, signInShimUnwrappers, stripTrackingParams, trackingParamsLiterals, trackingParamsPatterns, unwrap12ft, unwrap2performant, unwrap4pda, unwrapA8Net, unwrapAboutCom, unwrapAcast, unwrapAccesstrade, unwrapAceml, unwrapAdcell, unwrapAdfly, unwrapAdjust, unwrapAdmitad, unwrapAdrecord, unwrapAdtraction, unwrapAffilae, unwrapAffiliateFuture, unwrapAffiliatesOne, unwrapAliexpress, unwrapAliyun, unwrapAllblog, unwrapAmazonAffiliate, unwrapAmazonSes, unwrapAmpCache, unwrapAnchor, unwrapAnonymTo, unwrapAnonymouse, unwrapAppsflyerOnelink, unwrapApptrkr, unwrapArchiveToday, unwrapArquivo, unwrapArttrack, unwrapArxiv, unwrapAsk, unwrapAugure, unwrapAusha, unwrapAvantlink, unwrapAwesound, unwrapAwin, unwrapAxigen, unwrapBabyblog, unwrapBacLacWebArchive, unwrapBale, unwrapBananatag, unwrapBarracudaLinkProtect, unwrapBig5Gate, unwrapBing, unwrapBingAds, unwrapBitrix, unwrapBitrixBanner, unwrapBizrate, unwrapBlubrry, unwrapBlueskyRedirect, unwrapBolPartner, unwrapBridgyFed, unwrapBusinessWire, unwrapButton, unwrapBuyAt, unwrapBuybox, unwrapBuzzstream, unwrapBytedance, unwrapCake, unwrapCalendly, unwrapCanva, unwrapCastPlus, unwrapCcbill, unwrapChartable, unwrapCheckPointHarmony, unwrapChitika, unwrapCiscoSecureWeb, unwrapCjNetwork, unwrapClaritas, unwrapCleverbridge, unwrapClevercomm, unwrapCloudhq, unwrapCloze, unwrapCohst, unwrapCommissionFactory, unwrapCommunicationads, unwrapConstantContact, unwrapContactMonkey, unwrapConvertiser, unwrapCsdn, unwrapCse360, unwrapCuelinks, unwrapDasBlog, unwrapDatalifeEngine, unwrapDeployer, unwrapDerefMail, unwrapDeviantartOutgoing, unwrapDigidip, unwrapDigikala, unwrapDirectMail, unwrapDisqus, unwrapDmmAffiliate, unwrapDognet, unwrapDouban, unwrapDropbox, unwrapDstats, unwrapDuckduckgo, unwrapDuckduckgoAds, unwrapDuomai, unwrapDyn, unwrapDzen, unwrapEClick, unwrapEasyMarketing, unwrapEbayRover, unwrapEbuzzing, unwrapEdgepilot, unwrapEffiliation, unwrapEhub, unwrapElasticEmail, unwrapEmbedly, unwrapEpn, unwrapEsva, unwrapEulerian, unwrapEvernote, unwrapExciteTranslate, unwrapExpediaAffiliate, unwrapFacebookShim, unwrapFanbridge, unwrapFederatedMedia, unwrapFeedStatistics, unwrapFeedblitz, unwrapFeedsportal, unwrapFinalsite, unwrapFirebaseDynamicLinks, unwrapFireeye, unwrapFirstory, unwrapFiveByFive, unwrapFiverr, unwrapFlexoffers, unwrapFlipboard, unwrapFortimail, unwrapFtc, unwrapGateSc, unwrapGeoriot, unwrapGfnLinkProxy, unwrapGitee, unwrapGlueUp, unwrapGodcaster, unwrapGoogle, unwrapGoogleAds, unwrapGoogleAmpViewer, unwrapGoogleNews, unwrapGoogleNewsModern, unwrapGoogleScholar, unwrapGoogleTranslate, unwrapGoogleWebLight, unwrapGovdelivery, unwrapGroupMail, unwrapGroupon, unwrapGumball, unwrapGurunavi, unwrapHackerone, unwrapHashnode, unwrapHasoffers, unwrapHearthis, unwrapHellohq, unwrapHirkereso, unwrapHorde, unwrapHornetsecurity, unwrapHrefLi, unwrapHubspotSidekick, unwrapIcptrack, unwrapIgafnl, unwrapImpact, unwrapIndexHu, unwrapInfospace, unwrapInsiderAffiliate, unwrapInstagramShim, unwrapIntranetQuorum, unwrapInvisionNoExternalLinks, unwrapInvolveAsia, unwrapIrs, unwrapJianshuGo, unwrapJive, unwrapJuejin, unwrapJustwatch, unwrapKlook, unwrapLazada, unwrapLd246, unwrapLetscast, unwrapLeverAnalytics, unwrapLinkA, unwrapLinkconnector, unwrapLinkedin, unwrapLinksynergy, unwrapLinktrust, unwrapLinkwise, unwrapLivejournal, unwrapLnkam, unwrapLocWebArchive, unwrapLocaweb, unwrapLogicboard, unwrapMagellan, unwrapMagnetmail, unwrapMail2easy, unwrapMailRu, unwrapMailRuLink, unwrapMailchimp, unwrapMailinblack, unwrapMailpanion, unwrapMailpgn, unwrapMailstat, unwrapMailtrack, unwrapMandrill, unwrapMarketwire, unwrapMcas, unwrapMedium, unwrapMegalodon, unwrapMimecast, unwrapMinistryCloud, unwrapMintDownloads, unwrapMintFeeder, unwrapMohtwize, unwrapMoshimo, unwrapMozillaOutgoing, unwrapMyNewsletterBuilder, unwrapNarrativ, unwrapNatlibNz, unwrapNaverOutgoing, unwrapNcls, unwrapNdlWarp, unwrapNetaffiliation, unwrapNetcentrum, unwrapNewswire, unwrapNicoMs, unwrapNimble, unwrapNlaWebarchive, unwrapNodeseek, unwrapOkRu, unwrapOp3, unwrapOrkut, unwrapOsnova, unwrapOutlookSafelinks, unwrapOutlookWebAccess, unwrapPagefreezer, unwrapPartnerAds, unwrapPbs, unwrapPhilpapers, unwrapPinterest, unwrapPipedrive, unwrapPocket, unwrapPodcorn, unwrapPodder, unwrapPodkite, unwrapPodroll, unwrapPodscribe, unwrapPodsights, unwrapPodtrac, unwrapPodup, unwrapPostAffiliatePro, unwrapPostmark, unwrapPrNewswire, unwrapPrezly, unwrapPriceGrabber, unwrapPromoJukebox, unwrapProofpointIsolation, unwrapProofpointV1, unwrapProofpointV2, unwrapProofpointV3, unwrapPrweb, unwrapQualityClick, unwrapRakutenAffiliate, unwrapRamblerMail, unwrapRecruitics, unwrapRedditOut, unwrapRediffmail, unwrapRedirectingat, unwrapResearchgate, unwrapReverbnation, unwrapReviveAdserver, unwrapSalesdoubler, unwrapSalesflare, unwrapSalesforceiq, unwrapSaleshandy, unwrapSalsa, unwrapSapHelp, unwrapSbsAd, unwrapSegmentfault, unwrapSerendipity, unwrapShareasale, unwrapShareit, unwrapSkimlinks, unwrapSkyrock, unwrapSlack, unwrapSlickdeals, unwrapSmartAdserver, unwrapSmartredirect, unwrapSmry, unwrapSophos, unwrapSoundOn, unwrapSoundcloud, unwrapSoundstack, unwrapSquarespaceEmail, unwrapSspai, unwrapStay22, unwrapSteamLinkfilter, unwrapStorify, unwrapStreak, unwrapStreamsend, unwrapStumbleupon, unwrapSubscribeRu, unwrapSubstack, unwrapSurly, unwrapSurugaya, unwrapSwap, unwrapSymantecClicktime, unwrapSymplicity, unwrapTargetCircle, unwrapTeacup, unwrapTelegramIv, unwrapTheRegister, unwrapThreadsShim, unwrapTiktok, unwrapTitanhqLinklock, unwrapTopsec, unwrapToucharcade, unwrapTracdelight, unwrapTradedoubler, unwrapTradetracker, unwrapTravelpayouts, unwrapTrendMicro, unwrapTriplelift, unwrapTrustwaveScanmail, unwrapTrxHub, unwrapTumblr, unwrapTwitterRedirect, unwrapTwoCheckout, unwrapUinterbox, unwrapUkWebArchive, unwrapUkgwa, unwrapUnescoWebArchive, unwrapUnhcrWebArchive, unwrapUnisender, unwrapUpAudio, unwrapUrl, unwrapVadeSecure, unwrapValuePress, unwrapValuecommerce, unwrapVanilla, unwrapVbulletin, unwrapVefsafn, unwrapVgWort, unwrapViglink, unwrapVirgool, unwrapVisibli, unwrapVkAway, unwrapVocus, unwrapVoxnest, unwrapVpixl, unwrapVuture, unwrapWebArchive, unwrapWebcitation, unwrapWebgains, unwrapWebharvest, unwrapWikiwix, unwrapWikizero, unwrapWordpressEmail, unwrapWordpressGo2, unwrapWorldNomads, unwrapWpPoczta, unwrapXengentr, unwrapXiaoyuzhou, unwrapXimalaya, unwrapYahooJapan, unwrapYahooJapanAmpViewer, unwrapYahooSearch, unwrapYamm, unwrapYandexMail, unwrapYandexTranslate, unwrapYandexTurbo, unwrapYelp, unwrapYesware, unwrapYouTube, unwrapYourMembership, unwrapZanox, unwrapZayads, unwrapZemanta, unwrapZencastr, unwrapZhihu, unwrapZix, unwrapZscalerIsolation, visitorIdParams };
|
package/dist/index.mjs
CHANGED
|
@@ -152,6 +152,7 @@ import { unwrapGoogleNewsModern } from "./unwraps/googleNewsModern.mjs";
|
|
|
152
152
|
import { unwrapGoogleScholar } from "./unwraps/googleScholar.mjs";
|
|
153
153
|
import { unwrapGoogleTranslate } from "./unwraps/googleTranslate.mjs";
|
|
154
154
|
import { unwrapGoogleWebLight } from "./unwraps/googleWebLight.mjs";
|
|
155
|
+
import { unwrapGovdelivery } from "./unwraps/govdelivery.mjs";
|
|
155
156
|
import { unwrapGroupMail } from "./unwraps/groupMail.mjs";
|
|
156
157
|
import { unwrapGroupon } from "./unwraps/groupon.mjs";
|
|
157
158
|
import { unwrapGumball } from "./unwraps/gumball.mjs";
|
|
@@ -387,4 +388,4 @@ import { unwrapZix } from "./unwraps/zix.mjs";
|
|
|
387
388
|
import { unwrapZscalerIsolation } from "./unwraps/zscalerIsolation.mjs";
|
|
388
389
|
import { advertisingUnwrappers, affiliateUnwrappers, archiveProxyUnwrappers, clickCounterUnwrappers, defaultTrackingParams, defaultUnwrappers, downloadMeasurementUnwrappers, emailTrackingUnwrappers, linkShimUnwrappers, pressReleaseUnwrappers, searchClickUnwrappers, securityGatewayUnwrappers, signInShimUnwrappers, trackingParamsLiterals, trackingParamsPatterns } from "./defaults.mjs";
|
|
389
390
|
import { cleanUrl, stripTrackingParams, unwrapUrl } from "./clean.mjs";
|
|
390
|
-
export { advertisingUnwrappers, affiliateParams, affiliateUnwrappers, archiveProxyUnwrappers, campaignParams, cleanUrl, clickAttributionParams, clickCounterUnwrappers, createParamExtractor, defaultTrackingParams, defaultUnwrappers, downloadMeasurementUnwrappers, emailTrackingUnwrappers, housekeepingParams, linkShimUnwrappers, pressReleaseUnwrappers, searchClickUnwrappers, securityGatewayUnwrappers, signInShimUnwrappers, stripTrackingParams, trackingParamsLiterals, trackingParamsPatterns, unwrap12ft, unwrap2performant, unwrap4pda, unwrapA8Net, unwrapAboutCom, unwrapAcast, unwrapAccesstrade, unwrapAceml, unwrapAdcell, unwrapAdfly, unwrapAdjust, unwrapAdmitad, unwrapAdrecord, unwrapAdtraction, unwrapAffilae, unwrapAffiliateFuture, unwrapAffiliatesOne, unwrapAliexpress, unwrapAliyun, unwrapAllblog, unwrapAmazonAffiliate, unwrapAmazonSes, unwrapAmpCache, unwrapAnchor, unwrapAnonymTo, unwrapAnonymouse, unwrapAppsflyerOnelink, unwrapApptrkr, unwrapArchiveToday, unwrapArquivo, unwrapArttrack, unwrapArxiv, unwrapAsk, unwrapAugure, unwrapAusha, unwrapAvantlink, unwrapAwesound, unwrapAwin, unwrapAxigen, unwrapBabyblog, unwrapBacLacWebArchive, unwrapBale, unwrapBananatag, unwrapBarracudaLinkProtect, unwrapBig5Gate, unwrapBing, unwrapBingAds, unwrapBitrix, unwrapBitrixBanner, unwrapBizrate, unwrapBlubrry, unwrapBlueskyRedirect, unwrapBolPartner, unwrapBridgyFed, unwrapBusinessWire, unwrapButton, unwrapBuyAt, unwrapBuybox, unwrapBuzzstream, unwrapBytedance, unwrapCake, unwrapCalendly, unwrapCanva, unwrapCastPlus, unwrapCcbill, unwrapChartable, unwrapCheckPointHarmony, unwrapChitika, unwrapCiscoSecureWeb, unwrapCjNetwork, unwrapClaritas, unwrapCleverbridge, unwrapClevercomm, unwrapCloudhq, unwrapCloze, unwrapCohst, unwrapCommissionFactory, unwrapCommunicationads, unwrapConstantContact, unwrapContactMonkey, unwrapConvertiser, unwrapCsdn, unwrapCse360, unwrapCuelinks, unwrapDasBlog, unwrapDatalifeEngine, unwrapDeployer, unwrapDerefMail, unwrapDeviantartOutgoing, unwrapDigidip, unwrapDigikala, unwrapDirectMail, unwrapDisqus, unwrapDmmAffiliate, unwrapDognet, unwrapDouban, unwrapDropbox, unwrapDstats, unwrapDuckduckgo, unwrapDuckduckgoAds, unwrapDuomai, unwrapDyn, unwrapDzen, unwrapEClick, unwrapEasyMarketing, unwrapEbayRover, unwrapEbuzzing, unwrapEdgepilot, unwrapEffiliation, unwrapEhub, unwrapElasticEmail, unwrapEmbedly, unwrapEpn, unwrapEsva, unwrapEulerian, unwrapEvernote, unwrapExciteTranslate, unwrapExpediaAffiliate, unwrapFacebookShim, unwrapFanbridge, unwrapFederatedMedia, unwrapFeedStatistics, unwrapFeedblitz, unwrapFeedsportal, unwrapFinalsite, unwrapFirebaseDynamicLinks, unwrapFireeye, unwrapFirstory, unwrapFiveByFive, unwrapFiverr, unwrapFlexoffers, unwrapFlipboard, unwrapFortimail, unwrapFtc, unwrapGateSc, unwrapGeoriot, unwrapGfnLinkProxy, unwrapGitee, unwrapGlueUp, unwrapGodcaster, unwrapGoogle, unwrapGoogleAds, unwrapGoogleAmpViewer, unwrapGoogleNews, unwrapGoogleNewsModern, unwrapGoogleScholar, unwrapGoogleTranslate, unwrapGoogleWebLight, unwrapGroupMail, unwrapGroupon, unwrapGumball, unwrapGurunavi, unwrapHackerone, unwrapHashnode, unwrapHasoffers, unwrapHearthis, unwrapHellohq, unwrapHirkereso, unwrapHorde, unwrapHornetsecurity, unwrapHrefLi, unwrapHubspotSidekick, unwrapIcptrack, unwrapIgafnl, unwrapImpact, unwrapIndexHu, unwrapInfospace, unwrapInsiderAffiliate, unwrapInstagramShim, unwrapIntranetQuorum, unwrapInvisionNoExternalLinks, unwrapInvolveAsia, unwrapIrs, unwrapJianshuGo, unwrapJive, unwrapJuejin, unwrapJustwatch, unwrapKlook, unwrapLazada, unwrapLd246, unwrapLetscast, unwrapLeverAnalytics, unwrapLinkA, unwrapLinkconnector, unwrapLinkedin, unwrapLinksynergy, unwrapLinktrust, unwrapLinkwise, unwrapLivejournal, unwrapLnkam, unwrapLocWebArchive, unwrapLocaweb, unwrapLogicboard, unwrapMagellan, unwrapMagnetmail, unwrapMail2easy, unwrapMailRu, unwrapMailRuLink, unwrapMailchimp, unwrapMailinblack, unwrapMailpanion, unwrapMailpgn, unwrapMailstat, unwrapMailtrack, unwrapMandrill, unwrapMarketwire, unwrapMcas, unwrapMedium, unwrapMegalodon, unwrapMimecast, unwrapMinistryCloud, unwrapMintDownloads, unwrapMintFeeder, unwrapMohtwize, unwrapMoshimo, unwrapMozillaOutgoing, unwrapMyNewsletterBuilder, unwrapNarrativ, unwrapNatlibNz, unwrapNaverOutgoing, unwrapNcls, unwrapNdlWarp, unwrapNetaffiliation, unwrapNetcentrum, unwrapNewswire, unwrapNicoMs, unwrapNimble, unwrapNlaWebarchive, unwrapNodeseek, unwrapOkRu, unwrapOp3, unwrapOrkut, unwrapOsnova, unwrapOutlookSafelinks, unwrapOutlookWebAccess, unwrapPagefreezer, unwrapPartnerAds, unwrapPbs, unwrapPhilpapers, unwrapPinterest, unwrapPipedrive, unwrapPocket, unwrapPodcorn, unwrapPodder, unwrapPodkite, unwrapPodroll, unwrapPodscribe, unwrapPodsights, unwrapPodtrac, unwrapPodup, unwrapPostAffiliatePro, unwrapPostmark, unwrapPrNewswire, unwrapPrezly, unwrapPriceGrabber, unwrapPromoJukebox, unwrapProofpointIsolation, unwrapProofpointV1, unwrapProofpointV2, unwrapProofpointV3, unwrapPrweb, unwrapQualityClick, unwrapRakutenAffiliate, unwrapRamblerMail, unwrapRecruitics, unwrapRedditOut, unwrapRediffmail, unwrapRedirectingat, unwrapResearchgate, unwrapReverbnation, unwrapReviveAdserver, unwrapSalesdoubler, unwrapSalesflare, unwrapSalesforceiq, unwrapSaleshandy, unwrapSalsa, unwrapSapHelp, unwrapSbsAd, unwrapSegmentfault, unwrapSerendipity, unwrapShareasale, unwrapShareit, unwrapSkimlinks, unwrapSkyrock, unwrapSlack, unwrapSlickdeals, unwrapSmartAdserver, unwrapSmartredirect, unwrapSmry, unwrapSophos, unwrapSoundOn, unwrapSoundcloud, unwrapSoundstack, unwrapSquarespaceEmail, unwrapSspai, unwrapStay22, unwrapSteamLinkfilter, unwrapStorify, unwrapStreak, unwrapStreamsend, unwrapStumbleupon, unwrapSubscribeRu, unwrapSubstack, unwrapSurly, unwrapSurugaya, unwrapSwap, unwrapSymantecClicktime, unwrapSymplicity, unwrapTargetCircle, unwrapTeacup, unwrapTelegramIv, unwrapTheRegister, unwrapThreadsShim, unwrapTiktok, unwrapTitanhqLinklock, unwrapTopsec, unwrapToucharcade, unwrapTracdelight, unwrapTradedoubler, unwrapTradetracker, unwrapTravelpayouts, unwrapTrendMicro, unwrapTriplelift, unwrapTrustwaveScanmail, unwrapTrxHub, unwrapTumblr, unwrapTwitterRedirect, unwrapTwoCheckout, unwrapUinterbox, unwrapUkWebArchive, unwrapUkgwa, unwrapUnescoWebArchive, unwrapUnhcrWebArchive, unwrapUnisender, unwrapUpAudio, unwrapUrl, unwrapVadeSecure, unwrapValuePress, unwrapValuecommerce, unwrapVanilla, unwrapVbulletin, unwrapVefsafn, unwrapVgWort, unwrapViglink, unwrapVirgool, unwrapVisibli, unwrapVkAway, unwrapVocus, unwrapVoxnest, unwrapVpixl, unwrapVuture, unwrapWebArchive, unwrapWebcitation, unwrapWebgains, unwrapWebharvest, unwrapWikiwix, unwrapWikizero, unwrapWordpressEmail, unwrapWordpressGo2, unwrapWorldNomads, unwrapWpPoczta, unwrapXengentr, unwrapXiaoyuzhou, unwrapXimalaya, unwrapYahooJapan, unwrapYahooJapanAmpViewer, unwrapYahooSearch, unwrapYamm, unwrapYandexMail, unwrapYandexTranslate, unwrapYandexTurbo, unwrapYelp, unwrapYesware, unwrapYouTube, unwrapYourMembership, unwrapZanox, unwrapZayads, unwrapZemanta, unwrapZencastr, unwrapZhihu, unwrapZix, unwrapZscalerIsolation, visitorIdParams };
|
|
391
|
+
export { advertisingUnwrappers, affiliateParams, affiliateUnwrappers, archiveProxyUnwrappers, campaignParams, cleanUrl, clickAttributionParams, clickCounterUnwrappers, createParamExtractor, defaultTrackingParams, defaultUnwrappers, downloadMeasurementUnwrappers, emailTrackingUnwrappers, housekeepingParams, linkShimUnwrappers, pressReleaseUnwrappers, searchClickUnwrappers, securityGatewayUnwrappers, signInShimUnwrappers, stripTrackingParams, trackingParamsLiterals, trackingParamsPatterns, unwrap12ft, unwrap2performant, unwrap4pda, unwrapA8Net, unwrapAboutCom, unwrapAcast, unwrapAccesstrade, unwrapAceml, unwrapAdcell, unwrapAdfly, unwrapAdjust, unwrapAdmitad, unwrapAdrecord, unwrapAdtraction, unwrapAffilae, unwrapAffiliateFuture, unwrapAffiliatesOne, unwrapAliexpress, unwrapAliyun, unwrapAllblog, unwrapAmazonAffiliate, unwrapAmazonSes, unwrapAmpCache, unwrapAnchor, unwrapAnonymTo, unwrapAnonymouse, unwrapAppsflyerOnelink, unwrapApptrkr, unwrapArchiveToday, unwrapArquivo, unwrapArttrack, unwrapArxiv, unwrapAsk, unwrapAugure, unwrapAusha, unwrapAvantlink, unwrapAwesound, unwrapAwin, unwrapAxigen, unwrapBabyblog, unwrapBacLacWebArchive, unwrapBale, unwrapBananatag, unwrapBarracudaLinkProtect, unwrapBig5Gate, unwrapBing, unwrapBingAds, unwrapBitrix, unwrapBitrixBanner, unwrapBizrate, unwrapBlubrry, unwrapBlueskyRedirect, unwrapBolPartner, unwrapBridgyFed, unwrapBusinessWire, unwrapButton, unwrapBuyAt, unwrapBuybox, unwrapBuzzstream, unwrapBytedance, unwrapCake, unwrapCalendly, unwrapCanva, unwrapCastPlus, unwrapCcbill, unwrapChartable, unwrapCheckPointHarmony, unwrapChitika, unwrapCiscoSecureWeb, unwrapCjNetwork, unwrapClaritas, unwrapCleverbridge, unwrapClevercomm, unwrapCloudhq, unwrapCloze, unwrapCohst, unwrapCommissionFactory, unwrapCommunicationads, unwrapConstantContact, unwrapContactMonkey, unwrapConvertiser, unwrapCsdn, unwrapCse360, unwrapCuelinks, unwrapDasBlog, unwrapDatalifeEngine, unwrapDeployer, unwrapDerefMail, unwrapDeviantartOutgoing, unwrapDigidip, unwrapDigikala, unwrapDirectMail, unwrapDisqus, unwrapDmmAffiliate, unwrapDognet, unwrapDouban, unwrapDropbox, unwrapDstats, unwrapDuckduckgo, unwrapDuckduckgoAds, unwrapDuomai, unwrapDyn, unwrapDzen, unwrapEClick, unwrapEasyMarketing, unwrapEbayRover, unwrapEbuzzing, unwrapEdgepilot, unwrapEffiliation, unwrapEhub, unwrapElasticEmail, unwrapEmbedly, unwrapEpn, unwrapEsva, unwrapEulerian, unwrapEvernote, unwrapExciteTranslate, unwrapExpediaAffiliate, unwrapFacebookShim, unwrapFanbridge, unwrapFederatedMedia, unwrapFeedStatistics, unwrapFeedblitz, unwrapFeedsportal, unwrapFinalsite, unwrapFirebaseDynamicLinks, unwrapFireeye, unwrapFirstory, unwrapFiveByFive, unwrapFiverr, unwrapFlexoffers, unwrapFlipboard, unwrapFortimail, unwrapFtc, unwrapGateSc, unwrapGeoriot, unwrapGfnLinkProxy, unwrapGitee, unwrapGlueUp, unwrapGodcaster, unwrapGoogle, unwrapGoogleAds, unwrapGoogleAmpViewer, unwrapGoogleNews, unwrapGoogleNewsModern, unwrapGoogleScholar, unwrapGoogleTranslate, unwrapGoogleWebLight, unwrapGovdelivery, unwrapGroupMail, unwrapGroupon, unwrapGumball, unwrapGurunavi, unwrapHackerone, unwrapHashnode, unwrapHasoffers, unwrapHearthis, unwrapHellohq, unwrapHirkereso, unwrapHorde, unwrapHornetsecurity, unwrapHrefLi, unwrapHubspotSidekick, unwrapIcptrack, unwrapIgafnl, unwrapImpact, unwrapIndexHu, unwrapInfospace, unwrapInsiderAffiliate, unwrapInstagramShim, unwrapIntranetQuorum, unwrapInvisionNoExternalLinks, unwrapInvolveAsia, unwrapIrs, unwrapJianshuGo, unwrapJive, unwrapJuejin, unwrapJustwatch, unwrapKlook, unwrapLazada, unwrapLd246, unwrapLetscast, unwrapLeverAnalytics, unwrapLinkA, unwrapLinkconnector, unwrapLinkedin, unwrapLinksynergy, unwrapLinktrust, unwrapLinkwise, unwrapLivejournal, unwrapLnkam, unwrapLocWebArchive, unwrapLocaweb, unwrapLogicboard, unwrapMagellan, unwrapMagnetmail, unwrapMail2easy, unwrapMailRu, unwrapMailRuLink, unwrapMailchimp, unwrapMailinblack, unwrapMailpanion, unwrapMailpgn, unwrapMailstat, unwrapMailtrack, unwrapMandrill, unwrapMarketwire, unwrapMcas, unwrapMedium, unwrapMegalodon, unwrapMimecast, unwrapMinistryCloud, unwrapMintDownloads, unwrapMintFeeder, unwrapMohtwize, unwrapMoshimo, unwrapMozillaOutgoing, unwrapMyNewsletterBuilder, unwrapNarrativ, unwrapNatlibNz, unwrapNaverOutgoing, unwrapNcls, unwrapNdlWarp, unwrapNetaffiliation, unwrapNetcentrum, unwrapNewswire, unwrapNicoMs, unwrapNimble, unwrapNlaWebarchive, unwrapNodeseek, unwrapOkRu, unwrapOp3, unwrapOrkut, unwrapOsnova, unwrapOutlookSafelinks, unwrapOutlookWebAccess, unwrapPagefreezer, unwrapPartnerAds, unwrapPbs, unwrapPhilpapers, unwrapPinterest, unwrapPipedrive, unwrapPocket, unwrapPodcorn, unwrapPodder, unwrapPodkite, unwrapPodroll, unwrapPodscribe, unwrapPodsights, unwrapPodtrac, unwrapPodup, unwrapPostAffiliatePro, unwrapPostmark, unwrapPrNewswire, unwrapPrezly, unwrapPriceGrabber, unwrapPromoJukebox, unwrapProofpointIsolation, unwrapProofpointV1, unwrapProofpointV2, unwrapProofpointV3, unwrapPrweb, unwrapQualityClick, unwrapRakutenAffiliate, unwrapRamblerMail, unwrapRecruitics, unwrapRedditOut, unwrapRediffmail, unwrapRedirectingat, unwrapResearchgate, unwrapReverbnation, unwrapReviveAdserver, unwrapSalesdoubler, unwrapSalesflare, unwrapSalesforceiq, unwrapSaleshandy, unwrapSalsa, unwrapSapHelp, unwrapSbsAd, unwrapSegmentfault, unwrapSerendipity, unwrapShareasale, unwrapShareit, unwrapSkimlinks, unwrapSkyrock, unwrapSlack, unwrapSlickdeals, unwrapSmartAdserver, unwrapSmartredirect, unwrapSmry, unwrapSophos, unwrapSoundOn, unwrapSoundcloud, unwrapSoundstack, unwrapSquarespaceEmail, unwrapSspai, unwrapStay22, unwrapSteamLinkfilter, unwrapStorify, unwrapStreak, unwrapStreamsend, unwrapStumbleupon, unwrapSubscribeRu, unwrapSubstack, unwrapSurly, unwrapSurugaya, unwrapSwap, unwrapSymantecClicktime, unwrapSymplicity, unwrapTargetCircle, unwrapTeacup, unwrapTelegramIv, unwrapTheRegister, unwrapThreadsShim, unwrapTiktok, unwrapTitanhqLinklock, unwrapTopsec, unwrapToucharcade, unwrapTracdelight, unwrapTradedoubler, unwrapTradetracker, unwrapTravelpayouts, unwrapTrendMicro, unwrapTriplelift, unwrapTrustwaveScanmail, unwrapTrxHub, unwrapTumblr, unwrapTwitterRedirect, unwrapTwoCheckout, unwrapUinterbox, unwrapUkWebArchive, unwrapUkgwa, unwrapUnescoWebArchive, unwrapUnhcrWebArchive, unwrapUnisender, unwrapUpAudio, unwrapUrl, unwrapVadeSecure, unwrapValuePress, unwrapValuecommerce, unwrapVanilla, unwrapVbulletin, unwrapVefsafn, unwrapVgWort, unwrapViglink, unwrapVirgool, unwrapVisibli, unwrapVkAway, unwrapVocus, unwrapVoxnest, unwrapVpixl, unwrapVuture, unwrapWebArchive, unwrapWebcitation, unwrapWebgains, unwrapWebharvest, unwrapWikiwix, unwrapWikizero, unwrapWordpressEmail, unwrapWordpressGo2, unwrapWorldNomads, unwrapWpPoczta, unwrapXengentr, unwrapXiaoyuzhou, unwrapXimalaya, unwrapYahooJapan, unwrapYahooJapanAmpViewer, unwrapYahooSearch, unwrapYamm, unwrapYandexMail, unwrapYandexTranslate, unwrapYandexTurbo, unwrapYelp, unwrapYesware, unwrapYouTube, unwrapYourMembership, unwrapZanox, unwrapZayads, unwrapZemanta, unwrapZencastr, unwrapZhihu, unwrapZix, unwrapZscalerIsolation, visitorIdParams };
|
|
@@ -38,11 +38,36 @@ const isHttpUrl = (url) => {
|
|
|
38
38
|
const isHostOrSubdomainOf = (url, domains) => {
|
|
39
39
|
return isHostOf(url, domains) || isSubdomainOf(url, domains);
|
|
40
40
|
};
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const escapeRunRegex = /(?:%[0-9A-Fa-f]{2})+/g;
|
|
42
|
+
const getSequenceLength = (byte) => {
|
|
43
|
+
if (byte < 128) return 1;
|
|
44
|
+
if (byte >= 194 && byte < 224) return 2;
|
|
45
|
+
if (byte >= 224 && byte < 240) return 3;
|
|
46
|
+
if (byte >= 240 && byte < 245) return 4;
|
|
47
|
+
return 0;
|
|
48
|
+
};
|
|
49
|
+
const decodeEscapeRun = (run) => {
|
|
43
50
|
try {
|
|
44
|
-
return decodeURIComponent(
|
|
51
|
+
return decodeURIComponent(run);
|
|
45
52
|
} catch {}
|
|
53
|
+
const count = run.length / 3;
|
|
54
|
+
let decoded = "";
|
|
55
|
+
let index = 0;
|
|
56
|
+
while (index < count) {
|
|
57
|
+
const start = index * 3;
|
|
58
|
+
const length = getSequenceLength(Number.parseInt(run.slice(start + 1, start + 3), 16));
|
|
59
|
+
if (length && index + length <= count) try {
|
|
60
|
+
decoded += decodeURIComponent(run.slice(start, start + length * 3));
|
|
61
|
+
index += length;
|
|
62
|
+
continue;
|
|
63
|
+
} catch {}
|
|
64
|
+
decoded += run.slice(start, start + 3);
|
|
65
|
+
index += 1;
|
|
66
|
+
}
|
|
67
|
+
return decoded;
|
|
68
|
+
};
|
|
69
|
+
const decodePercent = (value) => {
|
|
70
|
+
return value.replace(escapeRunRegex, decodeEscapeRun);
|
|
46
71
|
};
|
|
47
72
|
const strippedParamsCache = /* @__PURE__ */ new WeakMap();
|
|
48
73
|
const getStrippedParamsSet = (params) => {
|
|
@@ -102,6 +127,10 @@ const fixMalformedScheme = (url) => {
|
|
|
102
127
|
}
|
|
103
128
|
return url;
|
|
104
129
|
};
|
|
130
|
+
const segmentEdgeSpace = "(?:\\s|%(?:09|0A|0D|20))";
|
|
131
|
+
const valueEdgeSpace = "(?:\\s|\\+|%(?:09|0A|0D|20))";
|
|
132
|
+
new RegExp(`^${segmentEdgeSpace}+|(?<!${segmentEdgeSpace})${segmentEdgeSpace}+$`, "gi");
|
|
133
|
+
new RegExp(`^${valueEdgeSpace}+|(?<!${valueEdgeSpace})${valueEdgeSpace}+$`, "gi");
|
|
105
134
|
const addMissingScheme = (url, scheme = "https") => {
|
|
106
135
|
if (url.startsWith("[")) return parseUrl(`${scheme}://${url}`) ? `${scheme}://${url}` : url;
|
|
107
136
|
const colonIndex = url.indexOf(":");
|
|
@@ -203,4 +232,4 @@ const fixMalformedProtocol = fixMalformedScheme;
|
|
|
203
232
|
/** @deprecated Use `addMissingScheme` instead. */
|
|
204
233
|
const addMissingProtocol = addMissingScheme;
|
|
205
234
|
//#endregion
|
|
206
|
-
export { addMissingProtocol, addMissingScheme,
|
|
235
|
+
export { addMissingProtocol, addMissingScheme, decodePercent, fixMalformedProtocol, fixMalformedScheme, isHostOf, isHostOrSubdomainOf, isHttpUrl, isIpAddress, isSubdomainOf, normalizeUrl, parseUrl, stripWww };
|
package/dist/unwraps/aceml.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { createParamExtractor, decodeBase64 } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/aceml.ts
|
|
4
4
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
@@ -11,9 +11,7 @@ const unwrapAceml = (url) => {
|
|
|
11
11
|
const raw = baseExtractor(url);
|
|
12
12
|
if (!raw) return;
|
|
13
13
|
let decoded = decodeBase64(raw);
|
|
14
|
-
if (decoded && encodedSchemeRegex.test(decoded))
|
|
15
|
-
decoded = decodeURIComponent(decoded);
|
|
16
|
-
} catch {}
|
|
14
|
+
if (decoded && encodedSchemeRegex.test(decoded)) decoded = decodePercent(decoded);
|
|
17
15
|
if (decoded && isHttpUrl(decoded)) return decoded;
|
|
18
16
|
if (isHttpUrl(raw)) return raw;
|
|
19
17
|
};
|
package/dist/unwraps/adjust.mjs
CHANGED
|
@@ -4,17 +4,17 @@ import { createParamExtractor, getParamTarget } from "../utils.mjs";
|
|
|
4
4
|
const hosts = ["app.adjust.com", "app.adjust.net.in"];
|
|
5
5
|
const pathRegex = /^\/[^/]+$/;
|
|
6
6
|
const trackerParams = [
|
|
7
|
+
"redirect_windows",
|
|
7
8
|
"redirect",
|
|
8
|
-
"fallback"
|
|
9
|
-
"redirect_macos"
|
|
9
|
+
"fallback"
|
|
10
10
|
];
|
|
11
11
|
const unwrapUniversalLink = createParamExtractor({
|
|
12
12
|
hosts: /^[a-z0-9]{4}(?:\.tr)?\.adj\.st$/,
|
|
13
13
|
params: [
|
|
14
|
+
"adj_redirect_windows",
|
|
14
15
|
"adj_redirect",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"adjust_fallback"
|
|
16
|
+
"adjust_fallback",
|
|
17
|
+
"adj_fallback"
|
|
18
18
|
]
|
|
19
19
|
});
|
|
20
20
|
const unwrapTracker = (url) => {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { isHostOrSubdomainOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { decodePercent, isHostOrSubdomainOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
//#region src/unwraps/amazonSes.ts
|
|
3
3
|
const awstrackPathRegex = /^\/L0\/(.+?)\/\d+\/[^/]+\/[^/]+$/;
|
|
4
4
|
const customPathRegex = /^\/CL0\/(.+?)\/\d+\/[^/]+-000000\/[^/]+$/;
|
|
5
5
|
const unwrapAmazonSes = (url) => {
|
|
6
6
|
const match = (isHostOrSubdomainOf(url, "awstrack.me") ? awstrackPathRegex : customPathRegex).exec(url.pathname);
|
|
7
7
|
if (!match?.[1]) return;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (isHttpUrl(target)) return target;
|
|
11
|
-
} catch {}
|
|
8
|
+
const target = decodePercent(match[1]);
|
|
9
|
+
if (isHttpUrl(target)) return target;
|
|
12
10
|
};
|
|
13
11
|
//#endregion
|
|
14
12
|
export { unwrapAmazonSes };
|
package/dist/unwraps/anchor.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { percentDecode } from "../utils.mjs";
|
|
1
|
+
import { decodePercent, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
2
|
//#region src/unwraps/anchor.ts
|
|
4
3
|
const playPrefixRegex = /^\/s\/[^/]+\/podcast\/play\/[^/]+\/(?:sponsor\/[^/]+\/)?/;
|
|
5
4
|
const encodedSchemeRegex = /^https?%(?:25)?3A/i;
|
|
@@ -8,7 +7,7 @@ const unwrapAnchor = (url) => {
|
|
|
8
7
|
const match = url.pathname.match(playPrefixRegex);
|
|
9
8
|
if (!match) return;
|
|
10
9
|
let target = url.pathname.slice(match[0].length);
|
|
11
|
-
while (encodedSchemeRegex.test(target)) target =
|
|
10
|
+
while (encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
12
11
|
return `${target}${url.hash}`;
|
|
13
12
|
};
|
|
14
13
|
//#endregion
|
package/dist/unwraps/apptrkr.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { getParamValues
|
|
1
|
+
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getParamValues } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/apptrkr.ts
|
|
4
4
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
5
5
|
const unwrapApptrkr = (url) => {
|
|
6
6
|
if (url.hostname !== "apptrkr.com" || url.pathname !== "/get_redirect.php") return;
|
|
7
7
|
let target = getParamValues(url, "targetURL").at(-1);
|
|
8
8
|
if (!target) return;
|
|
9
|
-
if (encodedSchemeRegex.test(target)) target =
|
|
9
|
+
if (encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
10
10
|
if (isHttpUrl(target)) return target;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
//#region src/unwraps/archiveToday.ts
|
|
3
3
|
const hostRegex = /^(?:www\.)?archive\.(?:is|ph|today|md|fo|vn|li)$/;
|
|
4
4
|
const pathRegex = /^\/(?:\d{14}|\d{4}\.\d{2}\.\d{2}-\d{6}|o\/[^/]+|newest)\/(.+)$/;
|
|
@@ -11,7 +11,7 @@ const unwrapArchiveToday = (url) => {
|
|
|
11
11
|
const match = url.pathname.match(pathRegex);
|
|
12
12
|
if (!match) return;
|
|
13
13
|
let target = match[1];
|
|
14
|
-
if (encodedSchemeRegex.test(target)) target =
|
|
14
|
+
if (encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
15
15
|
if (!target) return;
|
|
16
16
|
if (!schemeRegex.test(target)) target = `http://${target}`;
|
|
17
17
|
target = target.replace(escapedQueryRegex, "?").replace("%23", "#");
|
package/dist/unwraps/augure.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { createParamExtractor, decodeBase64 } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/augure.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
@@ -16,12 +16,7 @@ const unwrapAugure = (url) => {
|
|
|
16
16
|
if (!raw) return;
|
|
17
17
|
const decoded = decodeBase64(raw);
|
|
18
18
|
if (!decoded) return;
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
target = decodeURIComponent(decoded);
|
|
22
|
-
} catch {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
19
|
+
const target = decodePercent(decoded);
|
|
25
20
|
if (isHttpUrl(target)) return target;
|
|
26
21
|
};
|
|
27
22
|
//#endregion
|
package/dist/unwraps/bing.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
2
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
|
-
import { decodeBase64Url, getParamTarget } from "../utils.mjs";
|
|
3
|
+
import { decodeBase64Url, getParamTarget, getParamValues } from "../utils.mjs";
|
|
4
4
|
//#region src/unwraps/bing.ts
|
|
5
5
|
const bingHosts = [
|
|
6
6
|
"bing.com",
|
|
@@ -20,7 +20,7 @@ const unwrapBing = (url) => {
|
|
|
20
20
|
return target;
|
|
21
21
|
}
|
|
22
22
|
if (url.pathname !== "/ck/a") return;
|
|
23
|
-
const value = url
|
|
23
|
+
const value = getParamValues(url, "u").at(0);
|
|
24
24
|
if (!value || !bingPrefixRegex.test(value)) return;
|
|
25
25
|
const decoded = decodeBase64Url(value.slice(2));
|
|
26
26
|
if (!decoded || !isHttpUrl(decoded)) return;
|
package/dist/unwraps/bingAds.mjs
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
|
-
import { decodeBase64Url } from "../utils.mjs";
|
|
2
|
+
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
|
+
import { decodeBase64Url, getParamValues } from "../utils.mjs";
|
|
4
4
|
import { bingHosts } from "./bing.mjs";
|
|
5
5
|
//#region src/unwraps/bingAds.ts
|
|
6
6
|
const adPaths = ["/aclk", "/aclick"];
|
|
7
7
|
const unwrapBingAds = (url) => {
|
|
8
8
|
if (!isAnyOf(url.hostname, bingHosts) || !adPaths.includes(url.pathname)) return;
|
|
9
|
-
const value = url
|
|
9
|
+
const value = getParamValues(url, "u").at(0);
|
|
10
10
|
if (!value) return;
|
|
11
11
|
const decoded = decodeBase64Url(value) ?? "";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (isHttpUrl(target)) return target;
|
|
15
|
-
} catch {}
|
|
12
|
+
const target = decodePercent(decoded);
|
|
13
|
+
if (isHttpUrl(target)) return target;
|
|
16
14
|
};
|
|
17
15
|
//#endregion
|
|
18
16
|
export { unwrapBingAds };
|
package/dist/unwraps/bitrix.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { decodePercent } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getParamValues } from "../utils.mjs";
|
|
2
3
|
//#region src/unwraps/bitrix.ts
|
|
3
4
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
4
5
|
const getBitrixTarget = (url) => {
|
|
5
6
|
let target = getParamValues(url, "goto").at(0);
|
|
6
|
-
if (target && encodedSchemeRegex.test(target)) target =
|
|
7
|
+
if (target && encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
7
8
|
return target;
|
|
8
9
|
};
|
|
9
10
|
const unwrapBitrix = (url) => {
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { percentDecode } from "../utils.mjs";
|
|
1
|
+
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
2
|
//#region src/unwraps/ciscoSecureWeb.ts
|
|
4
3
|
const pathRegex = /^\/[\w-]+\/(https?(?:%3A|%253A)(?:%2F|%252F){2}[^/]*)$/i;
|
|
5
4
|
const unwrapCiscoSecureWeb = (url) => {
|
|
6
5
|
if (!isHostOf(url, "secure-web.cisco.com")) return;
|
|
7
6
|
const match = pathRegex.exec(url.pathname);
|
|
8
7
|
if (!match?.[1]) return;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (isHttpUrl(target)) return target;
|
|
13
|
-
} catch {}
|
|
8
|
+
let target = decodePercent(match[1]);
|
|
9
|
+
if (!isHttpUrl(target)) target = decodePercent(target);
|
|
10
|
+
if (isHttpUrl(target)) return target;
|
|
14
11
|
};
|
|
15
12
|
//#endregion
|
|
16
13
|
export { unwrapCiscoSecureWeb };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
+
import { decodePercent } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
3
|
import { createParamExtractor } from "../utils.mjs";
|
|
3
4
|
//#region src/unwraps/cjNetwork.ts
|
|
4
5
|
const hosts = [
|
|
@@ -20,13 +21,6 @@ const hosts = [
|
|
|
20
21
|
];
|
|
21
22
|
const clickPathRegex = /^\/(?:t\/)?[^/]+$/;
|
|
22
23
|
const deepLinkPathRegex = /^\/links\/\d+\/type\/(?:dlg|am)\/(?:sid\/[^/]*\/)?(?:fragment\/([^/]*)\/)?(https?):\/\/?(.+)$/;
|
|
23
|
-
const decodeFragment = (value) => {
|
|
24
|
-
try {
|
|
25
|
-
return decodeURIComponent(value);
|
|
26
|
-
} catch {
|
|
27
|
-
return value;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
24
|
const extractUrlParam = createParamExtractor({
|
|
31
25
|
hosts,
|
|
32
26
|
params: ["url", "loc"]
|
|
@@ -39,7 +33,7 @@ const unwrapCjNetwork = (url) => {
|
|
|
39
33
|
}
|
|
40
34
|
if (!isAnyOf(url.hostname, hosts)) return;
|
|
41
35
|
const [, fragment, scheme, target] = match;
|
|
42
|
-
const hash = url.hash || (fragment ? `#${
|
|
36
|
+
const hash = url.hash || (fragment ? `#${decodePercent(fragment)}` : "");
|
|
43
37
|
return `${scheme}://${target}${url.search}${hash}`;
|
|
44
38
|
};
|
|
45
39
|
//#endregion
|
package/dist/unwraps/cse360.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { percentDecode } from "../utils.mjs";
|
|
1
|
+
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
2
|
//#region src/unwraps/cse360.ts
|
|
4
3
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
5
4
|
const clickPathRegex = /^\/Click\/AddCampaignEmailClick\/[0-9a-f-]{36}\/([^/]+)\/[0-9a-f-]{36}\/[^/]+\/(?:True|False)$/;
|
|
@@ -7,11 +6,9 @@ const unwrapCse360 = (url) => {
|
|
|
7
6
|
if (!isHostOf(url, "click.cse360.com.br")) return;
|
|
8
7
|
const match = clickPathRegex.exec(url.pathname);
|
|
9
8
|
if (!match?.[1]) return;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (isHttpUrl(target)) return target;
|
|
14
|
-
} catch {}
|
|
9
|
+
let target = decodePercent(match[1]);
|
|
10
|
+
if (encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
11
|
+
if (isHttpUrl(target)) return target;
|
|
15
12
|
};
|
|
16
13
|
//#endregion
|
|
17
14
|
export { unwrapCse360 };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { decodeBase64 } from "../utils.mjs";
|
|
2
|
+
import { decodeBase64, getParamValues } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/datalifeEngine.ts
|
|
4
4
|
const unwrapDatalifeEngine = (url) => {
|
|
5
5
|
const isEngineGo = url.pathname === "/engine/go.php";
|
|
6
6
|
const isIndexGo = url.pathname === "/index.php" && url.searchParams.get("do") === "go";
|
|
7
7
|
if (!isEngineGo && !isIndexGo) return;
|
|
8
|
-
const raw = url
|
|
8
|
+
const raw = getParamValues(url, "url").at(0);
|
|
9
9
|
if (!raw) return;
|
|
10
10
|
const decoded = decodeBase64(raw);
|
|
11
11
|
if (decoded && isHttpUrl(decoded)) return decoded;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { decodeBase64 } from "../utils.mjs";
|
|
2
|
+
import { decodeBase64, getParamValues } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/deployer.ts
|
|
4
4
|
const hosts = [
|
|
5
5
|
"daily.news.humanevents.com",
|
|
@@ -9,7 +9,7 @@ const hosts = [
|
|
|
9
9
|
const paths = ["/link.php", "/wta/link.php"];
|
|
10
10
|
const unwrapDeployer = (url) => {
|
|
11
11
|
if (!isHostOf(url, hosts) || !paths.includes(url.pathname) || !url.searchParams.has("AGENCY")) return;
|
|
12
|
-
const value = url
|
|
12
|
+
const value = getParamValues(url, "drurl").at(0)?.replaceAll(" ", "+");
|
|
13
13
|
if (!value) return;
|
|
14
14
|
const target = decodeBase64(value);
|
|
15
15
|
if (target && isHttpUrl(target)) return target;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { decodeBase64 } from "../utils.mjs";
|
|
2
|
+
import { decodeBase64, getParamValues } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/digikala.ts
|
|
4
4
|
const pathRegex = /^\/api\/v1\/Click\/b\/[A-Za-z0-9]+$/;
|
|
5
5
|
const unwrapDigikala = (url) => {
|
|
6
6
|
if (!isHostOf(url, "dgkl.io") || !pathRegex.test(url.pathname)) return;
|
|
7
|
-
const encoded = url
|
|
7
|
+
const encoded = getParamValues(url, "b64").at(0);
|
|
8
8
|
if (!encoded) return;
|
|
9
9
|
const target = decodeBase64(encoded);
|
|
10
10
|
if (target && isHttpUrl(target)) return target;
|
package/dist/unwraps/disqus.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
//#region src/unwraps/disqus.ts
|
|
3
3
|
const paths = ["/", "/url"];
|
|
4
|
+
const signatureRegex = /:[\w-]{27}$/;
|
|
4
5
|
const extractTarget = createParamExtractor({
|
|
5
6
|
hosts: "disq.us",
|
|
6
7
|
params: ["url"]
|
|
7
8
|
});
|
|
8
9
|
const unwrapDisqus = (url) => {
|
|
9
10
|
if (!paths.includes(url.pathname)) return;
|
|
10
|
-
|
|
11
|
+
const target = extractTarget(url);
|
|
12
|
+
if (url.pathname !== "/url") return target;
|
|
13
|
+
return target?.replace(signatureRegex, "");
|
|
11
14
|
};
|
|
12
15
|
//#endregion
|
|
13
16
|
export { unwrapDisqus };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { decodeBase64Url, getParamTarget } from "../utils.mjs";
|
|
2
|
+
import { decodeBase64Url, getParamTarget, getParamValues } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/easyMarketing.ts
|
|
4
4
|
const pathRegex = /^\/trck\/eclick\/[0-9a-f]{32}$/;
|
|
5
5
|
const hosts = [
|
|
@@ -11,7 +11,7 @@ const unwrapEasyMarketing = (url) => {
|
|
|
11
11
|
if (!isHostOf(url, hosts) || !pathRegex.test(url.pathname)) return;
|
|
12
12
|
const target = getParamTarget(url, "url");
|
|
13
13
|
if (target) return target;
|
|
14
|
-
const encoded = url
|
|
14
|
+
const encoded = getParamValues(url, "url64fb").at(0);
|
|
15
15
|
if (!encoded) return;
|
|
16
16
|
const decoded = decodeBase64Url(encoded);
|
|
17
17
|
if (decoded && isHttpUrl(decoded)) return decoded;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { createParamExtractor
|
|
1
|
+
import { decodePercent, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/facebook.ts
|
|
4
4
|
const legacyTargetRegex = /^\/l\/[\w-]+[/;]\/*([^/].*)$/;
|
|
5
5
|
const legacyEncodedSchemeRegex = /^https?%(?:25)?3A/i;
|
|
@@ -35,11 +35,9 @@ const unwrapLsr = createParamExtractor({
|
|
|
35
35
|
params: ["u"]
|
|
36
36
|
});
|
|
37
37
|
const decodeLegacyTarget = (value) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return percentDecode(decoded);
|
|
42
|
-
} catch {}
|
|
38
|
+
const decoded = decodePercent(value);
|
|
39
|
+
if (!encodedSchemeRegex.test(decoded)) return decoded;
|
|
40
|
+
return decodePercent(decoded);
|
|
43
41
|
};
|
|
44
42
|
const unwrapLegacy = (url) => {
|
|
45
43
|
if (!isHostOf(url, ["www.facebook.com", "l.facebook.com"])) return;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { decodeBase64 } from "../utils.mjs";
|
|
2
|
+
import { decodeBase64, getParamValues } from "../utils.mjs";
|
|
3
3
|
//#region src/unwraps/feedStatistics.ts
|
|
4
4
|
const pathRegex = /^\/(?:[^/]+\/){0,2}$/;
|
|
5
5
|
const unwrapFeedStatistics = (url) => {
|
|
6
6
|
if (!pathRegex.test(url.pathname)) return;
|
|
7
|
-
const target = decodeBase64(url
|
|
7
|
+
const target = decodeBase64(getParamValues(url, "feed-stats-url").at(0) ?? "");
|
|
8
8
|
if (!target || !isHttpUrl(target)) return;
|
|
9
9
|
return target;
|
|
10
10
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
//#region src/unwraps/firebaseDynamicLinks.ts
|
|
3
3
|
const appPathRegex = /^\/app\/[\w-]+$/;
|
|
4
|
-
const params = ["
|
|
4
|
+
const params = ["ofl", "link"];
|
|
5
5
|
const extractTarget = createParamExtractor({
|
|
6
6
|
domains: ["app.goo.gl", "page.link"],
|
|
7
7
|
path: "/",
|