urlpurify 2.2.0 → 2.3.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 +96 -45
- package/dist/clean.d.mts +1 -0
- package/dist/clean.mjs +56 -20
- package/dist/defaults.d.mts +7 -1
- package/dist/defaults.mjs +160 -3
- package/dist/index.d.mts +79 -4
- package/dist/index.mjs +79 -4
- package/dist/node_modules/entities/dist/decode-codepoint.mjs +2 -2
- package/dist/node_modules/entities/dist/decode.mjs +262 -247
- package/dist/node_modules/entities/dist/generated/decode-data-html.mjs +8 -4
- package/dist/node_modules/entities/dist/internal/decode-data-format.mjs +116 -0
- package/dist/node_modules/trousse/dist/is.mjs +7 -1
- package/dist/node_modules/trousse/dist/locales.mjs +21 -0
- package/dist/node_modules/trousse/dist/matching.mjs +23 -13
- package/dist/node_modules/trousse/dist/urls.mjs +203 -51
- package/dist/pathTarget.mjs +2 -2
- package/dist/tracking/clickAttribution.mjs +26 -1
- package/dist/tracking/housekeeping.mjs +13 -1
- package/dist/tracking/session.d.mts +2 -0
- package/dist/tracking/session.mjs +12 -0
- package/dist/types.d.mts +7 -1
- package/dist/unwraps/a8Net.mjs +1 -1
- package/dist/unwraps/acast.mjs +1 -1
- package/dist/unwraps/accesstrade.mjs +1 -1
- package/dist/unwraps/aceml.mjs +2 -2
- package/dist/unwraps/adcell.mjs +1 -1
- package/dist/unwraps/addThis.d.mts +2 -0
- package/dist/unwraps/addThis.mjs +17 -0
- package/dist/unwraps/addToAny.d.mts +2 -0
- package/dist/unwraps/addToAny.mjs +21 -0
- package/dist/unwraps/addToAnySubscribe.d.mts +2 -0
- package/dist/unwraps/addToAnySubscribe.mjs +8 -0
- package/dist/unwraps/addToMyYahoo.d.mts +2 -0
- package/dist/unwraps/addToMyYahoo.mjs +29 -0
- package/dist/unwraps/adfly.mjs +1 -1
- package/dist/unwraps/admitad.mjs +1 -1
- package/dist/unwraps/affilae.mjs +3 -1
- package/dist/unwraps/affiliatesOne.mjs +1 -1
- package/dist/unwraps/allblog.mjs +1 -1
- package/dist/unwraps/amazonAffiliate.mjs +5 -4
- package/dist/unwraps/amazonSes.mjs +2 -2
- package/dist/unwraps/ampCache.mjs +4 -3
- package/dist/unwraps/ampCacheImage.mjs +1 -1
- package/dist/unwraps/anchor.mjs +1 -1
- package/dist/unwraps/anonymouse.mjs +1 -1
- package/dist/unwraps/antennaPod.d.mts +2 -0
- package/dist/unwraps/antennaPod.mjs +15 -0
- package/dist/unwraps/anytimePlayer.d.mts +2 -0
- package/dist/unwraps/anytimePlayer.mjs +17 -0
- package/dist/unwraps/apptrkr.mjs +3 -2
- package/dist/unwraps/archiveToday.mjs +2 -2
- package/dist/unwraps/arquivo.mjs +1 -1
- package/dist/unwraps/arttrack.mjs +1 -1
- package/dist/unwraps/augure.mjs +3 -3
- package/dist/unwraps/awesound.mjs +1 -1
- package/dist/unwraps/axigen.mjs +2 -1
- package/dist/unwraps/bacLacWebArchive.mjs +1 -1
- package/dist/unwraps/bananatag.mjs +1 -1
- package/dist/unwraps/big5Gate.mjs +1 -1
- package/dist/unwraps/bing.mjs +7 -7
- package/dist/unwraps/bingAds.mjs +4 -4
- package/dist/unwraps/bitrix.mjs +2 -1
- package/dist/unwraps/bitrixBanner.mjs +2 -1
- package/dist/unwraps/blinkList.d.mts +2 -0
- package/dist/unwraps/blinkList.mjs +8 -0
- package/dist/unwraps/bloggerBlogThis.d.mts +2 -0
- package/dist/unwraps/bloggerBlogThis.mjs +16 -0
- package/dist/unwraps/bloggerImageProxy.mjs +2 -1
- package/dist/unwraps/bloglines.d.mts +2 -0
- package/dist/unwraps/bloglines.mjs +21 -0
- package/dist/unwraps/bridgyFed.mjs +1 -1
- package/dist/unwraps/buffer.d.mts +2 -0
- package/dist/unwraps/buffer.mjs +23 -0
- package/dist/unwraps/buybox.mjs +1 -1
- package/dist/unwraps/buzzstream.mjs +1 -1
- package/dist/unwraps/cake.mjs +2 -2
- package/dist/unwraps/checkPointHarmony.mjs +2 -2
- package/dist/unwraps/cjNetwork.mjs +3 -3
- package/dist/unwraps/claritas.mjs +2 -2
- package/dist/unwraps/cleverbridge.mjs +3 -3
- package/dist/unwraps/cloudhq.mjs +1 -1
- package/dist/unwraps/cloze.mjs +1 -1
- package/dist/unwraps/cohst.mjs +1 -1
- package/dist/unwraps/contactMonkey.mjs +3 -2
- package/dist/unwraps/convertiser.mjs +1 -1
- package/dist/unwraps/cse360.mjs +1 -1
- package/dist/unwraps/dasBlog.mjs +1 -1
- package/dist/unwraps/datalifeEngine.mjs +5 -4
- package/dist/unwraps/delicious.d.mts +2 -0
- package/dist/unwraps/delicious.mjs +15 -0
- package/dist/unwraps/deployer.mjs +3 -3
- package/dist/unwraps/derefMail.mjs +4 -3
- package/dist/unwraps/deviantartOutgoing.mjs +1 -1
- package/dist/unwraps/diasporaShare.d.mts +2 -0
- package/dist/unwraps/diasporaShare.mjs +16 -0
- package/dist/unwraps/diggSubmit.d.mts +2 -0
- package/dist/unwraps/diggSubmit.mjs +11 -0
- package/dist/unwraps/digikala.mjs +3 -3
- package/dist/unwraps/diigoPost.d.mts +2 -0
- package/dist/unwraps/diigoPost.mjs +12 -0
- package/dist/unwraps/disqus.mjs +2 -1
- package/dist/unwraps/drupalOembed.mjs +3 -5
- package/dist/unwraps/dstats.mjs +2 -2
- package/dist/unwraps/eClick.mjs +1 -1
- package/dist/unwraps/easyMarketing.mjs +3 -3
- package/dist/unwraps/ebayRover.mjs +1 -1
- package/dist/unwraps/ebuzzing.mjs +1 -1
- package/dist/unwraps/edgepilot.mjs +1 -1
- package/dist/unwraps/effiliation.mjs +1 -1
- package/dist/unwraps/elasticEmail.mjs +3 -2
- package/dist/unwraps/epn.mjs +1 -1
- package/dist/unwraps/eulerian.mjs +1 -1
- package/dist/unwraps/evernoteClip.d.mts +2 -0
- package/dist/unwraps/evernoteClip.mjs +8 -0
- package/dist/unwraps/exciteTranslate.mjs +1 -1
- package/dist/unwraps/facebook.mjs +1 -1
- package/dist/unwraps/facebookShare.d.mts +2 -0
- package/dist/unwraps/facebookShare.mjs +25 -0
- package/dist/unwraps/feed2js.d.mts +2 -0
- package/dist/unwraps/feed2js.mjs +16 -0
- package/dist/unwraps/feedStatistics.mjs +2 -2
- package/dist/unwraps/feedValidator.d.mts +2 -0
- package/dist/unwraps/feedValidator.mjs +12 -0
- package/dist/unwraps/feedblitz.mjs +4 -5
- package/dist/unwraps/feedland.d.mts +2 -0
- package/dist/unwraps/feedland.mjs +12 -0
- package/dist/unwraps/feedly.d.mts +2 -0
- package/dist/unwraps/feedly.mjs +28 -0
- package/dist/unwraps/feedsportal.mjs +1 -1
- package/dist/unwraps/finalsite.mjs +2 -2
- package/dist/unwraps/firebaseDynamicLinks.mjs +3 -2
- package/dist/unwraps/firstory.mjs +3 -3
- package/dist/unwraps/fiveByFive.mjs +2 -2
- package/dist/unwraps/flattrSubmit.d.mts +2 -0
- package/dist/unwraps/flattrSubmit.mjs +8 -0
- package/dist/unwraps/flipboardShare.d.mts +2 -0
- package/dist/unwraps/flipboardShare.mjs +15 -0
- package/dist/unwraps/fortimail.mjs +3 -2
- package/dist/unwraps/friendFeed.d.mts +2 -0
- package/dist/unwraps/friendFeed.mjs +18 -0
- package/dist/unwraps/gabCompose.d.mts +2 -0
- package/dist/unwraps/gabCompose.mjs +8 -0
- package/dist/unwraps/genericCarrier.d.mts +2 -0
- package/dist/unwraps/genericCarrier.mjs +31 -0
- package/dist/unwraps/gfnLinkProxy.mjs +3 -3
- package/dist/unwraps/godcaster.mjs +2 -2
- package/dist/unwraps/googleAmpViewer.mjs +2 -2
- package/dist/unwraps/googleBookmarks.d.mts +2 -0
- package/dist/unwraps/googleBookmarks.mjs +8 -0
- package/dist/unwraps/googleBuzz.d.mts +2 -0
- package/dist/unwraps/googleBuzz.mjs +8 -0
- package/dist/unwraps/googleNewsModern.mjs +2 -3
- package/dist/unwraps/googlePlusShare.d.mts +2 -0
- package/dist/unwraps/googlePlusShare.mjs +11 -0
- package/dist/unwraps/googlePodcasts.d.mts +2 -0
- package/dist/unwraps/googlePodcasts.mjs +27 -0
- package/dist/unwraps/googleReader.d.mts +2 -0
- package/dist/unwraps/googleReader.mjs +20 -0
- package/dist/unwraps/googleTranslate.mjs +13 -13
- package/dist/unwraps/govdelivery.mjs +3 -2
- package/dist/unwraps/hackerNewsSubmit.d.mts +2 -0
- package/dist/unwraps/hackerNewsSubmit.mjs +8 -0
- package/dist/unwraps/hasoffers.mjs +3 -2
- package/dist/unwraps/hatenaBookmark.d.mts +2 -0
- package/dist/unwraps/hatenaBookmark.mjs +22 -0
- package/dist/unwraps/hirkereso.mjs +1 -1
- package/dist/unwraps/horde.mjs +1 -1
- package/dist/unwraps/hubspotSidekick.mjs +1 -1
- package/dist/unwraps/impact.mjs +2 -2
- package/dist/unwraps/indexHu.mjs +2 -1
- package/dist/unwraps/inoreader.d.mts +2 -0
- package/dist/unwraps/inoreader.mjs +22 -0
- package/dist/unwraps/instapaperSave.d.mts +2 -0
- package/dist/unwraps/instapaperSave.mjs +11 -0
- package/dist/unwraps/invisionNoExternalLinks.mjs +1 -1
- package/dist/unwraps/involveAsia.mjs +1 -1
- package/dist/unwraps/jive.mjs +2 -1
- package/dist/unwraps/klook.mjs +2 -1
- package/dist/unwraps/lazada.mjs +1 -1
- package/dist/unwraps/letscast.mjs +1 -1
- package/dist/unwraps/lineShare.d.mts +2 -0
- package/dist/unwraps/lineShare.mjs +25 -0
- package/dist/unwraps/linkA.mjs +1 -1
- package/dist/unwraps/linkedin.mjs +1 -1
- package/dist/unwraps/linkedinShare.d.mts +2 -0
- package/dist/unwraps/linkedinShare.mjs +15 -0
- package/dist/unwraps/linksynergy.mjs +2 -2
- package/dist/unwraps/linktrust.mjs +3 -3
- package/dist/unwraps/linkwise.mjs +1 -1
- package/dist/unwraps/livedoorReader.d.mts +2 -0
- package/dist/unwraps/livedoorReader.mjs +12 -0
- package/dist/unwraps/locWebArchive.mjs +1 -1
- package/dist/unwraps/locaweb.mjs +3 -1
- package/dist/unwraps/logicboard.mjs +1 -1
- package/dist/unwraps/magellan.mjs +1 -1
- package/dist/unwraps/mail2easy.mjs +1 -1
- package/dist/unwraps/mailchimp.mjs +1 -1
- package/dist/unwraps/mailinblack.mjs +6 -4
- package/dist/unwraps/mailstat.mjs +1 -1
- package/dist/unwraps/mailtrack.mjs +1 -1
- package/dist/unwraps/mandrill.mjs +3 -3
- package/dist/unwraps/medium.mjs +5 -5
- package/dist/unwraps/meneameSubmit.d.mts +2 -0
- package/dist/unwraps/meneameSubmit.mjs +11 -0
- package/dist/unwraps/meweShare.d.mts +2 -0
- package/dist/unwraps/meweShare.mjs +8 -0
- package/dist/unwraps/mimecast.mjs +1 -1
- package/dist/unwraps/ministryCloud.mjs +1 -1
- package/dist/unwraps/mintDownloads.mjs +1 -1
- package/dist/unwraps/mintFeeder.mjs +3 -2
- package/dist/unwraps/mohtwize.mjs +6 -4
- package/dist/unwraps/morss.d.mts +2 -0
- package/dist/unwraps/morss.mjs +13 -0
- package/dist/unwraps/mozillaOutgoing.mjs +3 -3
- package/dist/unwraps/myAolFeeds.d.mts +2 -0
- package/dist/unwraps/myAolFeeds.mjs +8 -0
- package/dist/unwraps/narrativ.mjs +1 -1
- package/dist/unwraps/natlibNz.mjs +1 -1
- package/dist/unwraps/ncls.mjs +2 -1
- package/dist/unwraps/ndlWarp.mjs +2 -2
- package/dist/unwraps/netaffiliation.mjs +1 -1
- package/dist/unwraps/netvibes.d.mts +2 -0
- package/dist/unwraps/netvibes.mjs +7 -0
- package/dist/unwraps/newsGator.d.mts +2 -0
- package/dist/unwraps/newsGator.mjs +17 -0
- package/dist/unwraps/newswire.mjs +3 -3
- package/dist/unwraps/nicoMs.mjs +1 -1
- package/dist/unwraps/nimble.mjs +1 -1
- package/dist/unwraps/nlaWebarchive.mjs +3 -3
- package/dist/unwraps/okRu.mjs +3 -2
- package/dist/unwraps/okShare.d.mts +2 -0
- package/dist/unwraps/okShare.mjs +23 -0
- package/dist/unwraps/op3.mjs +1 -1
- package/dist/unwraps/outlookSafelinks.mjs +1 -1
- package/dist/unwraps/pageflakes.d.mts +2 -0
- package/dist/unwraps/pageflakes.mjs +8 -0
- package/dist/unwraps/pagefreezer.mjs +2 -2
- package/dist/unwraps/partnerAds.mjs +2 -2
- package/dist/unwraps/pbs.mjs +1 -1
- package/dist/unwraps/pinterestPin.d.mts +2 -0
- package/dist/unwraps/pinterestPin.mjs +85 -0
- package/dist/unwraps/pipedrive.mjs +1 -1
- package/dist/unwraps/playerFm.d.mts +2 -0
- package/dist/unwraps/playerFm.mjs +16 -0
- package/dist/unwraps/pocketSave.d.mts +2 -0
- package/dist/unwraps/pocketSave.mjs +15 -0
- package/dist/unwraps/podcastAddict.d.mts +2 -0
- package/dist/unwraps/podcastAddict.mjs +14 -0
- package/dist/unwraps/podcastReady.d.mts +2 -0
- package/dist/unwraps/podcastReady.mjs +8 -0
- package/dist/unwraps/podcorn.mjs +1 -1
- package/dist/unwraps/podkite.mjs +1 -1
- package/dist/unwraps/podscribe.mjs +1 -1
- package/dist/unwraps/podsights.mjs +1 -1
- package/dist/unwraps/podup.mjs +2 -3
- package/dist/unwraps/postAffiliatePro.mjs +1 -1
- package/dist/unwraps/postmark.mjs +1 -1
- package/dist/unwraps/prNewswire.mjs +2 -2
- package/dist/unwraps/prezly.mjs +1 -1
- package/dist/unwraps/proofpointV2.mjs +1 -1
- package/dist/unwraps/proofpointV3.mjs +3 -3
- package/dist/unwraps/prweb.mjs +2 -2
- package/dist/unwraps/prxPlayer.d.mts +2 -0
- package/dist/unwraps/prxPlayer.mjs +16 -0
- package/dist/unwraps/qqMailReader.d.mts +2 -0
- package/dist/unwraps/qqMailReader.mjs +8 -0
- package/dist/unwraps/qualityClick.mjs +4 -3
- package/dist/unwraps/qzoneShare.d.mts +2 -0
- package/dist/unwraps/qzoneShare.mjs +8 -0
- package/dist/unwraps/rakutenAffiliate.mjs +3 -3
- package/dist/unwraps/redditOut.mjs +1 -1
- package/dist/unwraps/redditSubmit.d.mts +2 -0
- package/dist/unwraps/redditSubmit.mjs +19 -0
- package/dist/unwraps/researchgate.mjs +1 -1
- package/dist/unwraps/reviveAdserver.mjs +4 -4
- package/dist/unwraps/rssBoardValidator.d.mts +2 -0
- package/dist/unwraps/rssBoardValidator.mjs +8 -0
- package/dist/unwraps/salesdoubler.mjs +1 -1
- package/dist/unwraps/saleshandy.mjs +1 -1
- package/dist/unwraps/segmentfault.mjs +2 -2
- package/dist/unwraps/serendipity.mjs +4 -4
- package/dist/unwraps/shareaholic.d.mts +2 -0
- package/dist/unwraps/shareaholic.mjs +12 -0
- package/dist/unwraps/slashdotBookmark.d.mts +2 -0
- package/dist/unwraps/slashdotBookmark.mjs +11 -0
- package/dist/unwraps/smartredirect.mjs +1 -1
- package/dist/unwraps/sophos.mjs +2 -2
- package/dist/unwraps/soundOn.mjs +1 -1
- package/dist/unwraps/stay22.mjs +1 -1
- package/dist/unwraps/streamsend.mjs +1 -1
- package/dist/unwraps/stumbleuponSubmit.d.mts +2 -0
- package/dist/unwraps/stumbleuponSubmit.mjs +14 -0
- package/dist/unwraps/subscribeByEmail.d.mts +2 -0
- package/dist/unwraps/subscribeByEmail.mjs +10 -0
- package/dist/unwraps/subscribeOnAndroid.d.mts +2 -0
- package/dist/unwraps/subscribeOnAndroid.mjs +10 -0
- package/dist/unwraps/subscribeRu.mjs +1 -1
- package/dist/unwraps/substack.mjs +2 -3
- package/dist/unwraps/surly.mjs +1 -1
- package/dist/unwraps/swap.mjs +1 -1
- package/dist/unwraps/symantecClicktime.mjs +1 -1
- package/dist/unwraps/symplicity.mjs +1 -1
- package/dist/unwraps/teacup.mjs +3 -2
- package/dist/unwraps/technoratiFaves.d.mts +2 -0
- package/dist/unwraps/technoratiFaves.mjs +10 -0
- package/dist/unwraps/telegramShare.d.mts +2 -0
- package/dist/unwraps/telegramShare.mjs +18 -0
- package/dist/unwraps/theRegister.mjs +1 -1
- package/dist/unwraps/threadsIntent.d.mts +2 -0
- package/dist/unwraps/threadsIntent.mjs +16 -0
- package/dist/unwraps/toucharcade.mjs +1 -1
- package/dist/unwraps/tracdelight.mjs +3 -2
- package/dist/unwraps/trxHub.mjs +1 -1
- package/dist/unwraps/tumblrShare.d.mts +2 -0
- package/dist/unwraps/tumblrShare.mjs +13 -0
- package/dist/unwraps/twitterIntent.d.mts +2 -0
- package/dist/unwraps/twitterIntent.mjs +17 -0
- package/dist/unwraps/twoCheckout.mjs +4 -3
- package/dist/unwraps/ukWebArchive.mjs +1 -1
- package/dist/unwraps/ukgwa.mjs +1 -1
- package/dist/unwraps/unescoWebArchive.mjs +1 -1
- package/dist/unwraps/unisender.mjs +4 -4
- package/dist/unwraps/upAudio.mjs +1 -1
- package/dist/unwraps/vadeSecure.mjs +1 -1
- package/dist/unwraps/valuePress.mjs +2 -2
- package/dist/unwraps/vanilla.mjs +1 -1
- package/dist/unwraps/vbulletin.mjs +1 -1
- package/dist/unwraps/vefsafn.mjs +2 -2
- package/dist/unwraps/vgWort.mjs +1 -1
- package/dist/unwraps/vkShare.d.mts +2 -0
- package/dist/unwraps/vkShare.mjs +16 -0
- package/dist/unwraps/vocus.mjs +1 -1
- package/dist/unwraps/voxnest.mjs +1 -1
- package/dist/unwraps/w3cFeedValidator.d.mts +2 -0
- package/dist/unwraps/w3cFeedValidator.mjs +8 -0
- package/dist/unwraps/webArchive.mjs +5 -5
- package/dist/unwraps/webcitation.mjs +1 -1
- package/dist/unwraps/webharvest.mjs +1 -1
- package/dist/unwraps/weiboShare.d.mts +2 -0
- package/dist/unwraps/weiboShare.mjs +8 -0
- package/dist/unwraps/weserv.mjs +2 -2
- package/dist/unwraps/wikizero.mjs +2 -2
- package/dist/unwraps/windowsLive.d.mts +2 -0
- package/dist/unwraps/windowsLive.mjs +13 -0
- package/dist/unwraps/windowsLiveFavorites.d.mts +2 -0
- package/dist/unwraps/windowsLiveFavorites.mjs +8 -0
- package/dist/unwraps/worldNomads.mjs +2 -1
- package/dist/unwraps/wpPoczta.mjs +2 -2
- package/dist/unwraps/wykop.d.mts +2 -0
- package/dist/unwraps/wykop.mjs +11 -0
- package/dist/unwraps/xengentr.mjs +4 -3
- package/dist/unwraps/xianguo.d.mts +2 -0
- package/dist/unwraps/xianguo.mjs +8 -0
- package/dist/unwraps/xiaoyuzhou.mjs +1 -1
- package/dist/unwraps/ximalaya.mjs +3 -3
- package/dist/unwraps/xingShare.d.mts +2 -0
- package/dist/unwraps/xingShare.mjs +16 -0
- package/dist/unwraps/yahooBookmarks.d.mts +2 -0
- package/dist/unwraps/yahooBookmarks.mjs +38 -0
- package/dist/unwraps/yahooJapan.mjs +2 -3
- package/dist/unwraps/yahooJapanAmpViewer.mjs +2 -2
- package/dist/unwraps/yahooMailImage.mjs +2 -1
- package/dist/unwraps/yahooSearch.mjs +2 -2
- package/dist/unwraps/yamm.mjs +2 -1
- package/dist/unwraps/yandexMail.mjs +4 -3
- package/dist/unwraps/yandexTranslate.mjs +1 -1
- package/dist/unwraps/yandexTurbo.mjs +4 -4
- package/dist/unwraps/yesware.mjs +2 -2
- package/dist/unwraps/yourMembership.mjs +3 -2
- package/dist/unwraps/zencastr.mjs +1 -1
- package/dist/unwraps/zix.mjs +1 -1
- package/dist/unwraps/zscalerIsolation.mjs +1 -1
- package/dist/utils.mjs +9 -42
- package/package.json +4 -4
- package/dist/node_modules/entities/dist/internal/bin-trie-flags.mjs +0 -50
- package/dist/node_modules/entities/dist/internal/decode-shared.mjs +0 -143
package/dist/unwraps/admitad.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/admitad.ts
|
|
3
|
-
const clickPathRegex = /^\/(?:g|goto)\/[0-9a-z]
|
|
3
|
+
const clickPathRegex = /^\/(?:g|goto)\/[0-9a-z]+\/$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: [
|
|
6
6
|
"ad.admitad.com",
|
package/dist/unwraps/affilae.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
3
|
import { getParamTarget } from "../utils.mjs";
|
|
2
4
|
// src/unwraps/affilae.ts
|
|
3
5
|
const unwrapAffilae = (url) => {
|
|
4
|
-
if (url
|
|
6
|
+
if (!isHostOf(url, "lb.affilae.com") || !isAnyOf(url.pathname, "/r/")) return;
|
|
5
7
|
return getParamTarget(url, "lp", -1);
|
|
6
8
|
};
|
|
7
9
|
export { unwrapAffilae };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/affiliatesOne.ts
|
|
3
|
-
const pathRegex = /^\/track\/clicks\/\d+\/c627c2b[0-9a-f]
|
|
3
|
+
const pathRegex = /^\/track\/clicks\/\d+\/c627c2b[0-9a-f]+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: [
|
|
6
6
|
"abzcoupon.com",
|
package/dist/unwraps/allblog.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
3
|
// src/unwraps/allblog.ts
|
|
4
|
-
const linkPrefixRegex = /^\/\d+\/(?=https?:\/)
|
|
4
|
+
const linkPrefixRegex = /^\/\d+\/(?=https?:\/)/i;
|
|
5
5
|
const unwrapAllblog = (url) => {
|
|
6
6
|
if (!isHostOf(url, "link.allblog.net")) return;
|
|
7
7
|
return getPathTarget(url, linkPrefixRegex);
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
1
2
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
3
|
import { getParamTarget } from "../utils.mjs";
|
|
3
4
|
// src/unwraps/amazonAffiliate.ts
|
|
4
|
-
const amazonPathRegex = /^\/x\/c\/[^/]+\/(https?:\/\/.+)
|
|
5
|
+
const amazonPathRegex = /^\/x\/c\/[^/]+\/(https?:\/\/.+)$/i;
|
|
5
6
|
const amazonHostRegex = /^aax(?:-[a-z]+)*\.amazon-adsystem\.com$|^aax-us-iad\.amazon\.com$/;
|
|
6
7
|
const storeHostRegex = /^(?:www|smile|affiliate-program)\.amazon\.(?:ca|co\.jp|co\.uk|com|com\.au|com\.br|de|es|fr|it)$/;
|
|
7
|
-
const storeRedirectPathRegex = /^\/gp\/redirect\.html(?:\/ref=.+)
|
|
8
|
-
const sponsoredRedirectPathRegex = /^\/gp\/slredirect\/picassoRedirect\.html\/ref
|
|
8
|
+
const storeRedirectPathRegex = /^\/gp\/redirect\.html(?:\/ref=.+)?$/i;
|
|
9
|
+
const sponsoredRedirectPathRegex = /^\/gp\/slredirect\/picassoRedirect\.html\/ref=.+$/i;
|
|
9
10
|
const emailRedirectPaths = ["/gp/r.html", "/gp/f.html"];
|
|
10
11
|
const unwrapAmazonAffiliate = (url) => {
|
|
11
12
|
if (storeHostRegex.test(url.hostname)) {
|
|
12
13
|
let target;
|
|
13
14
|
if (storeRedirectPathRegex.test(url.pathname)) target = getParamTarget(url, "location");
|
|
14
|
-
if (url.pathname
|
|
15
|
+
if (isAnyOf(url.pathname, "/exec/obidos/redirect")) target = getParamTarget(url, "path");
|
|
15
16
|
if (emailRedirectPaths.includes(url.pathname)) target = getParamTarget(url, "U");
|
|
16
17
|
if (sponsoredRedirectPathRegex.test(url.pathname)) target = getParamTarget(url, "url");
|
|
17
18
|
if (target && isHttpUrl(target)) return target;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodePercent, isHostOrSubdomainOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/amazonSes.ts
|
|
3
|
-
const awstrackPathRegex = /^\/L0\/(.+?)\/\d+\/[^/]+\/[^/]
|
|
4
|
-
const customPathRegex = /^\/CL0\/(.+?)\/\d+\/[^/]+-000000\/[^/]
|
|
3
|
+
const awstrackPathRegex = /^\/L0\/(.+?)\/\d+\/[^/]+\/[^/]+$/i;
|
|
4
|
+
const customPathRegex = /^\/CL0\/(.+?)\/\d+\/[^/]+-000000\/[^/]+$/i;
|
|
5
5
|
const unwrapAmazonSes = (url) => {
|
|
6
6
|
const match = (isHostOrSubdomainOf(url, "awstrack.me") ? awstrackPathRegex : customPathRegex).exec(url.pathname);
|
|
7
7
|
if (!match?.[1]) return;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
1
2
|
import { isHostOrSubdomainOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
3
|
// src/unwraps/ampCache.ts
|
|
3
|
-
const pathRegex = /^\/([cv])\/(s\/)?(.+)
|
|
4
|
+
const pathRegex = /^\/([cv])\/(s\/)?(.+)$/i;
|
|
4
5
|
const viewerParams = [
|
|
5
6
|
"amp_gsa",
|
|
6
7
|
"amp_js_v",
|
|
@@ -12,7 +13,7 @@ const unwrapAmpCache = (url) => {
|
|
|
12
13
|
if (!match) return;
|
|
13
14
|
const [, type, secure, target] = match;
|
|
14
15
|
const scheme = secure ? "https" : "http";
|
|
15
|
-
const params = url.search.slice(1).split("&").filter((pair) => pair && !
|
|
16
|
-
return `${scheme}://${target}${params.length ? `?${params.join("&")}` : ""}${type
|
|
16
|
+
const params = url.search.slice(1).split("&").filter((pair) => pair && !isAnyOf(pair.split("=")[0], viewerParams));
|
|
17
|
+
return `${scheme}://${target}${params.length ? `?${params.join("&")}` : ""}${isAnyOf(type, "v") ? "" : url.hash}`;
|
|
17
18
|
};
|
|
18
19
|
export { unwrapAmpCache };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOrSubdomainOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/ampCacheImage.ts
|
|
3
|
-
const pathRegex = /^\/(?:i|ii\/[^/]+)\/(?<secure>s\/)?(?<target>.+)
|
|
3
|
+
const pathRegex = /^\/(?:i|ii\/[^/]+)\/(?<secure>s\/)?(?<target>.+)$/i;
|
|
4
4
|
const unwrapAmpCacheImage = (url) => {
|
|
5
5
|
if (!isHostOrSubdomainOf(url, "cdn.ampproject.org")) return;
|
|
6
6
|
const match = url.pathname.match(pathRegex);
|
package/dist/unwraps/anchor.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decodePercent, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/anchor.ts
|
|
3
|
-
const playPrefixRegex = /^\/s\/[^/]+\/podcast\/play\/[^/]+\/(?:sponsor\/[^/]+\/)
|
|
3
|
+
const playPrefixRegex = /^\/s\/[^/]+\/podcast\/play\/[^/]+\/(?:sponsor\/[^/]+\/)?/i;
|
|
4
4
|
const encodedSchemeRegex = /^https?%(?:25)?3A/i;
|
|
5
5
|
const unwrapAnchor = (url) => {
|
|
6
6
|
if (!isHostOf(url, "anchor.fm")) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/anonymouse.ts
|
|
3
|
-
const pathRegex = /^\/cgi-bin\/anon-www(?:_de)?\.cgi\/(.+)
|
|
3
|
+
const pathRegex = /^\/cgi-bin\/anon-www(?:_de)?\.cgi\/(.+)$/i;
|
|
4
4
|
const unwrapAnonymouse = (url) => {
|
|
5
5
|
if (!isHostOf(url, "anonymouse.org")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getPathSegments, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
3
|
+
import { isLocale } from "../node_modules/trousse/dist/locales.mjs";
|
|
4
|
+
import { getParamTarget } from "../utils.mjs";
|
|
5
|
+
// src/unwraps/antennaPod.ts
|
|
6
|
+
const hosts = ["antennapod.org", "www.antennapod.org"];
|
|
7
|
+
const unwrapAntennaPod = (url) => {
|
|
8
|
+
if (!isHostOf(url, hosts)) return;
|
|
9
|
+
const segments = getPathSegments(url);
|
|
10
|
+
const [locale] = segments;
|
|
11
|
+
const [route, action, ...rest] = locale && isLocale(locale) ? segments.slice(1) : segments;
|
|
12
|
+
if (!isAnyOf(route, "deeplink") || !isAnyOf(action, "subscribe") || rest.length > 0) return;
|
|
13
|
+
return getParamTarget(url, "url");
|
|
14
|
+
};
|
|
15
|
+
export { unwrapAntennaPod };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/anytimePlayer.ts
|
|
3
|
+
const hosts = ["anytimeplayer.app", "www.anytimeplayer.app"];
|
|
4
|
+
const extractSubscribe = createParamExtractor({
|
|
5
|
+
hosts,
|
|
6
|
+
path: "/subscribe",
|
|
7
|
+
params: ["url"]
|
|
8
|
+
});
|
|
9
|
+
const extractSubscribeHtml = createParamExtractor({
|
|
10
|
+
hosts,
|
|
11
|
+
path: "/subscribe.html",
|
|
12
|
+
params: ["url"]
|
|
13
|
+
});
|
|
14
|
+
const unwrapAnytimePlayer = (url) => {
|
|
15
|
+
return extractSubscribe(url) ?? extractSubscribeHtml(url);
|
|
16
|
+
};
|
|
17
|
+
export { unwrapAnytimePlayer };
|
package/dist/unwraps/apptrkr.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
3
|
import { getParamValues } from "../utils.mjs";
|
|
3
4
|
// src/unwraps/apptrkr.ts
|
|
4
5
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
5
6
|
const unwrapApptrkr = (url) => {
|
|
6
|
-
if (url
|
|
7
|
+
if (!isHostOf(url, "apptrkr.com") || !isAnyOf(url.pathname, "/get_redirect.php")) return;
|
|
7
8
|
let target = getParamValues(url, "targetURL").at(-1);
|
|
8
9
|
if (!target) return;
|
|
9
10
|
if (encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/archiveToday.ts
|
|
3
3
|
const hostRegex = /^(?:www\.)?archive\.(?:is|ph|today|md|fo|vn|li)$/;
|
|
4
|
-
const pathRegex = /^\/(?:\d{14}|\d{4}\.\d{2}\.\d{2}-\d{6}|o\/[^/]+|newest)\/(.+)
|
|
4
|
+
const pathRegex = /^\/(?:\d{14}|\d{4}\.\d{2}\.\d{2}-\d{6}|o\/[^/]+|newest)\/(.+)$/i;
|
|
5
5
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
6
6
|
const schemeRegex = /^[a-z][a-z\d+.-]*:/i;
|
|
7
7
|
const escapedQueryRegex = /%3F/i;
|
|
8
|
-
const selectionHashRegex = /^#selection-\d+\.\d+-\d+\.\d
|
|
8
|
+
const selectionHashRegex = /^#selection-\d+\.\d+-\d+\.\d+$/i;
|
|
9
9
|
const unwrapArchiveToday = (url) => {
|
|
10
10
|
if (!hostRegex.test(url.hostname)) return;
|
|
11
11
|
const match = url.pathname.match(pathRegex);
|
package/dist/unwraps/arquivo.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/arquivo.ts
|
|
3
|
-
const pathRegex = /^\/wayback\/\d{14}\/(.+)
|
|
3
|
+
const pathRegex = /^\/wayback\/\d{14}\/(.+)$/i;
|
|
4
4
|
const unwrapArquivo = (url) => {
|
|
5
5
|
if (!isHostOf(url, "arquivo.pt")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
3
|
// src/unwraps/arttrack.ts
|
|
4
|
-
const campaignPrefixRegex = /^\/p\/[A-Z0-9]{5}
|
|
4
|
+
const campaignPrefixRegex = /^\/p\/[A-Z0-9]{5}\//i;
|
|
5
5
|
const unwrapArttrack = (url) => {
|
|
6
6
|
if (!isHostOf(url, "arttrk.com")) return;
|
|
7
7
|
return getPathTarget(url, campaignPrefixRegex);
|
package/dist/unwraps/augure.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { createParamExtractor
|
|
1
|
+
import { decodeBase64, decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/augure.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
5
5
|
hosts: [
|
|
@@ -9,7 +9,7 @@ const baseExtractor = createParamExtractor({
|
|
|
9
9
|
],
|
|
10
10
|
params: ["id1"]
|
|
11
11
|
});
|
|
12
|
-
const pathRegex = /^\/(?:pub|www)\/tracking\/\d+\/[^/]
|
|
12
|
+
const pathRegex = /^\/(?:pub|www)\/tracking\/\d+\/[^/]+$/i;
|
|
13
13
|
const unwrapAugure = (url) => {
|
|
14
14
|
if (!pathRegex.test(url.pathname)) return;
|
|
15
15
|
const raw = baseExtractor(url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
3
|
// src/unwraps/awesound.ts
|
|
4
|
-
const clickPrefixRegex = /^\/click-auid\/[^/]+\/(?=https?:\/)
|
|
4
|
+
const clickPrefixRegex = /^\/click-auid\/[^/]+\/(?=https?:\/)/i;
|
|
5
5
|
const unwrapAwesound = (url) => {
|
|
6
6
|
if (!isHostOf(url, ["awesound.com", "click.awesound.com"])) return;
|
|
7
7
|
return getPathTarget(url, clickPrefixRegex);
|
package/dist/unwraps/axigen.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
1
2
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
3
|
import { getParamTarget } from "../utils.mjs";
|
|
3
4
|
// src/unwraps/axigen.ts
|
|
4
5
|
const unwrapAxigen = (url) => {
|
|
5
|
-
if (url.pathname
|
|
6
|
+
if (!isAnyOf(url.pathname, "/redir.hsp")) return;
|
|
6
7
|
const target = getParamTarget(url, "url");
|
|
7
8
|
if (!target || !isHttpUrl(target)) return;
|
|
8
9
|
return target;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/bacLacWebArchive.ts
|
|
3
|
-
const pathRegex = /^\/web\/\d{14}\/(.+)
|
|
3
|
+
const pathRegex = /^\/web\/\d{14}\/(.+)$/i;
|
|
4
4
|
const unwrapBacLacWebArchive = (url) => {
|
|
5
5
|
if (!isHostOf(url, "webarchiveweb.wayback.bac-lac.canada.ca")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/bananatag.ts
|
|
3
|
-
const clickPathRegex = /^\/h\/(?:i\/[A-Za-z0-9]+\/)?[A-Za-z0-9]
|
|
3
|
+
const clickPathRegex = /^\/h\/(?:i\/[A-Za-z0-9]+\/)?[A-Za-z0-9]+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: [
|
|
6
6
|
"s.bl-1.com",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/big5Gate.ts
|
|
3
|
-
const pathRegex = /^\/gate\/big5\/([\w-]+(?:\.[\w-]+)+(?:\/.*)?)
|
|
3
|
+
const pathRegex = /^\/gate\/big5\/([\w-]+(?:\.[\w-]+)+(?:\/.*)?)$/i;
|
|
4
4
|
const unwrapBig5Gate = (url) => {
|
|
5
5
|
const match = pathRegex.exec(url.pathname);
|
|
6
6
|
if (!match?.[1]) return;
|
package/dist/unwraps/bing.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { decodeBase64Url, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
2
|
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { decodeBase64Url, getParamTarget, getParamValues } from "../utils.mjs";
|
|
3
|
+
import { getParamTarget, getParamValues } from "../utils.mjs";
|
|
4
4
|
// src/unwraps/bing.ts
|
|
5
|
-
const
|
|
5
|
+
const hosts = [
|
|
6
6
|
"bing.com",
|
|
7
7
|
"www.bing.com",
|
|
8
8
|
"www4.bing.com",
|
|
@@ -13,17 +13,17 @@ const bingHosts = [
|
|
|
13
13
|
];
|
|
14
14
|
const bingPrefixRegex = /^a\d/;
|
|
15
15
|
const unwrapBing = (url) => {
|
|
16
|
-
if (!isAnyOf(url.hostname,
|
|
17
|
-
if (url.pathname
|
|
16
|
+
if (!isAnyOf(url.hostname, hosts)) return;
|
|
17
|
+
if (isAnyOf(url.pathname, "/news/apiclick.aspx")) {
|
|
18
18
|
const target = getParamTarget(url, "url");
|
|
19
19
|
if (!target || !isHttpUrl(target)) return;
|
|
20
20
|
return target;
|
|
21
21
|
}
|
|
22
|
-
if (url.pathname
|
|
22
|
+
if (!isAnyOf(url.pathname, "/ck/a")) return;
|
|
23
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;
|
|
27
27
|
return decoded;
|
|
28
28
|
};
|
|
29
|
-
export {
|
|
29
|
+
export { hosts, unwrapBing };
|
package/dist/unwraps/bingAds.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { decodeBase64Url, decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
2
|
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { bingHosts } from "./bing.mjs";
|
|
3
|
+
import { getParamValues } from "../utils.mjs";
|
|
4
|
+
import { hosts } from "./bing.mjs";
|
|
5
5
|
// src/unwraps/bingAds.ts
|
|
6
6
|
const adPaths = ["/aclk", "/aclick"];
|
|
7
7
|
const unwrapBingAds = (url) => {
|
|
8
|
-
if (!isAnyOf(url.hostname,
|
|
8
|
+
if (!isAnyOf(url.hostname, hosts) || !adPaths.includes(url.pathname)) return;
|
|
9
9
|
const value = getParamValues(url, "u").at(0);
|
|
10
10
|
if (!value) return;
|
|
11
11
|
const decoded = decodeBase64Url(value) ?? "";
|
package/dist/unwraps/bitrix.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { decodePercent } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
3
|
import { getParamValues } from "../utils.mjs";
|
|
3
4
|
// src/unwraps/bitrix.ts
|
|
4
5
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
@@ -8,7 +9,7 @@ const getBitrixTarget = (url) => {
|
|
|
8
9
|
return target;
|
|
9
10
|
};
|
|
10
11
|
const unwrapBitrix = (url) => {
|
|
11
|
-
if (url.pathname
|
|
12
|
+
if (!isAnyOf(url.pathname, "/bitrix/redirect.php")) return;
|
|
12
13
|
return getBitrixTarget(url);
|
|
13
14
|
};
|
|
14
15
|
export { getBitrixTarget, unwrapBitrix };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
1
2
|
import { getBitrixTarget } from "./bitrix.mjs";
|
|
2
3
|
// src/unwraps/bitrixBanner.ts
|
|
3
4
|
const unwrapBitrixBanner = (url) => {
|
|
4
|
-
if (url.pathname
|
|
5
|
+
if (!isAnyOf(url.pathname, "/bitrix/rk.php")) return;
|
|
5
6
|
return getBitrixTarget(url);
|
|
6
7
|
};
|
|
7
8
|
export { unwrapBitrixBanner };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
|
+
import { getParamTarget } from "../utils.mjs";
|
|
4
|
+
// src/unwraps/bloggerBlogThis.ts
|
|
5
|
+
const hosts = [
|
|
6
|
+
"www.blogger.com",
|
|
7
|
+
"blogger.com",
|
|
8
|
+
"www2.blogger.com",
|
|
9
|
+
"draft.blogger.com"
|
|
10
|
+
];
|
|
11
|
+
const paths = ["/blog_this.pyra", "/blog-this.g"];
|
|
12
|
+
const unwrapBloggerBlogThis = (url) => {
|
|
13
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, paths)) return;
|
|
14
|
+
return getParamTarget(url, "u");
|
|
15
|
+
};
|
|
16
|
+
export { unwrapBloggerBlogThis };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { decodePercent, getQueryParamValues, isHostOf, isHostOrSubdomainOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
3
|
// src/unwraps/bloggerImageProxy.ts
|
|
3
4
|
const focusHostRegex = /^(?:images)?\d-focus-opensocial\.googleusercontent\.com$/;
|
|
4
5
|
const unwrapBloggerImageProxy = (url) => {
|
|
5
6
|
if (!isHostOf(url, "images-blogger-opensocial.googleusercontent.com") && !focusHostRegex.test(url.hostname) && !isHostOrSubdomainOf(url, "gmodules.com")) return;
|
|
6
|
-
if (url.pathname
|
|
7
|
+
if (!isAnyOf(url.pathname, "/gadgets/proxy")) return;
|
|
7
8
|
const value = getQueryParamValues(url, "url", { decodeValues: false }).at(-1);
|
|
8
9
|
if (!value) return;
|
|
9
10
|
const source = decodePercent(value);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
3
|
+
import { getPathTarget } from "../pathTarget.mjs";
|
|
4
|
+
import { decodeEncodedScheme, getParamTarget } from "../utils.mjs";
|
|
5
|
+
// src/unwraps/bloglines.ts
|
|
6
|
+
const formPathRegex = /^\/sub\/?$/i;
|
|
7
|
+
const rawFeedPrefixRegex = /^\/sub\/(?=https?:)/i;
|
|
8
|
+
const encodedFeedPathRegex = /^\/sub\/(?<target>https?%.+)$/i;
|
|
9
|
+
const hosts = ["bloglines.com", "www.bloglines.com"];
|
|
10
|
+
const unwrapBloglines = (url) => {
|
|
11
|
+
if (!isHostOf(url, hosts)) return;
|
|
12
|
+
if (isAnyOf(url.pathname, formPathRegex)) return getParamTarget(url, "url");
|
|
13
|
+
const match = url.pathname.match(encodedFeedPathRegex);
|
|
14
|
+
if (match?.groups) {
|
|
15
|
+
const target = decodeEncodedScheme(decodePercent(match.groups.target));
|
|
16
|
+
if (!isHttpUrl(target)) return;
|
|
17
|
+
return target;
|
|
18
|
+
}
|
|
19
|
+
return getPathTarget(url, rawFeedPrefixRegex);
|
|
20
|
+
};
|
|
21
|
+
export { unwrapBloglines };
|
|
@@ -5,7 +5,7 @@ const hosts = [
|
|
|
5
5
|
"bsky.brid.gy",
|
|
6
6
|
"web.brid.gy"
|
|
7
7
|
];
|
|
8
|
-
const pathRegex = /^\/r\/(https?:\/\/.+)
|
|
8
|
+
const pathRegex = /^\/r\/(https?:\/\/.+)$/i;
|
|
9
9
|
const unwrapBridgyFed = (url) => {
|
|
10
10
|
if (!isHostOf(url, hosts)) return;
|
|
11
11
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
|
+
import { getParamTarget } from "../utils.mjs";
|
|
4
|
+
// src/unwraps/buffer.ts
|
|
5
|
+
const hosts = [
|
|
6
|
+
"bufferapp.com",
|
|
7
|
+
"www.bufferapp.com",
|
|
8
|
+
"buffer.com",
|
|
9
|
+
"www.buffer.com"
|
|
10
|
+
];
|
|
11
|
+
const composeHosts = ["publish.buffer.com"];
|
|
12
|
+
const addPathRegex = /^\/add\/?$/i;
|
|
13
|
+
const composePathRegex = /^\/compose$/i;
|
|
14
|
+
const isCarrierPath = (url) => {
|
|
15
|
+
if (isHostOf(url, hosts)) return isAnyOf(url.pathname, addPathRegex);
|
|
16
|
+
if (isHostOf(url, composeHosts)) return isAnyOf(url.pathname, composePathRegex);
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
const unwrapBuffer = (url) => {
|
|
20
|
+
if (!isCarrierPath(url)) return;
|
|
21
|
+
return getParamTarget(url, "url");
|
|
22
|
+
};
|
|
23
|
+
export { unwrapBuffer };
|
package/dist/unwraps/buybox.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/buzzstream.ts
|
|
3
|
-
const clickPathRegex = /^\/1\/l\/[0-9a-f]{32}
|
|
3
|
+
const clickPathRegex = /^\/1\/l\/[0-9a-f]{32}$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: ["tx.bz-mail-us1.com", "tx.bz-mail.com"],
|
|
6
6
|
params: ["rl"]
|
package/dist/unwraps/cake.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { hasQueryParam, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamTarget } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/cake.ts
|
|
4
4
|
const unwrapCake = (url) => {
|
|
5
|
-
if (url.pathname !== "/" || !url
|
|
5
|
+
if (url.pathname !== "/" || !hasQueryParam(url, "a") || !hasQueryParam(url, "c")) return;
|
|
6
6
|
const target = getParamTarget(url, "ckmrdr");
|
|
7
7
|
if (!target || !isHttpUrl(target)) return;
|
|
8
8
|
return target;
|
|
@@ -6,8 +6,8 @@ const hosts = [
|
|
|
6
6
|
"checkpoint.url-protection.com",
|
|
7
7
|
"sonicwall.url-protection.com"
|
|
8
8
|
];
|
|
9
|
-
const pathRegex = /^\/v1\/(?:r\d+\/)?url
|
|
10
|
-
const v2Regex = /^\/v2\/(?:r\d+\/)?___(?<target>.+)___\.[\w+/=-]+(?<fragment>#.*)
|
|
9
|
+
const pathRegex = /^\/v1\/(?:r\d+\/)?url$/i;
|
|
10
|
+
const v2Regex = /^\/v2\/(?:r\d+\/)?___(?<target>.+)___\.[\w+/=-]+(?<fragment>#.*)?$/i;
|
|
11
11
|
const starEscapeRegex = /\*([0-9a-f]{2})/gi;
|
|
12
12
|
const unwrapCheckPointHarmony = (url) => {
|
|
13
13
|
if (isHostOf(url, "protect.checkpoint.com")) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
1
|
import { decodePercent } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
3
3
|
import { createParamExtractor } from "../utils.mjs";
|
|
4
4
|
// src/unwraps/cjNetwork.ts
|
|
5
5
|
const hosts = [
|
|
@@ -19,8 +19,8 @@ const hosts = [
|
|
|
19
19
|
"kqzyfj.com",
|
|
20
20
|
"pjtra.com"
|
|
21
21
|
];
|
|
22
|
-
const clickPathRegex = /^\/(?:t\/)?[^/]
|
|
23
|
-
const deepLinkPathRegex = /^\/links\/\d+\/type\/(?:dlg|am)\/(?:sid\/[^/]*\/)?(?:fragment\/([^/]*)\/)?(https?):\/\/?(.+)
|
|
22
|
+
const clickPathRegex = /^\/(?:t\/)?[^/]+$/i;
|
|
23
|
+
const deepLinkPathRegex = /^\/links\/\d+\/type\/(?:dlg|am)\/(?:sid\/[^/]*\/)?(?:fragment\/([^/]*)\/)?(https?):\/\/?(.+)$/i;
|
|
24
24
|
const extractUrlParam = createParamExtractor({
|
|
25
25
|
hosts,
|
|
26
26
|
params: ["url", "loc"]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
3
|
// src/unwraps/claritas.ts
|
|
4
|
-
const measurePrefixRegex = /^\/measure
|
|
5
|
-
const shortPrefixRegex = /^\/m
|
|
4
|
+
const measurePrefixRegex = /^\/measure\//i;
|
|
5
|
+
const shortPrefixRegex = /^\/m\//i;
|
|
6
6
|
const unwrapClaritas = (url) => {
|
|
7
7
|
if (isHostOf(url, ["claritaspod.com", "www.claritaspod.com"])) return getPathTarget(url, measurePrefixRegex);
|
|
8
8
|
if (isHostOf(url, "clrtpod.com")) return getPathTarget(url, shortPrefixRegex);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { hasQueryParam, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamTarget } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/cleverbridge.ts
|
|
4
|
-
const pathRegex = /^\/\d+\/cookie
|
|
4
|
+
const pathRegex = /^\/\d+\/cookie$/i;
|
|
5
5
|
const unwrapCleverbridge = (url) => {
|
|
6
|
-
if (!pathRegex.test(url.pathname) || !url
|
|
6
|
+
if (!pathRegex.test(url.pathname) || !hasQueryParam(url, "affiliate")) return;
|
|
7
7
|
const target = getParamTarget(url, "redirectto");
|
|
8
8
|
if (!target || !isHttpUrl(target)) return;
|
|
9
9
|
return target;
|
package/dist/unwraps/cloudhq.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/cloudhq.ts
|
|
3
|
-
const clickPathRegex = /^\/mail_track\/link\/[^/]
|
|
3
|
+
const clickPathRegex = /^\/mail_track\/link\/[^/]+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: /^(?:www\.)?cloudhq-mkt\d+\.(?:net|us)$/,
|
|
6
6
|
params: ["url"]
|
package/dist/unwraps/cloze.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/cloze.ts
|
|
3
|
-
const pathRegex = /^\/r\/[\w-]+\/(?:n\/[\w-]+\/)?(.+)
|
|
3
|
+
const pathRegex = /^\/r\/[\w-]+\/(?:n\/[\w-]+\/)?(.+)$/i;
|
|
4
4
|
const unwrapCloze = (url) => {
|
|
5
5
|
if (!isHostOf(url, "circulate.it")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
package/dist/unwraps/cohst.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
3
|
// src/unwraps/cohst.ts
|
|
4
|
-
const prefixRegex = /^\/pdcst\/[A-Za-z0-9]
|
|
4
|
+
const prefixRegex = /^\/pdcst\/[A-Za-z0-9]+\//i;
|
|
5
5
|
const unwrapCohst = (url) => {
|
|
6
6
|
if (!isHostOf(url, "cohst.app")) return;
|
|
7
7
|
return getPathTarget(url, prefixRegex);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
1
2
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
3
|
// src/unwraps/contactMonkey.ts
|
|
3
|
-
const carrierRegex = /[?&]cm_destination
|
|
4
|
+
const carrierRegex = /[?&]cm_destination=/i;
|
|
4
5
|
const hosts = ["contactmonkey.com", "tk.cmnky.co"];
|
|
5
6
|
const unwrapContactMonkey = (url) => {
|
|
6
|
-
if (!isHostOf(url, hosts) || url.pathname
|
|
7
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, "/api/v1/tracker")) return;
|
|
7
8
|
const match = carrierRegex.exec(url.search);
|
|
8
9
|
if (!match) return;
|
|
9
10
|
return `${url.search.slice(match.index + match[0].length)}${url.hash}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/convertiser.ts
|
|
3
|
-
const pathRegex = /^\/click\/[0-9a-f]{8}-[0-9a-f]{8}-[0-9a-f]{8}
|
|
3
|
+
const pathRegex = /^\/click\/[0-9a-f]{8}-[0-9a-f]{8}-[0-9a-f]{8}\/$/i;
|
|
4
4
|
const extractDeepLink = createParamExtractor({
|
|
5
5
|
hosts: "converti.se",
|
|
6
6
|
params: ["deep_link"]
|