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,10 @@
|
|
|
1
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getPathTarget } from "../pathTarget.mjs";
|
|
3
|
+
// src/unwraps/subscribeOnAndroid.ts
|
|
4
|
+
const feedPrefixRegex = /^\/(?=(?:https?:\/*)?[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::\d+)?\/)/i;
|
|
5
|
+
const hosts = ["subscribeonandroid.com", "www.subscribeonandroid.com"];
|
|
6
|
+
const unwrapSubscribeOnAndroid = (url) => {
|
|
7
|
+
if (!isHostOf(url, hosts)) return;
|
|
8
|
+
return getPathTarget(url, feedPrefixRegex);
|
|
9
|
+
};
|
|
10
|
+
export { unwrapSubscribeOnAndroid };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/subscribeRu.ts
|
|
3
|
-
const pathRegex = /^\/(?:[^/]+,\d+\/\d{14}\/[^/]+\/m\d+|_)\/-\/([^/:]*\.[^/:]*(?:\/.*)?)
|
|
3
|
+
const pathRegex = /^\/(?:[^/]+,\d+\/\d{14}\/[^/]+\/m\d+|_)\/-\/([^/:]*\.[^/:]*(?:\/.*)?)$/i;
|
|
4
4
|
const unwrapSubscribeRu = (url) => {
|
|
5
5
|
if (!isHostOf(url, "redirect.subscribe.ru")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import { decodeBase64Url } from "../utils.mjs";
|
|
1
|
+
import { decodeBase64Url, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
3
2
|
// src/unwraps/substack.ts
|
|
4
|
-
const redirectPathRegex = /^\/redirect\/2\/([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]
|
|
3
|
+
const redirectPathRegex = /^\/redirect\/2\/([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]+$/i;
|
|
5
4
|
const unwrapSubstack = (url) => {
|
|
6
5
|
if (!isHostOf(url, "substack.com")) return;
|
|
7
6
|
const payload = url.pathname.match(redirectPathRegex)?.[1];
|
package/dist/unwraps/surly.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decodePercent, isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/surly.ts
|
|
3
|
-
const pathRegex = /^\/o\/([^/].*?)(?:\/AA\d{6})
|
|
3
|
+
const pathRegex = /^\/o\/([^/].*?)(?:\/AA\d{6})?$/i;
|
|
4
4
|
const schemeRegex = /^https?:\/\//i;
|
|
5
5
|
const unwrapSurly = (url) => {
|
|
6
6
|
if (!isHostOf(url, ["sur.ly", "www.sur.ly"])) return;
|
package/dist/unwraps/swap.mjs
CHANGED
|
@@ -8,7 +8,7 @@ const hosts = [
|
|
|
8
8
|
"staging.swap.fm",
|
|
9
9
|
"tracking-stage.swap.fm"
|
|
10
10
|
];
|
|
11
|
-
const trackPrefixRegex = /^\/track\/[^/]
|
|
11
|
+
const trackPrefixRegex = /^\/track\/[^/]+\//i;
|
|
12
12
|
const unwrapSwap = (url) => {
|
|
13
13
|
if (!isHostOf(url, hosts)) return;
|
|
14
14
|
return getPathTarget(url, trackPrefixRegex);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/symantecClicktime.ts
|
|
3
|
-
const pathRegex = /^\/(?:[A-Za-z0-9]+|a\/1\/[\w=-]+)
|
|
3
|
+
const pathRegex = /^\/(?:[A-Za-z0-9]+|a\/1\/[\w=-]+)$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: "clicktime.symantec.com",
|
|
6
6
|
params: ["u"]
|
|
@@ -5,7 +5,7 @@ const hosts = [
|
|
|
5
5
|
"law-pacific-csm.symplicity.com",
|
|
6
6
|
"umd-csm.symplicity.com"
|
|
7
7
|
];
|
|
8
|
-
const clickPathRegex = /^\/(?:t\/[a-z]+|track)\/[0-9a-f]{32}\/\d+\/realurl=(https?:.*)
|
|
8
|
+
const clickPathRegex = /^\/(?:t\/[a-z]+|track)\/[0-9a-f]{32}\/\d+\/realurl=(https?:.*)$/i;
|
|
9
9
|
const unwrapSymplicity = (url) => {
|
|
10
10
|
if (!isHostOf(url, hosts)) return;
|
|
11
11
|
const match = clickPathRegex.exec(url.pathname);
|
package/dist/unwraps/teacup.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { getQueryParam } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
2
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
3
|
// src/unwraps/teacup.ts
|
|
3
4
|
const hostRegex = /^\d+\.teacup\.com$/;
|
|
4
|
-
const pathRegex = /^\/[^/]+\/bbs
|
|
5
|
+
const pathRegex = /^\/[^/]+\/bbs$/i;
|
|
5
6
|
const extractTarget = createParamExtractor({
|
|
6
7
|
hosts: hostRegex,
|
|
7
8
|
params: ["JUR"]
|
|
8
9
|
});
|
|
9
10
|
const unwrapTeacup = (url) => {
|
|
10
|
-
if (!pathRegex.test(url.pathname) || url
|
|
11
|
+
if (!pathRegex.test(url.pathname) || getQueryParam(url, "M") !== "JU") return;
|
|
11
12
|
return extractTarget(url);
|
|
12
13
|
};
|
|
13
14
|
export { unwrapTeacup };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { getParamTarget } from "../utils.mjs";
|
|
3
|
+
// src/unwraps/technoratiFaves.ts
|
|
4
|
+
const hosts = ["technorati.com", "www.technorati.com"];
|
|
5
|
+
const pathRegex = /^\/faves(?:\/[^/]*)?$/i;
|
|
6
|
+
const unwrapTechnoratiFaves = (url) => {
|
|
7
|
+
if (!isHostOf(url, hosts) || !pathRegex.test(url.pathname)) return;
|
|
8
|
+
return getParamTarget(url, "add");
|
|
9
|
+
};
|
|
10
|
+
export { unwrapTechnoratiFaves };
|
|
@@ -0,0 +1,18 @@
|
|
|
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/telegramShare.ts
|
|
5
|
+
const pathRegex = /^\/share(?:\/url|\/link\/add)?\/?$/i;
|
|
6
|
+
const hosts = [
|
|
7
|
+
"t.me",
|
|
8
|
+
"www.t.me",
|
|
9
|
+
"telegram.me",
|
|
10
|
+
"www.telegram.me",
|
|
11
|
+
"telegram.dog",
|
|
12
|
+
"www.telegram.dog"
|
|
13
|
+
];
|
|
14
|
+
const unwrapTelegramShare = (url) => {
|
|
15
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, pathRegex)) return;
|
|
16
|
+
return getParamTarget(url, "url");
|
|
17
|
+
};
|
|
18
|
+
export { unwrapTelegramShare };
|
|
@@ -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/theRegister.ts
|
|
4
|
-
const prefixRegex = /^\/(?:feed|i\/cfa)\/(?=(?:https?:\/\/)?www\.(?:theregister\.com|theregister\.co\.uk|reghardware\.co\.uk|channelregister\.co\.uk)\/)
|
|
4
|
+
const prefixRegex = /^\/(?:feed|i\/cfa)\/(?=(?:https?:\/\/)?www\.(?:theregister\.com|theregister\.co\.uk|reghardware\.co\.uk|channelregister\.co\.uk)\/)/i;
|
|
5
5
|
const unwrapTheRegister = (url) => {
|
|
6
6
|
if (!isHostOf(url, "go.theregister.com")) return;
|
|
7
7
|
return getPathTarget(url, prefixRegex);
|
|
@@ -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/threadsIntent.ts
|
|
5
|
+
const hosts = [
|
|
6
|
+
"www.threads.com",
|
|
7
|
+
"threads.com",
|
|
8
|
+
"www.threads.net",
|
|
9
|
+
"threads.net"
|
|
10
|
+
];
|
|
11
|
+
const pathRegex = /^\/intent\/post\/?$/i;
|
|
12
|
+
const unwrapThreadsIntent = (url) => {
|
|
13
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, pathRegex)) return;
|
|
14
|
+
return getParamTarget(url, "url");
|
|
15
|
+
};
|
|
16
|
+
export { unwrapThreadsIntent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/toucharcade.ts
|
|
3
|
-
const pathRegex = /^\/link\/(.+)
|
|
3
|
+
const pathRegex = /^\/link\/(.+)$/i;
|
|
4
4
|
const unwrapToucharcade = (url) => {
|
|
5
5
|
if (!isHostOf(url, "toucharcade.com")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
2
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
3
|
// src/unwraps/tracdelight.ts
|
|
3
|
-
const pathLinkRegex = /^\/cl\/aaid=.*?&link=(.+)
|
|
4
|
+
const pathLinkRegex = /^\/cl\/aaid=.*?&link=(.+)$/i;
|
|
4
5
|
const extractQueryLink = createParamExtractor({
|
|
5
6
|
hosts: "td.oo34.net",
|
|
6
7
|
path: "/cl/",
|
|
@@ -9,7 +10,7 @@ const extractQueryLink = createParamExtractor({
|
|
|
9
10
|
const unwrapTracdelight = (url) => {
|
|
10
11
|
const target = extractQueryLink(url);
|
|
11
12
|
if (target) return target;
|
|
12
|
-
if (url
|
|
13
|
+
if (!isHostOf(url, "td.oo34.net")) return;
|
|
13
14
|
const match = pathLinkRegex.exec(url.pathname);
|
|
14
15
|
if (!match?.[1]) return;
|
|
15
16
|
return `${match[1]}${url.search}${url.hash}`;
|
package/dist/unwraps/trxHub.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/trxHub.ts
|
|
3
|
-
const clickPathRegex = /^\/(?:xid|syid)\/[^/]
|
|
3
|
+
const clickPathRegex = /^\/(?:xid|syid)\/[^/]+$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: "clicks.trx-hub.com",
|
|
6
6
|
params: ["q"]
|
|
@@ -0,0 +1,13 @@
|
|
|
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/tumblrShare.ts
|
|
5
|
+
const hosts = ["www.tumblr.com", "tumblr.com"];
|
|
6
|
+
const linkPathRegex = /^\/share\/link\/?$/i;
|
|
7
|
+
const unwrapTumblrShare = (url) => {
|
|
8
|
+
if (!isHostOf(url, hosts)) return;
|
|
9
|
+
if (isAnyOf(url.pathname, "/share")) return getParamTarget(url, "u") ?? getParamTarget(url, "canonicalUrl");
|
|
10
|
+
if (linkPathRegex.test(url.pathname)) return getParamTarget(url, "url");
|
|
11
|
+
if (isAnyOf(url.pathname, "/widgets/share/tool")) return getParamTarget(url, "canonicalUrl") ?? getParamTarget(url, "url");
|
|
12
|
+
};
|
|
13
|
+
export { unwrapTumblrShare };
|
|
@@ -0,0 +1,17 @@
|
|
|
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/twitterIntent.ts
|
|
5
|
+
const pathRegex = /^\/(?:intent\/(?:tweet|post)|share)\/?$/i;
|
|
6
|
+
const hosts = [
|
|
7
|
+
"twitter.com",
|
|
8
|
+
"www.twitter.com",
|
|
9
|
+
"mobile.twitter.com",
|
|
10
|
+
"x.com",
|
|
11
|
+
"www.x.com"
|
|
12
|
+
];
|
|
13
|
+
const unwrapTwitterIntent = (url) => {
|
|
14
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, pathRegex)) return;
|
|
15
|
+
return getParamTarget(url, "url");
|
|
16
|
+
};
|
|
17
|
+
export { unwrapTwitterIntent };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
|
+
import { getQueryParam, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
2
3
|
import { getParamTarget } from "../utils.mjs";
|
|
3
4
|
// src/unwraps/twoCheckout.ts
|
|
4
5
|
const unwrapTwoCheckout = (url) => {
|
|
5
|
-
if (url.pathname
|
|
6
|
-
if (!url
|
|
6
|
+
if (!isAnyOf(url.pathname, "/affiliate.php")) return;
|
|
7
|
+
if (!getQueryParam(url, "ACCOUNT") || !getQueryParam(url, "AFFILIATE")) return;
|
|
7
8
|
const target = getParamTarget(url, "PATH");
|
|
8
9
|
if (!target || !isHttpUrl(target)) return;
|
|
9
10
|
return target;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/ukWebArchive.ts
|
|
3
|
-
const pathRegex = /^\/wayback\/(?:en\/)?archive\/\d{14}(?:mp_)?\/(.+)
|
|
3
|
+
const pathRegex = /^\/wayback\/(?:en\/)?archive\/\d{14}(?:mp_)?\/(.+)$/i;
|
|
4
4
|
const unwrapUkWebArchive = (url) => {
|
|
5
5
|
if (!isHostOf(url, "www.webarchive.org.uk")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
package/dist/unwraps/ukgwa.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/ukgwa.ts
|
|
3
|
-
const pathRegex = /^(?:\/ukgwa)?\/(?:\d{14}(?:mp_)?|\+)\/(.+)
|
|
3
|
+
const pathRegex = /^(?:\/ukgwa)?\/(?:\d{14}(?:mp_)?|\+)\/(.+)$/i;
|
|
4
4
|
const schemeRegex = /^[a-z][a-z\d+-]*:/i;
|
|
5
5
|
const unwrapUkgwa = (url) => {
|
|
6
6
|
if (!isHostOf(url, "webarchive.nationalarchives.gov.uk")) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/unescoWebArchive.ts
|
|
3
|
-
const pathRegex = /^\/web\/\d{14}\/(.+)
|
|
3
|
+
const pathRegex = /^\/web\/\d{14}\/(.+)$/i;
|
|
4
4
|
const unwrapUnescoWebArchive = (url) => {
|
|
5
5
|
if (!isHostOf(url, "webarchive.unesco.org")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -1,6 +1,6 @@
|
|
|
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 } from "../utils.mjs";
|
|
3
|
+
import { getParamTarget } from "../utils.mjs";
|
|
4
4
|
// src/unwraps/unisender.ts
|
|
5
5
|
const hosts = [
|
|
6
6
|
"emlblog.com",
|
|
@@ -20,13 +20,13 @@ const hosts = [
|
|
|
20
20
|
"usndr.com",
|
|
21
21
|
/^us\d+-usndr\.com$/
|
|
22
22
|
];
|
|
23
|
-
const pathRegex = /^\/(?:ru|ua)\/(?:mail|go2|eu1)_link_tracker
|
|
23
|
+
const pathRegex = /^\/(?:ru|ua)\/(?:mail|go2|eu1)_link_tracker$/i;
|
|
24
24
|
const unwrapUnisender = (url) => {
|
|
25
25
|
if (!isAnyOf(url.hostname, hosts) || !pathRegex.test(url.pathname)) return;
|
|
26
26
|
const value = getParamTarget(url, "url", -1);
|
|
27
27
|
if (!value) return;
|
|
28
28
|
if (isHttpUrl(value)) return value;
|
|
29
|
-
const decoded = decodeBase64Url(value.
|
|
29
|
+
const decoded = decodeBase64Url(value.replaceAll("~", "="));
|
|
30
30
|
if (decoded && isHttpUrl(decoded)) return decoded;
|
|
31
31
|
};
|
|
32
32
|
export { unwrapUnisender };
|
package/dist/unwraps/upAudio.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/upAudio.ts
|
|
4
|
-
const prefixRegex = /^\/s
|
|
4
|
+
const prefixRegex = /^\/s\//i;
|
|
5
5
|
const unwrapUpAudio = (url) => {
|
|
6
6
|
if (!isHostOf(url, "prefix.up.audio")) return;
|
|
7
7
|
return getPathTarget(url, prefixRegex);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/vadeSecure.ts
|
|
3
|
-
const safeproxyPathRegex = /^\/safeproxy\/v[34]
|
|
3
|
+
const safeproxyPathRegex = /^\/safeproxy\/v[34]$/i;
|
|
4
4
|
const extractAntiphishing = createParamExtractor({
|
|
5
5
|
hosts: "antiphishing.vadesecure.com",
|
|
6
6
|
path: "/v4",
|
|
@@ -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/valuePress.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
5
5
|
hosts: "www.value-press.com",
|
package/dist/unwraps/vanilla.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamTarget } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/vanilla.ts
|
|
4
|
-
const pathRegex = /^(?:\/[^/]+){0,2}\/home\/leaving
|
|
4
|
+
const pathRegex = /^(?:\/[^/]+){0,2}\/home\/leaving$/i;
|
|
5
5
|
const unwrapVanilla = (url) => {
|
|
6
6
|
if (!pathRegex.test(url.pathname)) return;
|
|
7
7
|
const target = getParamTarget(url, "target") ?? getParamTarget(url, "Target");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
import { getParamTarget } from "../utils.mjs";
|
|
3
3
|
// src/unwraps/vbulletin.ts
|
|
4
|
-
const pathRegex = /^(?:\/[^/]+)?\/redirect-to
|
|
4
|
+
const pathRegex = /^(?:\/[^/]+)?\/redirect-to\/$/i;
|
|
5
5
|
const unwrapVbulletin = (url) => {
|
|
6
6
|
if (!pathRegex.test(url.pathname)) return;
|
|
7
7
|
const target = getParamTarget(url, "redirect");
|
package/dist/unwraps/vefsafn.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/vefsafn.ts
|
|
3
|
-
const waybackPathRegex = /^\/wayback\/\d{14}\/(.+)
|
|
4
|
-
const currentPathRegex = /^\/is\/\d{14}(?:mp_)?\/(.+)
|
|
3
|
+
const waybackPathRegex = /^\/wayback\/\d{14}\/(.+)$/i;
|
|
4
|
+
const currentPathRegex = /^\/is\/\d{14}(?:mp_)?\/(.+)$/i;
|
|
5
5
|
const unwrapVefsafn = (url) => {
|
|
6
6
|
let match = null;
|
|
7
7
|
if (isHostOf(url, "wayback.vefsafn.is")) match = waybackPathRegex.exec(url.pathname);
|
package/dist/unwraps/vgWort.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/vgWort.ts
|
|
3
3
|
const hostRegex = /^(?:ssl-)?vg\d+\.met\.vgwort\.de$/;
|
|
4
|
-
const pathRegex = /^\/na\/[0-9a-f]
|
|
4
|
+
const pathRegex = /^\/na\/[0-9a-f]+$/i;
|
|
5
5
|
const extractTarget = createParamExtractor({
|
|
6
6
|
hosts: hostRegex,
|
|
7
7
|
params: ["l"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/vkShare.ts
|
|
3
|
+
const unwrapVkShare = createParamExtractor({
|
|
4
|
+
hosts: [
|
|
5
|
+
"vk.com",
|
|
6
|
+
"www.vk.com",
|
|
7
|
+
"new.vk.com",
|
|
8
|
+
"vk.ru",
|
|
9
|
+
"www.vk.ru",
|
|
10
|
+
"vkontakte.ru",
|
|
11
|
+
"www.vkontakte.ru"
|
|
12
|
+
],
|
|
13
|
+
path: "/share.php",
|
|
14
|
+
params: ["url"]
|
|
15
|
+
});
|
|
16
|
+
export { unwrapVkShare };
|
package/dist/unwraps/vocus.mjs
CHANGED
package/dist/unwraps/voxnest.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/voxnest.ts
|
|
4
|
-
const streamPrefixRegex = /^\/stream\/[^/]
|
|
4
|
+
const streamPrefixRegex = /^\/stream\/[^/]+\//i;
|
|
5
5
|
const unwrapVoxnest = (url) => {
|
|
6
6
|
if (!isHostOf(url, "audio.voxnest.com")) return;
|
|
7
7
|
return getPathTarget(url, streamPrefixRegex, "http:");
|
|
@@ -17,12 +17,12 @@ const replayHosts = [
|
|
|
17
17
|
"replay.waybackmachine.org"
|
|
18
18
|
];
|
|
19
19
|
const snapshot = String.raw`\d{14}(?:\*|(?:id|if|mp|fw|oe|im|js|cs)_)?`;
|
|
20
|
-
const pathRegex = new RegExp(`^/web/(?:${snapshot}/)?(.+)
|
|
21
|
-
const replayPathRegex = new RegExp(`^/${snapshot}/(.+)
|
|
22
|
-
const archiveItPathRegex = new RegExp(String.raw`^/(?:\d+|org-\d+|all)/${snapshot}/(.+)
|
|
23
|
-
const scholarPathRegex = /^\/work\/[a-z0-9]+\/access\/wayback\/(.+)
|
|
20
|
+
const pathRegex = new RegExp(`^/web/(?:${snapshot}/)?(.+)$`, "i");
|
|
21
|
+
const replayPathRegex = new RegExp(`^/${snapshot}/(.+)$`, "i");
|
|
22
|
+
const archiveItPathRegex = new RegExp(String.raw`^/(?:\d+|org-\d+|all)/${snapshot}/(.+)$`, "i");
|
|
23
|
+
const scholarPathRegex = /^\/work\/[a-z0-9]+\/access\/wayback\/(.+)$/i;
|
|
24
24
|
const schemeRegex = /^[a-z][a-z\d+-]*:/i;
|
|
25
|
-
const schemelessRegex = /^(?![^/]*\.(?:jsp|php|jpg)(?:\/|$))[^/]
|
|
25
|
+
const schemelessRegex = /^(?![^/]*\.(?:jsp|php|jpg)(?:\/|$))[^/]*\./i;
|
|
26
26
|
const unwrapWebArchive = (url) => {
|
|
27
27
|
let match = null;
|
|
28
28
|
if (isHostOf(url, hosts)) match = url.pathname.match(pathRegex);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createParamExtractor } from "../utils.mjs";
|
|
2
2
|
// src/unwraps/webcitation.ts
|
|
3
|
-
const pathRegex = /^\/(?:query|[0-9A-Za-z]{9})
|
|
3
|
+
const pathRegex = /^\/(?:query|[0-9A-Za-z]{9})$/i;
|
|
4
4
|
const extractTarget = createParamExtractor({
|
|
5
5
|
hosts: "www.webcitation.org",
|
|
6
6
|
params: ["url"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHostOf, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/webharvest.ts
|
|
3
|
-
const pathRegex = /^\/(?:peth\d{2}|congress\d+th)\/\d{14}\/(.+)
|
|
3
|
+
const pathRegex = /^\/(?:peth\d{2}|congress\d+th)\/\d{14}\/(.+)$/i;
|
|
4
4
|
const unwrapWebharvest = (url) => {
|
|
5
5
|
if (!isHostOf(url, "webharvest.gov")) return;
|
|
6
6
|
const match = pathRegex.exec(url.pathname);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/weiboShare.ts
|
|
3
|
+
const unwrapWeiboShare = createParamExtractor({
|
|
4
|
+
hosts: ["service.weibo.com", "v.t.sina.com.cn"],
|
|
5
|
+
path: "/share/share.php",
|
|
6
|
+
params: ["url"]
|
|
7
|
+
});
|
|
8
|
+
export { unwrapWeiboShare };
|
package/dist/unwraps/weserv.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { decodePercent, getQueryParamValues, isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
2
|
// src/unwraps/weserv.ts
|
|
3
|
-
const
|
|
3
|
+
const hosts = ["images.weserv.nl", "wsrv.nl"];
|
|
4
4
|
const unwrapWeserv = (url) => {
|
|
5
|
-
if (!isHostOf(url,
|
|
5
|
+
if (!isHostOf(url, hosts) || url.pathname !== "/") return;
|
|
6
6
|
const value = getQueryParamValues(url, "url", { decodeValues: false }).at(-1);
|
|
7
7
|
if (!value) return;
|
|
8
8
|
return decodePercent(value);
|
|
@@ -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/wikizero.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
5
5
|
hosts: [
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
3
|
+
// src/unwraps/windowsLive.ts
|
|
4
|
+
const extractAdd = createParamExtractor({
|
|
5
|
+
hosts: ["live.com", "www.live.com"],
|
|
6
|
+
path: "/",
|
|
7
|
+
params: ["add"]
|
|
8
|
+
});
|
|
9
|
+
const unwrapWindowsLive = (url) => {
|
|
10
|
+
const target = extractAdd(url);
|
|
11
|
+
if (target && isHttpUrl(target)) return target;
|
|
12
|
+
};
|
|
13
|
+
export { unwrapWindowsLive };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createParamExtractor } from "../utils.mjs";
|
|
2
|
+
// src/unwraps/windowsLiveFavorites.ts
|
|
3
|
+
const unwrapWindowsLiveFavorites = createParamExtractor({
|
|
4
|
+
hosts: "favorites.live.com",
|
|
5
|
+
path: "/quickadd.aspx",
|
|
6
|
+
params: ["url"]
|
|
7
|
+
});
|
|
8
|
+
export { unwrapWindowsLiveFavorites };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { isHostOf } from "../node_modules/trousse/dist/urls.mjs";
|
|
1
2
|
import { getParamTarget } from "../utils.mjs";
|
|
2
3
|
// src/unwraps/worldNomads.ts
|
|
3
4
|
const affiliatePaths = ["/Turnstile/AffiliateLink", "/af.aspx"];
|
|
4
5
|
const unwrapWorldNomads = (url) => {
|
|
5
|
-
if (url
|
|
6
|
+
if (!isHostOf(url, "www.worldnomads.com") || !affiliatePaths.includes(url.pathname)) return;
|
|
6
7
|
return getParamTarget(url, "path", -1);
|
|
7
8
|
};
|
|
8
9
|
export { unwrapWorldNomads };
|
|
@@ -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/wpPoczta.ts
|
|
4
4
|
const baseExtractor = createParamExtractor({
|
|
5
5
|
hosts: "zasobygwp.pl",
|
|
@@ -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/wykop.ts
|
|
5
|
+
const hosts = ["www.wykop.pl", "wykop.pl"];
|
|
6
|
+
const pathRegex = /^\/(?:remotelink|dodaj(?:\/link|-link)?)\/?$/i;
|
|
7
|
+
const unwrapWykop = (url) => {
|
|
8
|
+
if (!isHostOf(url, hosts) || !isAnyOf(url.pathname, pathRegex)) return;
|
|
9
|
+
return getParamTarget(url, "url");
|
|
10
|
+
};
|
|
11
|
+
export { unwrapWykop };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { decodeBase64, isHttpUrl } from "../node_modules/trousse/dist/urls.mjs";
|
|
2
|
+
import { isAnyOf } from "../node_modules/trousse/dist/matching.mjs";
|
|
3
|
+
import { getParamValues } from "../utils.mjs";
|
|
3
4
|
// src/unwraps/xengentr.ts
|
|
4
5
|
const unwrapXengentr = (url) => {
|
|
5
|
-
if (url.pathname
|
|
6
|
+
if (!isAnyOf(url.pathname, "/yonlendirme")) return;
|
|
6
7
|
const raw = getParamValues(url, "to").at(0);
|
|
7
8
|
if (!raw) return;
|
|
8
9
|
const decoded = decodeBase64(raw);
|