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
|
@@ -0,0 +1,85 @@
|
|
|
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/pinterestPin.ts
|
|
5
|
+
const pathRegex = /^\/pin\/create\/(?:button|link|extension|bookmarklet|scraped)\/?$/i;
|
|
6
|
+
const hosts = [
|
|
7
|
+
"pinterest.com",
|
|
8
|
+
"www.pinterest.com",
|
|
9
|
+
/^[a-z]{2}\.pinterest\.com$/,
|
|
10
|
+
"pinterest.at",
|
|
11
|
+
"www.pinterest.at",
|
|
12
|
+
"pinterest.be",
|
|
13
|
+
"www.pinterest.be",
|
|
14
|
+
"pinterest.ca",
|
|
15
|
+
"www.pinterest.ca",
|
|
16
|
+
"pinterest.ch",
|
|
17
|
+
"www.pinterest.ch",
|
|
18
|
+
"pinterest.cl",
|
|
19
|
+
"www.pinterest.cl",
|
|
20
|
+
"pinterest.co",
|
|
21
|
+
"www.pinterest.co",
|
|
22
|
+
"pinterest.co.in",
|
|
23
|
+
"www.pinterest.co.in",
|
|
24
|
+
"pinterest.co.kr",
|
|
25
|
+
"www.pinterest.co.kr",
|
|
26
|
+
"pinterest.co.nz",
|
|
27
|
+
"www.pinterest.co.nz",
|
|
28
|
+
"pinterest.co.uk",
|
|
29
|
+
"www.pinterest.co.uk",
|
|
30
|
+
"pinterest.com.au",
|
|
31
|
+
"www.pinterest.com.au",
|
|
32
|
+
"pinterest.com.ec",
|
|
33
|
+
"www.pinterest.com.ec",
|
|
34
|
+
"pinterest.com.mx",
|
|
35
|
+
"www.pinterest.com.mx",
|
|
36
|
+
"pinterest.com.pe",
|
|
37
|
+
"www.pinterest.com.pe",
|
|
38
|
+
"pinterest.de",
|
|
39
|
+
"www.pinterest.de",
|
|
40
|
+
"pinterest.dk",
|
|
41
|
+
"www.pinterest.dk",
|
|
42
|
+
"pinterest.ec",
|
|
43
|
+
"www.pinterest.ec",
|
|
44
|
+
"pinterest.es",
|
|
45
|
+
"www.pinterest.es",
|
|
46
|
+
"pinterest.fr",
|
|
47
|
+
"www.pinterest.fr",
|
|
48
|
+
"pinterest.hu",
|
|
49
|
+
"www.pinterest.hu",
|
|
50
|
+
"pinterest.id",
|
|
51
|
+
"www.pinterest.id",
|
|
52
|
+
"pinterest.ie",
|
|
53
|
+
"www.pinterest.ie",
|
|
54
|
+
"pinterest.in",
|
|
55
|
+
"www.pinterest.in",
|
|
56
|
+
"pinterest.it",
|
|
57
|
+
"www.pinterest.it",
|
|
58
|
+
"pinterest.jp",
|
|
59
|
+
"www.pinterest.jp",
|
|
60
|
+
"pinterest.kr",
|
|
61
|
+
"www.pinterest.kr",
|
|
62
|
+
"pinterest.mx",
|
|
63
|
+
"www.pinterest.mx",
|
|
64
|
+
"pinterest.nl",
|
|
65
|
+
"www.pinterest.nl",
|
|
66
|
+
"pinterest.nz",
|
|
67
|
+
"www.pinterest.nz",
|
|
68
|
+
"pinterest.pe",
|
|
69
|
+
"www.pinterest.pe",
|
|
70
|
+
"pinterest.ph",
|
|
71
|
+
"www.pinterest.ph",
|
|
72
|
+
"pinterest.pt",
|
|
73
|
+
"www.pinterest.pt",
|
|
74
|
+
"pinterest.ru",
|
|
75
|
+
"www.pinterest.ru",
|
|
76
|
+
"pinterest.se",
|
|
77
|
+
"www.pinterest.se",
|
|
78
|
+
"pinterest.tw",
|
|
79
|
+
"www.pinterest.tw"
|
|
80
|
+
];
|
|
81
|
+
const unwrapPinterestPin = (url) => {
|
|
82
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, pathRegex)) return;
|
|
83
|
+
return getParamTarget(url, "url");
|
|
84
|
+
};
|
|
85
|
+
export { unwrapPinterestPin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/pipedrive.ts
|
|
3
|
-
const pathRegex = /^\/c\/[a-z0-9]+\/[a-z0-9]+\/[a-z0-9]+\/\d
|
|
3
|
+
const pathRegex = /^\/c\/[a-z0-9]+\/[a-z0-9]+\/[a-z0-9]+\/\d+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.pipedrive\.email$/,
|
|
6
6
|
params: ["redirectUrl"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/playerFm.ts
|
|
3
|
+
const extractImporter = createParamExtractor({
|
|
4
|
+
hosts: "player.fm",
|
|
5
|
+
path: "/importer/feed",
|
|
6
|
+
params: ["url"]
|
|
7
|
+
});
|
|
8
|
+
const extractSubscribe = createParamExtractor({
|
|
9
|
+
hosts: "player.fm",
|
|
10
|
+
path: "/subscribe",
|
|
11
|
+
params: ["id"]
|
|
12
|
+
});
|
|
13
|
+
const unwrapPlayerFm = (url) => {
|
|
14
|
+
return extractImporter(url) ?? extractSubscribe(url);
|
|
15
|
+
};
|
|
16
|
+
export { unwrapPlayerFm };
|
|
@@ -0,0 +1,15 @@
|
|
|
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/pocketSave.ts
|
|
5
|
+
const hosts = ["getpocket.com", "www.getpocket.com"];
|
|
6
|
+
const paths = [
|
|
7
|
+
"/save",
|
|
8
|
+
"/edit",
|
|
9
|
+
"/edit.php"
|
|
10
|
+
];
|
|
11
|
+
const unwrapPocketSave = (url) => {
|
|
12
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, paths)) return;
|
|
13
|
+
return getParamTarget(url, "url");
|
|
14
|
+
};
|
|
15
|
+
export { unwrapPocketSave };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { decodeEncodedScheme } from "../utils.mjs";
|
|
3
|
+
// src/unwraps/podcastAddict.ts
|
|
4
|
+
const feedPrefixRegex = /^\/feed\//i;
|
|
5
|
+
const hosts = ["podcastaddict.com"];
|
|
6
|
+
const unwrapPodcastAddict = (url) => {
|
|
7
|
+
if (!isHostOf(url, hosts)) return;
|
|
8
|
+
const match = url.pathname.match(feedPrefixRegex);
|
|
9
|
+
if (!match) return;
|
|
10
|
+
const feed = decodeEncodedScheme(decodePercent(url.pathname.slice(match[0].length)));
|
|
11
|
+
if (!isHttpUrl(feed)) return;
|
|
12
|
+
return `${feed}${url.search}${url.hash}`;
|
|
13
|
+
};
|
|
14
|
+
export { unwrapPodcastAddict };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/podcastReady.ts
|
|
3
|
+
const unwrapPodcastReady = createParamExtractor({
|
|
4
|
+
hosts: ["podcastready.com", "www.podcastready.com"],
|
|
5
|
+
path: "/oneclick_bookmark.php",
|
|
6
|
+
params: ["url"]
|
|
7
|
+
});
|
|
8
|
+
export { unwrapPodcastReady };
|
package/dist/unwraps/podcorn.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/podcorn.ts
|
|
4
|
-
const episodePrefixRegex = /^\/e
|
|
4
|
+
const episodePrefixRegex = /^\/e\//i;
|
|
5
5
|
const unwrapPodcorn = (url) => {
|
|
6
6
|
if (!isHostOf(url, "pdcn.co")) return;
|
|
7
7
|
return getPathTarget(url, episodePrefixRegex);
|
package/dist/unwraps/podkite.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/podkite.ts
|
|
4
|
-
const schemePrefixRegex = /^\/(https?)\/[^/]
|
|
4
|
+
const schemePrefixRegex = /^\/(https?)\/[^/]+\//i;
|
|
5
5
|
const unwrapPodkite = (url) => {
|
|
6
6
|
if (!isHostOf(url, "growx.podkite.com")) return;
|
|
7
7
|
const match = url.pathname.match(schemePrefixRegex);
|
|
@@ -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/podscribe.ts
|
|
4
|
-
const rssPrefixRegex = /^\/rss\/p
|
|
4
|
+
const rssPrefixRegex = /^\/rss\/p\//i;
|
|
5
5
|
const unwrapPodscribe = (url) => {
|
|
6
6
|
if (!isHostOf(url, ["pscrb.fm", "verifi.podscribe.com"])) return;
|
|
7
7
|
return getPathTarget(url, rssPrefixRegex);
|
|
@@ -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/podsights.ts
|
|
4
|
-
const episodePrefixRegex = /^\/e
|
|
4
|
+
const episodePrefixRegex = /^\/e\//i;
|
|
5
5
|
const unwrapPodsights = (url) => {
|
|
6
6
|
if (!isHostOf(url, ["pdst.fm", "prfx.byspotify.com"])) return;
|
|
7
7
|
return getPathTarget(url, episodePrefixRegex, url.protocol);
|
package/dist/unwraps/podup.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
3
|
// src/unwraps/podup.ts
|
|
4
|
-
const mediaPrefixRegex = /^\/media
|
|
4
|
+
const mediaPrefixRegex = /^\/media\//i;
|
|
5
5
|
const unwrapPodup = (url) => {
|
|
6
6
|
if (!isHostOf(url, "traffic.podup.com")) return;
|
|
7
|
-
|
|
8
|
-
return getPathTarget(pathUrl, mediaPrefixRegex);
|
|
7
|
+
return getPathTarget(url, mediaPrefixRegex, "https:", "");
|
|
9
8
|
};
|
|
10
9
|
export { unwrapPodup };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamValues } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/postAffiliatePro.ts
|
|
4
|
-
const pathRegex = /^\/(?:[^/]+\/)*scripts\/click\.php
|
|
4
|
+
const pathRegex = /^\/(?:[^/]+\/)*scripts\/click\.php$/i;
|
|
5
5
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
6
6
|
const unwrapPostAffiliatePro = (url) => {
|
|
7
7
|
if (!pathRegex.test(url.pathname)) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decodePercent, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/postmark.ts
|
|
3
|
-
const postmarkPathRegex = /^\/[23][mt]?(?<secure>s?)\/(?<target>[^/]+)
|
|
3
|
+
const postmarkPathRegex = /^\/[23][mt]?(?<secure>s?)\/(?<target>[^/]+)\//i;
|
|
4
4
|
const unwrapPostmark = (url) => {
|
|
5
5
|
if (!isHostOf(url, ["click.pstmrk.it", "track.pstmrk.it"])) return;
|
|
6
6
|
const match = url.pathname.match(postmarkPathRegex);
|
|
@@ -2,9 +2,9 @@ import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
|
2
2
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
3
|
import { getParamTarget } from "../utils.mjs";
|
|
4
4
|
// src/unwraps/prNewswire.ts
|
|
5
|
-
const
|
|
5
|
+
const hosts = ["c212.net", "edge.prnewswire.com"];
|
|
6
6
|
const unwrapPrNewswire = (url) => {
|
|
7
|
-
if (!isAnyOf(url.hostname,
|
|
7
|
+
if (!isAnyOf(url.hostname, hosts) || !isAnyOf(url.pathname, "/c/link/")) return;
|
|
8
8
|
const target = getParamTarget(url, "u", -1);
|
|
9
9
|
if (!target) return;
|
|
10
10
|
if (isHttpUrl(target)) return target;
|
package/dist/unwraps/prezly.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/prezly.ts
|
|
3
|
-
const pathRegex = /^\/c\/[0-9a-f-]{36}\/[0-9a-f]{8}\/([^/]+)
|
|
3
|
+
const pathRegex = /^\/c\/[0-9a-f-]{36}\/[0-9a-f]{8}\/([^/]+)$/i;
|
|
4
4
|
const unwrapPrezly = (url) => {
|
|
5
5
|
if (!isHostOf(url, "prezlymail.com")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -9,6 +9,6 @@ const extractTarget = createParamExtractor({
|
|
|
9
9
|
const unwrapProofpointV2 = (url) => {
|
|
10
10
|
const raw = extractTarget(url);
|
|
11
11
|
if (!raw) return;
|
|
12
|
-
return decodePercent(raw.
|
|
12
|
+
return decodePercent(raw.replaceAll("-", "%").replaceAll("_", "/"));
|
|
13
13
|
};
|
|
14
14
|
export { unwrapProofpointV2 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { decodeBase64Url, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getUtf8ByteLength } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/proofpointV3.ts
|
|
4
|
-
const v3PathRegex = /^\/v3\/__(.+)__;([^!]*)
|
|
4
|
+
const v3PathRegex = /^\/v3\/__(.+)__;([^!]*)!/i;
|
|
5
5
|
const v3Hosts = [
|
|
6
6
|
"urldefense.com",
|
|
7
7
|
"urldefense.proofpoint.com",
|
package/dist/unwraps/prweb.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { createParamExtractor
|
|
1
|
+
import { decodeBase64, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/prweb.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
5
5
|
hosts: "www.prweb.net",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/prxPlayer.ts
|
|
3
|
+
const extractListen = createParamExtractor({
|
|
4
|
+
hosts: "play.prx.org",
|
|
5
|
+
path: "/listen",
|
|
6
|
+
params: ["uf"]
|
|
7
|
+
});
|
|
8
|
+
const extractEmbed = createParamExtractor({
|
|
9
|
+
hosts: "play.prx.org",
|
|
10
|
+
path: "/e",
|
|
11
|
+
params: ["uf"]
|
|
12
|
+
});
|
|
13
|
+
const unwrapPrxPlayer = (url) => {
|
|
14
|
+
return extractListen(url) ?? extractEmbed(url);
|
|
15
|
+
};
|
|
16
|
+
export { unwrapPrxPlayer };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { decodePercent, hasQueryParam, 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/qualityClick.ts
|
|
4
5
|
const encodedSchemeRegex = /^https?%3A/i;
|
|
5
6
|
const unwrapQualityClick = (url) => {
|
|
6
|
-
if (url.pathname
|
|
7
|
-
if (!url
|
|
7
|
+
if (!isAnyOf(url.pathname, "/go.cgi")) return;
|
|
8
|
+
if (!hasQueryParam(url, "pid") || !hasQueryParam(url, "wmid")) return;
|
|
8
9
|
let target = getParamValues(url, "target").at(0);
|
|
9
10
|
if (target && encodedSchemeRegex.test(target)) target = decodePercent(target);
|
|
10
11
|
if (target && isHttpUrl(target)) return target;
|
|
@@ -4,15 +4,15 @@ import { getParamTarget } from "../utils.mjs";
|
|
|
4
4
|
const linkShapes = [
|
|
5
5
|
{
|
|
6
6
|
host: "hb.afl.rakuten.co.jp",
|
|
7
|
-
pathRegex: /^\/(?:hgc|ichiba)\//
|
|
7
|
+
pathRegex: /^\/(?:hgc|ichiba)\//i
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
host: "pt.afl.rakuten.co.jp",
|
|
11
|
-
pathRegex: /^\/c\//
|
|
11
|
+
pathRegex: /^\/c\//i
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
host: "mt.afl.rakuten.co.jp",
|
|
15
|
-
pathRegex: /^\/mc\//
|
|
15
|
+
pathRegex: /^\/mc\//i
|
|
16
16
|
}
|
|
17
17
|
];
|
|
18
18
|
const targetParams = ["pc", "url"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/redditOut.ts
|
|
3
|
-
const outPathRegex = /^\/(?:t\d_[a-z0-9]+)
|
|
3
|
+
const outPathRegex = /^\/(?:t\d_[a-z0-9]+)?$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: "out.reddit.com",
|
|
6
6
|
params: ["url"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/redditSubmit.ts
|
|
3
|
+
const submitPathRegex = /^\/submit\/?$/i;
|
|
4
|
+
const extractTarget = createParamExtractor({
|
|
5
|
+
hosts: [
|
|
6
|
+
"www.reddit.com",
|
|
7
|
+
"reddit.com",
|
|
8
|
+
"en.reddit.com",
|
|
9
|
+
"old.reddit.com",
|
|
10
|
+
"np.reddit.com",
|
|
11
|
+
"m.reddit.com"
|
|
12
|
+
],
|
|
13
|
+
params: ["url"]
|
|
14
|
+
});
|
|
15
|
+
const unwrapRedditSubmit = (url) => {
|
|
16
|
+
if (!submitPathRegex.test(url.pathname)) return;
|
|
17
|
+
return extractTarget(url);
|
|
18
|
+
};
|
|
19
|
+
export { unwrapRedditSubmit };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { createParamExtractor } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/researchgate.ts
|
|
4
|
-
const derefPathRegex = /^\/deref\/(.+)
|
|
4
|
+
const derefPathRegex = /^\/deref\/(.+)$/i;
|
|
5
5
|
const unwrapDerefPage = createParamExtractor({
|
|
6
6
|
hosts: "www.researchgate.net",
|
|
7
7
|
path: "/go.Deref.html",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { decodePercent, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { decodePercent, hasQueryParam, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamTarget } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/reviveAdserver.ts
|
|
4
|
-
const clickPathRegex = /^(?:\/[^/]+)*\/c[kl]\.php
|
|
5
|
-
const legacyClickPathRegex = /^(?:\/[^/]+)*\/adclick\.php
|
|
4
|
+
const clickPathRegex = /^(?:\/[^/]+)*\/c[kl]\.php$/i;
|
|
5
|
+
const legacyClickPathRegex = /^(?:\/[^/]+)*\/adclick\.php$/i;
|
|
6
6
|
const destinationMarker = "oadest=";
|
|
7
7
|
const fallbackMarker = "dest=";
|
|
8
8
|
const unwrapReviveAdserver = (url) => {
|
|
@@ -18,7 +18,7 @@ const unwrapReviveAdserver = (url) => {
|
|
|
18
18
|
if (isHttpUrl(target)) return target;
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
if (!legacyClickPathRegex.test(url.pathname) || !url
|
|
21
|
+
if (!legacyClickPathRegex.test(url.pathname) || !hasQueryParam(url, "bannerid")) return;
|
|
22
22
|
const target = getParamTarget(url, "dest");
|
|
23
23
|
if (!target || !isHttpUrl(target)) return;
|
|
24
24
|
return target;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/rssBoardValidator.ts
|
|
3
|
+
const unwrapRssBoardValidator = createParamExtractor({
|
|
4
|
+
hosts: ["rssboard.org", "www.rssboard.org"],
|
|
5
|
+
path: "/rss-validator/check.cgi",
|
|
6
|
+
params: ["url"]
|
|
7
|
+
});
|
|
8
|
+
export { unwrapRssBoardValidator };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/salesdoubler.ts
|
|
3
|
-
const pathRegex = /^\/in\/offer\/\d
|
|
3
|
+
const pathRegex = /^\/in\/offer\/\d+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: "rdr.salesdoubler.com.ua",
|
|
6
6
|
params: ["dlink"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/saleshandy.ts
|
|
3
|
-
const clickPathRegex = /^\/r\/e\/[A-Za-z0-9]
|
|
3
|
+
const clickPathRegex = /^\/r\/e\/[A-Za-z0-9]+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: /^(?:go\.sh[ez]trk|link\.shetrk|lc\d+\.sh[aez]trk)\.com$/,
|
|
6
6
|
params: ["r"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { createParamExtractor
|
|
1
|
+
import { decodeBase64, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/segmentfault.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
5
5
|
hosts: "link.segmentfault.com",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { decodeBase64, hasQueryParam, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getParamValues } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/serendipity.ts
|
|
4
|
-
const pathRegex = /^(?:\/[^/]+)?\/exit\.php
|
|
4
|
+
const pathRegex = /^(?:\/[^/]+)?\/exit\.php$/i;
|
|
5
5
|
const unwrapSerendipity = (url) => {
|
|
6
|
-
if (!pathRegex.test(url.pathname) || !url
|
|
6
|
+
if (!pathRegex.test(url.pathname) || !hasQueryParam(url, "entry_id")) return;
|
|
7
7
|
const raw = getParamValues(url, "url").at(0);
|
|
8
8
|
if (!raw) return;
|
|
9
9
|
const decoded = decodeBase64(raw);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/shareaholic.ts
|
|
3
|
+
const sharePathRegex = /^\/api\/share\/?$/i;
|
|
4
|
+
const extractTarget = createParamExtractor({
|
|
5
|
+
hosts: ["www.shareaholic.com", "shareaholic.com"],
|
|
6
|
+
params: ["link"]
|
|
7
|
+
});
|
|
8
|
+
const unwrapShareaholic = (url) => {
|
|
9
|
+
if (!sharePathRegex.test(url.pathname)) return;
|
|
10
|
+
return extractTarget(url);
|
|
11
|
+
};
|
|
12
|
+
export { unwrapShareaholic };
|
|
@@ -0,0 +1,11 @@
|
|
|
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/slashdotBookmark.ts
|
|
5
|
+
const hosts = ["slashdot.org", "www.slashdot.org"];
|
|
6
|
+
const pathRegex = /^\/(?:bookmark|slashdot-it)\.pl$/i;
|
|
7
|
+
const unwrapSlashdotBookmark = (url) => {
|
|
8
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, pathRegex)) return;
|
|
9
|
+
return getParamTarget(url, "url");
|
|
10
|
+
};
|
|
11
|
+
export { unwrapSlashdotBookmark };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/smartredirect.ts
|
|
3
|
-
const pathRegex = /^\/(?:redir\/clickGate\.php|api_v2\/ClickGate\.php)
|
|
3
|
+
const pathRegex = /^\/(?:redir\/clickGate\.php|api_v2\/ClickGate\.php)?$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: [
|
|
6
6
|
"smartredirect.de",
|
package/dist/unwraps/sophos.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { createParamExtractor
|
|
1
|
+
import { decodeBase64Url, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/sophos.ts
|
|
4
4
|
const extractEncoded = createParamExtractor({
|
|
5
5
|
hosts: /^(?:us|eu|ca)-[a-z]+-\d\.protection\.sophos\.com$/,
|
package/dist/unwraps/soundOn.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/soundOn.ts
|
|
4
|
-
const showPrefixRegex = /^\/p\/[^/]
|
|
4
|
+
const showPrefixRegex = /^\/p\/[^/]+\//i;
|
|
5
5
|
const unwrapSoundOn = (url) => {
|
|
6
6
|
if (!isHostOf(url, "sw.soundon.fm")) return;
|
|
7
7
|
return getPathTarget(url, showPrefixRegex);
|
package/dist/unwraps/stay22.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamTarget } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/stay22.ts
|
|
4
|
-
const pathRegex = /^\/allez\/[\w-]
|
|
4
|
+
const pathRegex = /^\/allez\/[\w-]+$/i;
|
|
5
5
|
const unwrapStay22 = (url) => {
|
|
6
6
|
if (!isHostOf(url, "www.stay22.com") || !pathRegex.test(url.pathname)) return;
|
|
7
7
|
const target = getParamTarget(url, "link") ?? "";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/streamsend.ts
|
|
3
|
-
const clickPathRegex = /^\/c\/\d+\/\d+\/[^/]+\/[^/]
|
|
3
|
+
const clickPathRegex = /^\/c\/\d+\/\d+\/[^/]+\/[^/]+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: "app.streamsend.com",
|
|
6
6
|
params: ["redirect_to"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getParamTarget } from "../utils.mjs";
|
|
3
|
+
// src/unwraps/stumbleuponSubmit.ts
|
|
4
|
+
const hosts = [
|
|
5
|
+
"www.stumbleupon.com",
|
|
6
|
+
"stumbleupon.com",
|
|
7
|
+
"badge.stumbleupon.com"
|
|
8
|
+
];
|
|
9
|
+
const pathRegex = /^\/(?:submit(?:\.php)?|refer\.php|badge\/?)$/i;
|
|
10
|
+
const unwrapStumbleuponSubmit = (url) => {
|
|
11
|
+
if (!isHostOf(url, hosts) || !pathRegex.test(url.pathname)) return;
|
|
12
|
+
return getParamTarget(url, "url");
|
|
13
|
+
};
|
|
14
|
+
export { unwrapStumbleuponSubmit };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
|
+
// src/unwraps/subscribeByEmail.ts
|
|
4
|
+
const feedPrefixRegex = /^\/(?=(?:https?:\/*)?[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::\d+)?\/)/i;
|
|
5
|
+
const hosts = ["subscribebyemail.com", "www.subscribebyemail.com"];
|
|
6
|
+
const unwrapSubscribeByEmail = (url) => {
|
|
7
|
+
if (!isHostOf(url, hosts)) return;
|
|
8
|
+
return getPathTarget(url, feedPrefixRegex);
|
|
9
|
+
};
|
|
10
|
+
export { unwrapSubscribeByEmail };
|