Участник:X0stark69/ВО.js

Материал из Википедии — свободной энциклопедии
//фиксация протоколов и доменов для ПРО:ВО
r(/http\:\/\/([^\/ \]\n\|\}]+)/g, function ( line, domain ) {//устаревшие http
	var TLD = domain.match(/(\.[^\.]+?$)/g);

	if (domain.indexOf('www.') > -1) {
		if (TLD == '.ru') {
			line = line.replace(/http\:\/\/www\.(1sn|813|abyalil|admin-smolensk|ador|alppp|altzapovednik|aqualogo|archaeolog|aroundspb|arsvest|artmuseum|arzamas-city|astrocentr|atomic-energy|baikalfund|baku|bankfax|bashinform|beriki|bfm|bibliokashary|bilchao|biosoil|blagorussia|bogorodsk-noginsk|booksite|calend|centerrus|chastnik|citywalls|domex|dpr|e-river|eastrussia|enlight|eprussia|famous-scientists|fgurgia|finam|fishing-v|fontanka|garant|gastroscan|gazeta|interfax-russia|interfax|irk|izvestiaur|justmedia|kerch\.com|kommersant|kondopoga|kp40|krestianin|krugosvet|kunstkamera|kurortmag|lawmix|lib\.tpu|libozersk|m-obvu|m24|marshruty|mineral|mk|moe-online|monographies|mos|moytambov|murman|nakanune|natural-sciences|neizvestniy-geniy|newkaliningrad|news29|newsvl|nftn|ng|ngpedia|nikatv|nmosktoday|novafish|novgorod|novsu|nsktv|ntv|oblgazeta|ohotniki|orient-travel|ozersk74|ozon|portal-slovo|pravda|pravenc|prima-tv|prirodasibiri|promved|rae|rfgf|riadagestan|rosbalt|roslavl|rosnedra\.gov|rospisatel|rostov-gorod|rscf|ruffnews|runivers|ruslang|rybak-rybaka|sakhrybvod|science-education|scienceforum|sedmitza|shahty|sibran|skitalets|sobaka|sodis|sovsport|srpska|ssc-ras|stfond|stroypuls|synologia|szrf|tambov\.gov|tatar-inform|tenderguru|tgc1|theartnewspaper|tomskneft|travel|troitsk74|trud|tssr|tsu|turistka|tv21|ugorizont|uralsro|ustyany|velorostov|veneva|vest-news|vesti|vipgeo|voda-volzhanka|vokrugsveta|voopiik-don|vsp|yar-archives|yuga|yugopolis|zrpress)\.ru/g, 'https://www.$1.ru');
		} else if (TLD == '.com') {
			line = line.replace(/http\:\/\/www\.(nature|english-lakes|ontarioplaques|naturagraeca|captaincooksociety|fergananews|antaranews|hookandbullet|canmaps|onkaparingacity|lakelubbers|hawaiiwatershedatlas|imdb|india9|irishtimes|mehrnews|mdpi|lulu|lonelyplanet|vtourisme|straitstimes|sfgate|scotsman|tandfonline|world-of-waterfalls|gomadrid|vanguardia|visitnapavalley|watertonbiosphere|catchnews|geolink-group|volynnews|indianjungles|indonesia-tourism|infoplease|boston|tribunnews|travelponce|japan-guide|upi|uniqhotels|huffingtonpost|hurriyetdailynews|iexplore|dreamlandresort|ecoangler|economist|elespectador|elsnorkel|yosemitehikes|dawn|zambiatourism|cosmovisions|zooeco|discovertasmania|djazairess|zemlya-chita|weekendnotes|wordaz|who2|firstvoices|jim-shead|explore-inverness|ens-newswire|energycentral|wral)\.com/g, 'https://www.$1.com');
			line = line.replace(/http\:\/\/www\.(europeanwaterfalls|worldwaterfalldatabase|esri|worldrowing|trailspotting|kojaro|search|sea-seek|offshore-ocs|scientificwebjournals|sciencepublishinggroup|orexca|science-frontiers|netstate|silkadv|newsru|newyorker|shukach|showcaves|outdoorsdirectory|sa-venues|railwaygazette|raremaps|regmurcia|reuters|petitfute|planetmountain|sankei|poteau-ok|primerahora|lauwersmeer|lesoirdalgerie|thefishinguide|lighthousefriends|tasfish|tamilnet|thehikinglife|tourismcambodia|thehindu|thequinnipiacriver|lacsdespyrenees|mobileriverbridge|solomontimes|naturalhistorymag|marinevesseltraffic|surf-forecast|masterblanker|mayaguez2010|mayanwhitewater|stonewallresort|merdeka|austhrutime|andalucia|arcgis|argenberg|asahi|atlasobscura|azerbaijans|azobuild|bangkokpost|bbc|best-of-oahu|amusingplanet|albertawow|afar)\.com/g, 'https://www.$1.com');
		} else if (TLD == '.org') {
			line = line.replace(/http\:\/\/www\.(afdb|akdn|alexanderyakovlev|alr-journal|americanjourneys|archaeology|bulgariatravel|centralparknyc|ctriver|dadvail|dbnl|druglibrary|eenorthcarolina|eib|elbruz|feow|fortross|foundsf|geographic|gezitter|globalsecurity|greenpeace|gutenberg|igkb|internationalrivers|iucnredlist|lakegeorgeassociation|lonepinefilmhistorymuseum|nwcouncil|oecd|oen-iad|pnas|radzima|raritanboro|russhanson|sandyriver|sciencemag|serafimovich|srodawlkp|un|unece|wdl|wilsoncenter|worldwildlife)\.org/g, 'https://www.$1.org');
		} else if (TLD == '.de') {
			line = line.replace(/http\:\/\/www\.(ad-hoc-news|ak-kurier|anstageslicht|bafg|bezreg-muenster\.nrw|bkge|blaues-band|chemnitz|fgg-elbe|ganz-muenchen|geodaten\.bayern|hellwegeranzeiger|hl-cruises|hnd\.bayern|hopla-main|kreis-viersen|lanuv\.nrw|lb-oldenburg|lfu\.bayern|lvz|markt-oberstdorf|moeckern-flaeming|nabu-waldeck-frankenberg|netzangler|op-marburg|orientarch\.uni-halle|retrobibliothek|ruhrnachrichten|ruhrverband|schloesser\.bayern|siegener-zeitung|spiegel|stadtentwicklung\.berlin|stalu-mv|tim-online\.nrw|umweltbundesamt|umweltkarten-niedersachsen|urlaubsangler|vsvi-mv|wwa-ke\.bayern)\.de/g, 'https://www.$1.de');
		} else if (TLD == '.au') {
			line = line.replace(/http\:\/\/www\.(abc\.net|abs\.gov|alpa\.asn|brisbanetimes\.com|canberratimes\.com|environment\.sa\.gov|gbrmpa\.gov|hansard\.act\.gov|hreoc\.gov|hydro\.com|mrt\.tas\.gov|museum\.wa\.gov|nationalparks\.nsw\.gov|parks\.tas\.gov|parks\.vic\.gov|parliament\.tas\.gov|smh\.com|tasmaniacampers\.com|weeds\.org|wettropics\.gov)\.au/g, 'https://www.$1.au');
		} else if (TLD == '.gov') {
			line = line.replace(/http\:\/\/www\.(blm|canals\.ny|cpc\.ncep\.noaa|dec\.ny|dnr\.sc|eia|loc|maine|mass|michigan|ncgc\.nrcs\.usda|nps|oregon|recreation|rivers)\.gov/g, 'https://www.$1.gov');
		} else if (TLD == '.ca') {
			line = line.replace(/http\:\/\/www\.(algonquinpark\.on|cbc|dfo-mpo\.gc|ec\.gc|env\.gov\.bc|gisapplication\.lrc\.gov\.on|hc-sc\.gc|huffingtonpost|mddep\.gouv\.qc|pc\.gc|qtcommission|toronto|town\.lakecowichan\.bc|yukonhiking)\.ca/g, 'https://www.$1.ca');
		} else if (TLD == '.uk') {
			line = line.replace(/http\:\/\/www\.(4ni\.co|bbc\.co|bgs\.ac|dailymail\.co|dailypost\.co|dailyrecord\.co|english-heritage\.org|express\.co|geo\.ed\.ac|inverness\.uhi\.ac|leeds\.ac|legendarydartmoor\.co|telegraph\.co)\.uk/g, 'https://www.$1.uk');
		} else if (TLD == '.net') {
			line = line.replace(/http\:\/\/www\.(adv-geosci|bgglobe|burgen-und-schloesser|embalses|fish-hawk|gramota|hydrol-earth-syst-sci|philarmitage|schekino|the-cryosphere|water-technology)\.net/g, 'https://www.$1.net');
		} else if (TLD == '.edu') {
			line = line.replace(/http\:\/\/www\.(academia|compositerunoff\.sr\.unh|kspu|lib\.unc|lib\.utexas|life\.illinois|maps\.unc|r-arcticnet\.sr\.unh|sjsu|uaf|umt)\.edu/g, 'https://www.$1.edu');
		} else if (TLD == '.fr') {
			line = line.replace(/http\:\/\/www\.(agri53|fresnes94|haute-saone\.gouv|larousse|lemonde|rfi|siabave|sudouest)\.fr/g, 'https://www.$1.fr');
		} else if (TLD == '.lv') {
			line = line.replace(/http\:\/\/www\.(citariga|daba\.gov|dziedava|ezeri|grani|lu|satv\.tiesa\.gov)\.lv/g, 'https://www.$1.lv');
		} else if (TLD == '.fi') {
			line = line.replace(/http\:\/\/www\.(geofysiikanseura|helsinki|jarviwiki|karjalankartat|liikennevirasto|luontoon|ymparisto)\.fi/g, 'https://www.$1.fi');
		} else if (TLD == '.nz') {
			line = line.replace(/http\:\/\/www\.(aucklandcouncil\.govt|doc\.govt|geonet\.org|nzherald\.co|odt\.co|teara\.govt|tkm\.govt)\.nz/g, 'https://www.$1.nz');
		} else if (TLD == '.info') {
			line = line.replace(/http\:\/\/www\.(c-inform|mosenergo|nepjol|scottish-places|touringtasmania|vostlit)\.info/g, 'https://www.$1.info');
		} else if (TLD == '.es') {
			line = line.replace(/http\:\/\/www\.(chduero|chguadalquivir|chminosil|diariodejerez|elmundo|franciscojurado)\.es/g, 'https://www.$1.es');
		} else if (TLD == '.ee') {
			line = line.replace(/http\:\/\/www\.(folklore|kalapeedia|kirj|loodusajakiri|ra|sillamae)\.ee/g, 'https://www.$1.ee');
		} else if (TLD == '.ua') {
			line = line.replace(/http\:\/\/www\.(eurointegration\.com|gorod\.cn|telegraf\.in|umj\.com|vashsad|zoology\.dp)\.ua/g, 'https://www.$1.ua');
		} else if (TLD == '.kz') {
			line = line.replace(/http\:\/\/www\.(diapazon|inform|ng|np|nur|zakon)\.kz/g, 'https://www.$1.kz');
		} else if (TLD == '.jp') {
			line = line.replace(/http\:\/\/www\.(kamikawa\.pref\.hokkaido\.lg|ktr\.mlit\.go|mlit\.go|pref\.hokkaido\.lg|yamanashi-kankou|zakzak\.co)\.jp/g, 'https://www.$1.jp');
		} else if (TLD == '.gr') {
			line = line.replace(/http\:\/\/www\.(farsala|giannitsa|kathimerini|nhmc\.uoc|statistics|tovima)\.gr/g, 'https://www.$1.gr');
		} else if (TLD == '.ch') {
			line = line.replace(/http\:\/\/www\.(bafu\.admin|gebrueder-duerst|peter-hug|swisseduc|swissinfo|vier-quellen-weg)\.ch/g, 'https://www.$1.ch');
		} else if (TLD == '.no') {
			line = line.replace(/http\:\/\/www\.(dagsavisen|nrk|orkanger-aktivum|sognefjord|ssb)\.no/g, 'https://www.$1.no');
		} else if (TLD == '.cz') {
			line = line.replace(/http\:\/\/www\.(agriculturejournals|ceskatelevize|priroda|region-vysocina|zacler)\.cz/g, 'https://www.$1.cz');
		} else if (TLD == '.se') {
			line = line.replace(/http\:\/\/www\.(bebyggelseregistret\.raa|ccb|nissansportfiske|umea)\.se/g, 'https://www.$1.se');
		} else if (TLD == '.by') {
			line = line.replace(/http\:\/\/www\.(energo|minenergo\.gov|minpriroda\.gov|tio)\.by/g, 'https://www.$1.by');
		} else if (TLD == '.za') {
			line = line.replace(/http\:\/\/www\.(farmersweekly\.co|places\.co|sahra\.org|saiab\.ac)\.za/g, 'https://www.$1.za');
		} else if (TLD == '.it') {
			line = line.replace(/http\:\/\/www\.(esedrasardegna|mondocrea|regione\.sicilia|treccani)\.it/g, 'https://www.$1.it');
		} else if (TLD == '.rs') {
			line = line.replace(/http\:\/\/www\.(novosti|politika|rts)\.rs/g, 'https://www.$1.rs');
		} else if (TLD == '.il') {
			line = line.replace(/http\:\/\/www\.(sviva\.gov|teva\.org|water\.gov)\.il/g, 'https://www.$1.il');
		} else if (TLD == '.pt') {
			line = line.replace(/http\:\/\/www\.(cm-nazare|jf-aljubarrota)\.pt/g, 'https://www.$1.pt');
		} else if (TLD == '.lt') {
			line = line.replace(/http\:\/\/www\.(diena|kedainiutvic)\.lt/g, 'https://www.$1.lt');
		} else if (TLD == '.eu') {
			line = line.replace(/http\:\/\/www\.(europeanstraits|narova)\.eu/g, 'https://www.$1.eu');
		} else if (TLD == '.us') {
			line = line.replace(/http\:\/\/www\.(dep\.state\.pa|fs\.fed)\.us/g, 'https://www.$1.us');
		} else if (TLD == '.pl') {
			line = line.replace(/http\:\/\/www\.(ags\.wnoz\.us\.edu|gispartner)\.pl/g, 'https://www.$1.pl');
		} else if (TLD == '.ir') {
			line = line.replace(/http\:\/\/www\.(damavand|isna)\.ir/g, 'https://www.$1.ir');
		} else if (TLD == '.ar') {
			line = line.replace(/http\:\/\/www\.(ina\.gob|lanacion\.com)\.ar/g, 'https://www.$1.ar');
		} else if (TLD == '.nl') {
			line = line.replace(/http\:\/\/www\.(netherlandsnavy|rijkswaterstaat)\.nl/g, 'https://www.$1.nl');
		} else if (TLD == '.br') {
			line = line.replace(/http\:\/\/www\.(ferias\.tur|scielo)\.br/g, 'https://www.$1.br');
		} else if (TLD == '.biz') {
			line = line.replace(/http\:\/\/www\.(afanasy|tilachar)\.biz/g, 'https://www.$1.biz');
		} else if (TLD == '.ie') {
			line = line.replace(/http\:\/\/www\.(independent|ucc)\.ie/g, 'https://www.$1.ie');
		} else if (TLD == '.at') {
			line = line.replace(/http\:\/\/www\.(tirol\.gv|wasseraktiv)\.at/g, 'https://www.$1.at');
		} else if (TLD == '.su') {
			line = line.replace(/http\:\/\/www\.(shakhty|znanie-sila)\.su/g, 'https://www.$1.su');
		} else if (TLD == '.cm') {
			line = line.replace(/http\:\/\/www\.(cameroon-tribune)\.cm/g, 'https://www.$1.cm');
		} else if (TLD == '.bg') {
			line = line.replace(/http\:\/\/www\.(economic)\.bg/g, 'https://www.$1.bg');
		} else if (TLD == '.cat') {
			line = line.replace(/http\:\/\/www\.(enciclopedia)\.cat/g, 'https://www.$1.cat');
		} else if (TLD == '.hr') {
			line = line.replace(/http\:\/\/www\.(enciklopedija)\.hr/g, 'https://www.$1.hr');
		} else if (TLD == '.int') {
			line = line.replace(/http\:\/\/www\.(esa)\.int/g, 'https://www.$1.int');
		} else if (TLD == '.uz') {
			line = line.replace(/http\:\/\/www\.(gazeta)\.uz/g, 'https://www.$1.uz');
		} else if (TLD == '.tt') {
			line = line.replace(/http\:\/\/www\.(guardian\.co)\.tt/g, 'https://www.$1.tt');
		} else if (TLD == '.sk') {
			line = line.replace(/http\:\/\/www\.(juls\.savba)\.sk/g, 'https://www.$1.sk');
		} else if (TLD == '.istanbul') {
			line = line.replace(/http\:\/\/www\.(kagithane)\.istanbul/g, 'https://www.$1.istanbul');
		} else if (TLD == '.md') {
			line = line.replace(/http\:\/\/www\.(legis)\.md/g, 'https://www.$1.md');
		} else if (TLD == '.mx') {
			line = line.replace(/http\:\/\/www\.(mexicodesconocido\.com)\.mx/g, 'https://www.$1.mx');
		} else if (TLD == '.kg') {
			line = line.replace(/http\:\/\/www\.(msn)\.kg/g, 'https://www.$1.kg');
		} else if (TLD == '.is') {
			line = line.replace(/http\:\/\/www\.(ruv)\.is/g, 'https://www.$1.is');
		} else if (TLD == '.cr') {
			line = line.replace(/http\:\/\/www\.(scielo\.sa)\.cr/g, 'https://www.$1.cr');
		} else if (TLD == '.in') {
			line = line.replace(/http\:\/\/www\.(sikkimtourism\.gov)\.in/g, 'https://www.$1.in');
		} else if (TLD == '.si') {
			line = line.replace(/http\:\/\/www\.(stat)\.si/g, 'https://www.$1.si');
		} else if (TLD == '.id') {
			line = line.replace(/http\:\/\/www\.(tni\.mil)\.id/g, 'https://www.$1.id');
		} else if (TLD == '.xn--p1ai') {
			line = line.replace(/http\:\/\/www\.(xn--m1afn)\.xn--p1ai/g, 'https://www.$1.xn--p1ai');
		}
	}
		else
	{
		if (TLD == '.ru') {
			line = line.replace(/http\:\/\/(docs\.cntd|water-rf|toponym\.antat|region\.tverlib|nature\.baikal|podzemreki|elar\.urfu|lenta|rg|ogv\.karelia|ukam-gazeta|rutraveller|primpogoda|sun\.tsu|ria|tass|rgis\.spb|poxod|cyberleninka|krymea|pravdasevera|portnews|chelindustry|izhlife|websprav\.admin-smolensk|nedradv|ibiw|valentin-nuzhdenko|aif|archaeology\.nsc|ufagen|kunstkamera|vsevolozk|img-fotki\.yandex|green\.tsu|news\.vtomske|nvo\.ng|webmineral|sobory|bvf|vital\.lib\.tsu|admin-smolensk|base\.garant|vatandash|vao\.mos|mosjour|mediaryazan|minpriroda\.cap|msh\.rk\.gov|nat-geo|karelinform|kgiop\.gov\.spb|kuzrab|mapsoid|200hramov|vechorka|terijoki\.spb|starye-karty\.litera-ru|skitalets|rostov\.aif|rus-shipping|priroda\.pskov|newtimes|nsportal|ulrgo|primamedia|permneft-portal|peterhof|pomorie|pravdapfo|tikhvin\.spb|bibirevo-svao|baltfriends|gazeta\.spb|gazetazp|arhpress|gkvod\.rk\.gov|glazovskaya-zbc\.3dn|ankerch-crimea|altapress|expoclub|elementy|e-lib\.gasu|camp-altai|yutu\.customs\.gov|yaruuna|zebra-tv|zakonbase|iosif-vm|housecomputer|ib\.komisc|indonet|info\.tatcenter|inosmi|gukn\.mosreg|irkobl|izvestiaur|justmedia|k12\.ucoz|gudok|kaliningradfirst|fototerra|gazeta-bibirevo|gazeta-brateevo|gazeta-na-varshavke-chertanovo-severnoe|gazeta-na-varshavke-chertanovocentr|gazeta-novosti-zyablikovo|gazeta-tsaricinsky-vestnik|gbusc44\.mos|gcheb\.cap|gdekluet|geo\.asu\.edu|groh|gorodperm|gorodn|goroder|gnkk|lipetskmedia|lipetsknews|logyhova\.ucoz|map\.admin\.tomsk|mayaksbor|meco\.rk\.gov|megaribolov|miass|mk\.tula|moluch|kam-kray|kamchatka\.aif|kandid|kartravel|kazanreporter|kerch\.com|kirovkosmo\.ucoz|kladr-rf|kpfu|les\.admin-smolensk|kuzbassfm|kprf|kurort\.yuga|krymgosarchiv|kronoki|krestyane34|kr74-online|fotomiy|fotki\.yandex|atv\.ucoz)\.ru/g, 'https://$1.ru');
			line = line.replace(/http\:\/\/(baikal-tourist|baimvestnik\.ucoz|bashinform|belogorsk-leshoz|big-rostov|askimam|bsizgan\.ulregion|burouu|catalogmineralov|chebnovosti|asiarussia|27r|30\.rpn\.gov|360tv|82\.rpn\.gov|adm-belousovo|adm\.rkursk|admsysert|allinformcrimea\.ucoz|archive\.kaspyinfo|ansya|english\.pravda|echo\.msk|eco\.tatarstan|ecology\.gpntb|elib\.gasu|elibrary\.unatlib|feotoday|fmbafmbc|fishspace|fishnews|fisher\.spb|fest\.krutushka|fcp\.economy\.gov|expert|earth-chronicles|classes|crimea-map\.msk|cryptoplanet|culture\.pskov|dvkapital|doks\.adm-nao|drugoigorod|drevo-info|dorinfo|donovedenie|delvaneo|dlib\.rsl|destinations|moslenta|muob|visitkolyma|urochishe|v102|v4\.udsu|vestikavkaza|vestirama|vinogradgid|uraloved|vlad\.aif|vladnews|vm|vmelitopole|voloknews|w-o-s|urban3p|tarif\.gov-murman|tatarstan|textarchive|tonkosti|touragent70|tverzem|uletay7\.ucoz|ufa1|turizm\.ngs|turfront|tuomi\.ucoz|tula\.aif|survincity|24rus|wiki-linki|wiki\.web|womanadvice|svyar|murmanout|permgenplan|oilcapital|online812|ossetia-gov|otdih\.nakubani|pandia|park72|pechory\.reg60|perm\.aif|perovo\.mos|portal-kultura|posibiri|pravdaurfo|pravitelstvo\.kbr|pravoslavnoe-duhovenstvo|prohotel|proon\.rpn\.gov|ogugauo|naenisee|nashaucheba|nataturka|nekrasovka\.mos|new\.runivers|new\.xurzarin|news\.babr|nsk\.sibnovosti|nkvd\.tomsk|nsk\.aif|nord-news|nnews\.nnov|nmusino\.ucoz|nkvd\.memo|news\.ykt|shlychkov|rv6bc\.ucoz|sanatorii-rush|science\.snauka|severomorsk\.murman|severpost|shkolazhizni|shpakovka|smr-school100|statehistory|stapravda|spb\.aif|songspro|russian-church|rekachusovaya|racechrono|radon|raenza|rah|realty\.interfax|redbookrf|region\.murman|region03|regnum|rscf|rostov-na-donu\.tendermedia|riac34|zuzino\.mos)\.ru/g, 'https://$1.ru');
		} else if (TLD == '.com') {
			line = line.replace(/http\:\/\/(3planeta|africanlanguages|albertawater|alonestalker\.livejournal|ancientneareast\.tripod|ant-ufa|archive\.aramcoworld|avesta\.tripod|bushwalk|cancunmio|canterburyphotography\.blogspot|centralasia-adventures|cheloveknauka|crimeanblog\.blogspot|crookedlakereview|eastcoasthiker|eau\.sagepub|edition\.cnn|elpais|fortuneofafrica|foto-planeta|geographyofrussia|go2kashmir|hero\.izmail-city|irina-from-kiev\.livejournal|jalita|jeff560\.tripod|k-window|kalteng\.tribunnews|konservasidasciliwung\.wordpress|kuluarpohod|kuznetsov-ru\.livejournal|latimesblogs\.latimes|lg-region|lhsliberia|libbabr|link\.springer|lipsus\.kompas|lug-info|ma\.usharbors|mapsnmaps\.blogspot|members\.tripod|mentalfloss|moya-moskva\.livejournal|n\.ziyouz|naukarus|nedov\.livejournal|new-sebastopol|news\.blogs\.cnn|news\.detik|news\.liputan6|ochakovo\.livejournal|okulovka|onlinelibrary\.wiley|opstinaugljevik\.tripod|outdoorsdirectory|palm\.newsru|pih-pih\.livejournal|puzhakal0\.tripod|rainchasers|regional\.kompas|rezeknenka\.livejournal|ru\.keeptravel|ru\.krymr|safari-ukraina|saiga20k\.livejournal|schwaebischealbnatur\.blogspot|sergey-mironov\.livejournal|sgzt|shurigin\.livejournal|silkadv|ski-fanatic\.livejournal|slidegur|slovar-vocab|supreme\.justia|syzran\.ucoz|tasmania|tastracks\.webs|terra-z|travel\.sakh|traveloregon|ufa-gid|unistroyproject|v-georgia|vkalmykii|vladivostok\.livejournal|vodnyjmir\.wordpress|webmandry|worldmaritimenews|zeenews\.india)\.com/g, 'https://$1.com');
		} else if (TLD == '.org') {
			line = line.replace(/http\:\/\/(aem\.asm|alimov\.pvost|anadyr|appvoices|archive|ascelibrary|assets\.panda|bioone|bn\.banglapedia|buxara|caves|ciesm|commons\.wikimedia|de\.wikisource|documents\.worldbank|dx\.doi|education\.savingthebay|en\.banglapedia|esys|friendsofwhiteriver|geosfera|ieeexplore\.ieee|iranicaonline|journals\.cambridge|mcnyblog|news\.sciencemag|pubs\.iied|rsta\.royalsocietypublishing|ru\.climate-data|ru\.convdocs|trnerr|upload\.wikimedia|vietnamembassy-usa|visitidaho|web-japan|woodape)\.org/g, 'https://$1.org');
		} else if (TLD == '.ua') {
			line = line.replace(/http\:\/\/(analitika\.at|animalworld\.com|bobradm\.cg\.gov|chtyvo\.org|crimea\.vgorode|day\.kyiv|elibrary\.kubg\.edu|essuir\.sumdu\.edu|esu\.com|genichesk\.com|glukhivlibrary\.at|infodon\.org|istoriofil\.org|kerch\.com|kiev\.pravda\.com|lifecity\.com|market\.yandex|narodna\.pravda\.com|nash-kirim\.at|primetour|river\.land\.kiev|visnyk\.lutsk|visti\.ks|who-is-who|xaec\.org|zakon\.rada\.gov)\.ua/g, 'https://$1.ua');
		} else if (TLD == '.gov') {
			line = line.replace(/http\:\/\/(ca\.water\.usgs|charts\.noaa|dggs\.alaska|dlnr\.hawaii|earthobservatory\.nasa|frwebgate\.access\.gpo|iaspub\.epa|library\.alaska|neo\.sci\.gsfc\.nasa|nhd\.usgs|nwis\.waterdata\.usgs|permanent\.access\.gpo|pr\.water\.usgs|pubs\.usgs|sanctuaries\.noaa|tn\.water\.usgs|vulcan\.wr\.usgs|water\.usgs|water\.weather|waterdata\.usgs|wdr\.water\.usgs)\.gov/g, 'https://$1.gov');
		} else if (TLD == '.by') {
			line = line.replace(/http\:\/\/(beldumka\.belta|beloe-ozero\.beltur|beltur|citadel\.bstu|csl\.bas-net|elib\.bsu|gorodok\.vitebsk-region\.gov|interfax|news\.21|orda\.of|pogoda|regiony|rgazeta|vitebsk-region\.gov)\.by/g, 'https://$1.by');
		} else if (TLD == '.kz') {
			line = line.replace(/http\:\/\/(adilet\.zan|almatymadeniet|anatili\.kazgazeta|art-depo|atau|blog\.autoatlas|damir|forbes|ihe|mk-kz|news\.nur|someplace|sports)\.kz/g, 'https://$1.kz');
		} else if (TLD == '.info') {
			line = line.replace(/http\:\/\/(anapa|az\.geoview|ba\.geoview|by\.geoview|city-pages|gb\.geoview|govp|iahs|koleco|odintsovo|rostender|ru-ecology|tt\.geoview)\.info/g, 'https://$1.info');
		} else if (TLD == '.edu') {
			line = line.replace(/http\:\/\/(astro\.cornell|geoinfo\.nmt|maps\.lib\.utexas|museum\.unc|nmgs\.nmt|penelope\.uchicago|quod\.lib\.umich|seagrant\.gso\.uri|sites\.nicholas\.duke|ufpr\.academia|volcano\.oregonstate|volcano\.si)\.edu/g, 'https://$1.edu');
		} else if (TLD == '.ca') {
			line = line.replace(/http\:\/\/(albertaparks|apps\.gov\.bc|journals\.sfu|laws-lois\.justice\.gc|publications\.gc|riversdaly|toponymie\.gouv\.qc|tvanouvelles|web\.unbc)\.ca/g, 'https://$1.ca');
		} else if (TLD == '.net') {
			line = line.replace(/http\:\/\/(angara|copy\.yandex|earthpapers|iwlearn|lg-news|news\.allcrimea|russiancyprus|tourlib|zonakz)\.net/g, 'https://$1.net');
		} else if (TLD == '.de') {
			line = line.replace(/http\:\/\/(denkxweb\.denkmalpflege-hessen|epic\.awi|geoportal\.bayern|kanu-bayern|leinbachtal|rips-dienste\.lubw\.baden-wuerttemberg|tu-dresden|udo\.lubw\.baden-wuerttemberg|wrrl\.hessen)\.de/g, 'https://$1.de');
		} else if (TLD == '.au') {
			line = line.replace(/http\:\/\/(adb\.anu\.edu|dpipwe\.tas\.gov|epa\.tas\.gov|lcsc\.org|maps\.sa\.gov)\.au/g, 'https://$1.au');
		} else if (TLD == '.lv') {
			line = line.replace(/http\:\/\/(gorod|jauns|kartes\.lgia\.gov|likumi|visitaluksne)\.lv/g, 'https://$1.lv');
		} else if (TLD == '.nz') {
			line = line.replace(/http\:\/\/(maoridictionary\.co|paperspast\.natlib\.govt|royalsociety\.org|teara\.govt|tvnz\.co)\.nz/g, 'https://$1.nz');
		} else if (TLD == '.pl') {
			line = line.replace(/http\:\/\/(literat\.ug\.edu|mapy\.geoportal\.gov|turystyka\.bystrzycaklodzka|wkw\.wloclawek\.pttk|z-ne)\.pl/g, 'https://$1.pl');
		} else if (TLD == '.su') {
			line = line.replace(/http\:\/\/(ecoportal|sibirica|skr|vkrym|zabroska)\.su/g, 'https://$1.su');
		} else if (TLD == '.eu') {
			line = line.replace(/http\:\/\/(balticmaps|ec\.europa|lake-cerne-jezero\.czech-mountains|natura2000\.eea\.europa)\.eu/g, 'https://$1.eu');
		} else if (TLD == '.uk') {
			line = line.replace(/http\:\/\/(etheses\.bham\.ac|nrfa\.ceh\.ac|theses\.gla\.ac|welsh-dictionary\.ac)\.uk/g, 'https://$1.uk');
		} else if (TLD == '.br') {
			line = line.replace(/http\:\/\/(arquivos\.ana\.gov|idesisema\.meioambiente\.mg\.gov|periodicoscientificos\.ufmt|ultimosegundo\.ig\.com)\.br/g, 'https://$1.br');
		} else if (TLD == '.ee') {
			line = line.replace(/http\:\/\/(geoportaal\.maaamet|journalist\.delfi|loodusegakoos|register\.muinas)\.ee/g, 'https://$1.ee');
		} else if (TLD == '.fr') {
			line = line.replace(/http\:\/\/(arcueil|carmen\.developpement-durable\.gouv|eolehna1\.assoc\.pagespro-orange|juvisy)\.fr/g, 'https://$1.fr');
		} else if (TLD == '.ch') {
			line = line.replace(/http\:\/\/(hls-dhs-dss|map\.geo\.admin|nashagazeta|postconflict\.unep)\.ch/g, 'https://$1.ch');
		} else if (TLD == '.fi') {
			line = line.replace(/http\:\/\/(julkaisut\.metsa|kaino\.kotus|wwf|yle)\.fi/g, 'https://$1.fi');
		} else if (TLD == '.cz') {
			line = line.replace(/http\:\/\/(arub\.avcr|plzen\.idnes|reptile-database\.reptarium)\.cz/g, 'https://$1.cz');
		} else if (TLD == '.tv') {
			line = line.replace(/http\:\/\/(ekburg|gorod-plus|rybalka)\.tv/g, 'https://$1.tv');
		} else if (TLD == '.es') {
			line = line.replace(/http\:\/\/(digibuo\.uniovi|hispagua\.cedex|riubu\.ubu)\.es/g, 'https://$1.es');
		} else if (TLD == '.uz') {
			line = line.replace(/http\:\/\/(lex|stroyka|xs)\.uz/g, 'https://$1.uz');
		} else if (TLD == '.se') {
			line = line.replace(/http\:\/\/(ep\.liu|lonqvist|miljobarometern\.stockholm)\.se/g, 'https://$1.se');
		} else if (TLD == '.ir') {
			line = line.replace(/http\:\/\/(lorna\.blog|rch\.ac|rey\.farhang\.gov)\.ir/g, 'https://$1.ir');
		} else if (TLD == '.no') {
			line = line.replace(/http\:\/\/(nbl\.snl|snl|webfileservice\.nve)\.no/g, 'https://$1.no');
		} else if (TLD == '.in') {
			line = line.replace(/http\:\/\/(ddinajpur\.nic|sikkimtourism\.gov|theory\.tifr\.res)\.in/g, 'https://$1.in');
		} else if (TLD == '.vn') {
			line = line.replace(/http\:\/\/(archive|vietnam\.vnanet)\.vn/g, 'https://$1.vn');
		} else if (TLD == '.fm') {
			line = line.replace(/http\:\/\/(barnaul|euroradio)\.fm/g, 'https://$1.fm');
		} else if (TLD == '.md') {
			line = line.replace(/http\:\/\/(aif|esp)\.md/g, 'https://$1.md');
		} else if (TLD == '.at') {
			line = line.replace(/http\:\/\/(ftp\.steyr|hydro\.zek)\.at/g, 'https://$1.at');
		} else if (TLD == '.is') {
			line = line.replace(/http\:\/\/(invest\.skagafjordur|timarit)\.is/g, 'https://$1.is');
		} else if (TLD == '.sk') {
			line = line.replace(/http\:\/\/(klubina|presov\.dnes24)\.sk/g, 'https://$1.sk');
		} else if (TLD == '.cat') {
			line = line.replace(/http\:\/\/(aca\.gencat|parcsnaturals\.gencat)\.cat/g, 'https://$1.cat');
		} else if (TLD == '.be') {
			line = line.replace(/http\:\/\/(users\.ugent|verslagenenmededelingen)\.be/g, 'https://$1.be');
		} else if (TLD == '.jp') {
			line = line.replace(/http\:\/\/(db\.cger\.nies\.go|wldb\.ilec\.or)\.jp/g, 'https://$1.jp');
		} else if (TLD == '.lt') {
			line = line.replace(/http\:\/\/(vanduo\.gamta|www3\.lrs)\.lt/g, 'https://$1.lt');
		} else if (TLD == '.ro') {
			line = line.replace(/http\:\/\/(biodiversitate\.mmediu)\.ro/g, 'https://$1.ro');
		} else if (TLD == '.mk') {
			line = line.replace(/http\:\/\/(daily)\.mk/g, 'https://$1.mk');
		} else if (TLD == '.il') {
			line = line.replace(/http\:\/\/(degania\.org)\.il/g, 'https://$1.il');
		} else if (TLD == '.kg') {
			line = line.replace(/http\:\/\/(diesel\.elcat)\.kg/g, 'https://$1.kg');
		} else if (TLD == '.ge') {
			line = line.replace(/http\:\/\/(dspace\.nplg\.gov)\.ge/g, 'https://$1.ge');
		} else if (TLD == '.int') {
			line = line.replace(/http\:\/\/(earth\.esa)\.int/g, 'https://$1.int');
		} else if (TLD == '.az') {
			line = line.replace(/http\:\/\/(en\.president)\.az/g, 'https://$1.az');
		} else if (TLD == '.kr') {
			line = line.replace(/http\:\/\/(english\.knps\.or)\.kr/g, 'https://$1.kr');
		} else if (TLD == '.za') {
			line = line.replace(/http\:\/\/(eprints\.ru\.ac)\.za/g, 'https://$1.za');
		} else if (TLD == '.gr') {
			line = line.replace(/http\:\/\/(filotis\.itia\.ntua)\.gr/g, 'https://$1.gr');
		} else if (TLD == '.hr') {
			line = line.replace(/http\:\/\/(hrcak\.srce)\.hr/g, 'https://$1.hr');
		} else if (TLD == '.life') {
			line = line.replace(/http\:\/\/(karpaty)\.life/g, 'https://$1.life');
		} else if (TLD == '.lu') {
			line = line.replace(/http\:\/\/(map\.geoportail)\.lu/g, 'https://$1.lu');
		} else if (TLD == '.pt') {
			line = line.replace(/http\:\/\/(natural)\.pt/g, 'https://$1.pt');
		} else if (TLD == '.dk') {
			line = line.replace(/http\:\/\/(naturstyrelsen)\.dk/g, 'https://$1.dk');
		} else if (TLD == '.rs') {
			line = line.replace(/http\:\/\/(pod2\.stat\.gov)\.rs/g, 'https://$1.rs');
		} else if (TLD == '.cl') {
			line = line.replace(/http\:\/\/(repositorio\.uchile)\.cl/g, 'https://$1.cl');
		} else if (TLD == '.sn') {
			line = line.replace(/http\:\/\/(rivieresdusud\.uasz)\.sn/g, 'https://$1.sn');
		} else if (TLD == '.press') {
			line = line.replace(/http\:\/\/(sevastopol)\.press/g, 'https://$1.press');
		} else if (TLD == '.today') {
			line = line.replace(/http\:\/\/(tv2)\.today/g, 'https://$1.today');
		} else if (TLD == '.xn--p1ai') {
			line = line.replace(/http\:\/\/(xn----7sbehhevkhuhcb0b4b4bzki)\.xn--p1ai/g, 'https://$1.xn--p1ai');
		}
	}

	return line;
});


r(/https?\:\/\/(www\.[^\/ \]\n\|\}]+)/g, function ( line, domain ) {//устаревшие www
	var TLD = domain.match(/(\.[^\.]+?$)/g);

	if (TLD == '.ru') {
		line = line.replace(/\:\/\/www\.(1777|ampravda|baltinfo|bsamp|chnmuseum|crimea|culture\.pskov|dagpravda|e-journal|echoperm|expert|forum-100|gcheb\.cap|ifz|itogi|kronoki|kstovocentr|life-news|michpravda|mkommunar|moya-planeta|museum-izborsk|nizhnedevick|novayagazeta|ortho-rus|pandia|parabel\.tomsk|portalostranah|primpogoda|proza|risk|rusarchives|skunb|sobesednik|spark-interfax|stapravda|top-technologies|trk7|ufagen|ural\.aif|zenon74)\.ru/g, '://$1.ru');
	} else if (TLD == '.com') {
		line = line.replace(/\:\/\/www\.(britishcolumbia|dolgoprudny|explorenorth|hawaii247|hemsedal|jamaicablackriver|martinstrel|misspronouncer|pacificwrecks|scubaboard)\.com/g, '://$1.com');
	} else if (TLD == '.org') {
		line = line.replace(/\:\/\/www\.(archive|fryazino|iranicaonline|nodc-cameroon|parkmonrepos|ririvers|stratigraphy|ugandawildlife|unece)\.org/g, '://$1.org');
	} else if (TLD == '.su') {
		line = line.replace(/\:\/\/www\.(cubatravel|egypttravel|mke|navylib)\.su/g, '://$1.su');
	} else if (TLD == '.edu') {
		line = line.replace(/\:\/\/www\.(clas\.ufl|divediscover\.whoi|granit\.unh|volcano\.si)\.edu/g, '://$1.edu');
	} else if (TLD == '.ee') {
		line = line.replace(/\:\/\/www\.(envir|keskkonnaagentuur|keskkonnaamet)\.ee/g, '://$1.ee');
	} else if (TLD == '.de') {
		line = line.replace(/\:\/\/www\.(ilztal|kreis-ahrweiler|verlag-pfalzmundart)\.de/g, '://$1.de');
	} else if (TLD == '.uk') {
		line = line.replace(/\:\/\/www\.(canalplan\.org|historicengland\.org)\.uk/g, '://$1.uk');
	} else if (TLD == '.kz') {
		line = line.replace(/\:\/\/www\.(diapazon|ihe)\.kz/g, '://$1.kz');
	} else if (TLD == '.info') {
		line = line.replace(/\:\/\/www\.(azov|krotov)\.info/g, '://$1.info');
	} else if (TLD == '.is') {
		line = line.replace(/\:\/\/www\.(edgeofthearctic|nat)\.is/g, '://$1.is');
	} else if (TLD == '.il') {
		line = line.replace(/\:\/\/www\.(daat\.ac)\.il/g, '://$1.il');
	} else if (TLD == '.se') {
		line = line.replace(/\:\/\/www\.(ep\.liu)\.se/g, '://$1.se');
	} else if (TLD == '.nl') {
		line = line.replace(/\:\/\/www\.(etymologiebank)\.nl/g, '://$1.nl');
	} else if (TLD == '.az') {
		line = line.replace(/\:\/\/www\.(gsaz)\.az/g, '://$1.az');
	} else if (TLD == '.tj') {
		line = line.replace(/\:\/\/www\.(jahonnamo)\.tj/g, '://$1.tj');
	} else if (TLD == '.pl') {
		line = line.replace(/\:\/\/www\.(nid)\.pl/g, '://$1.pl');
	} else if (TLD == '.ua') {
		line = line.replace(/\:\/\/www\.(poezdnik\.kiev)\.ua/g, '://$1.ua');
	} else if (TLD == '.by') {
		line = line.replace(/\:\/\/www\.(pogoda)\.by/g, '://$1.by');
	} else if (TLD == '.es') {
		line = line.replace(/\:\/\/www\.(rac)\.es/g, '://$1.es');
	} else if (TLD == '.cat') {
		line = line.replace(/\:\/\/www\.(raco)\.cat/g, '://$1.cat');
	} else if (TLD == '.no') {
		line = line.replace(/\:\/\/www\.(snl)\.no/g, '://$1.no');
	} else if (TLD == '.nz') {
		line = line.replace(/\:\/\/www\.(teara\.govt)\.nz/g, '://$1.nz');
	} else if (TLD == '.ca') {
		line = line.replace(/\:\/\/www\.(toponymie\.gouv\.qc)\.ca/g, '://$1.ca');
	} else if (TLD == '.za') {
		line = line.replace(/\:\/\/www\.(walkerbouts\.co)\.za/g, '://$1.za');
	}

	return line;
});