//фиксация протоколов и доменов для ПРО:Физгео
r(/http\:\/\/([^\/ \]\n\|\}]+)/g, function ( line, domain ) {//устаревшие http
var TLD = domain.match(/(\.[^\.]+?$)/g);
if (domain.indexOf('www.') > -1) {
if (TLD == '.com') {
line = line.replace(/http\:\/\/www\.(peakbagger|nature|mountain-forecast|newsru|imdb|climbbybike|scotsman|thehindu|bbc|sfgate|grandsitesaintevictoire|huffingtonpost|sciencedaily|volcanodiscovery|lonelyplanet|planetmountain|showcaves|bartleby|livescience|bradshawfoundation|timesofisrael|australiannationalparks|prensalibre|ibtimes|tageo|atlasobscura|hurriyetdailynews|andes-specialists|isle-of-pines|ogj|vtourisme|economist|encyclopedia|go2africa|outback-australia-travel-secrets|flickr|advantour|adn|reuters|orexca|frommers|answers|foxnews|irishtimes|sa-venues|dtcuba|orangesmile|eastjava|poluostrov-krym|ens-newswire|motorcycleclassics|zambiatourism|latimes|experienceperth|arcticuniverse|newyorker|climbandmore|nydailynews|climbing|grebenka|vietnam-beauty|visitmesaverde|bcferries|visitusvi|nmnhs|capetownmagazine|cbsnews|timesofmalta|haaretz|businessinsider|cell|guidetocaribbeanvacations|cyclingweekly|australianexplorer|indonesia-tourism|silkadv|discogs|discovertasmania|bahamas|space|maxlewinsohn|mesaverdecountry|messynessychic|militaryhistoryonline|mca-hotels|malaysia-traveller|mdpi|mignews|mining|mercurynews|maritime-executive|mail-archive|libraryireland|india9|greeka|geologyin|geolink-group|geody|greektouristguides|historyofinformation|history|harvardmagazine|haramfjell|generationword|ezilon|explorecrete|esri|esemag|fairmont|fedespeleo|freewebs|fergananews|forestcamping|foodandwine|fodors|la-razon|jweekly|journeysbydesign|khaleejtimes|korcula-info|kovinov|kojaro|kohlarn|knysnaplettherald|jonfr|ihs|hydrocarbons-technology|ikion|internationalstandardbible|irs-az|infoplease|ilovekohmak|tristandc|triposo|travelchinaguide|travelchannel|transylvaniabeyond|topchinatravel|thepinaysolobackpacker|urbo|ultimatewyoming|ukhillwalking|ukclimbing|turtleairways|turksandcaicostourism|sudantribune|stratfor)\.com/g, 'https://www.$1.com');
line = line.replace(/http\:\/\/www\.(stjohntour|standartnews|themarysue|tehrantimes|thelancet|thejakartapost|thecajuns|thaiwebsites|texasmonthly|technologyreview|tcm|tangkokowildlifetour|tangalooma|tandfonline|ynetnews|zooeco|zainoo|yardenit|xural|xtremespots|visitventspils|visittci|visitourchina|visitnorway|visitfinland|viator|wolframalpha|westhawaiitoday|wildlifeorissa|westernaustralia|welcomeargentina|webtenerife|webkenya|wdwinfo|waterfallsnorthwest|waltainfo|spacedaily|south-pole|oracabessa|paragliding365|oxfordlearnersdictionaries|oxforddictionaries|onestopmalaysia|phnompenhpost|pngbuai|planetware|placeaholic|photoukraine|philstar|parovoz|o-britain|nytimes|pobonline|nationalregisterofhistoricplaces|n4gn|myweather2|msss|nuttalls|nusalembonganproperty|newscientist|nj|nguoi-viet|newswise|polb|soundsandcolours|samoanews|scientificamerican|santiagoquintero|sacred-texts|rus-shipping|scribd|sosyalarastirmalar|sohu|smolyandnes|smithsonianmag|sites\.google|sierrasun|sfakia-crete|sellarondabikeday|railwaygazette|rappler|raremaps|rough-polished|rmbooks|reviewjournal|rediff|kimberleyaustralia|bergsteigen|bergnews|bangkokpost|baltictimes|australiassouthwest|australiasgoldenoutback|australiantraveller|atlapedia|asiatraveltips|beyondships|arcticphoto|bookdepository|bulgariaski|bp|bosworthtoller|bonjourquebec|blackislebrewery|biodiversityjournal|billboard|africaguide|angelislandferry|ancientpages|americaeconomia|alux|alpinforum|aljazeera|bungeeamerica|business-standard|donga|durratbahrain|douglasfarah|dnaindia|dmcphoto|digitaltrends|dw|desertusa|ekathimerini|eltiempo|elsnorkel|electricscotland|ecologyasia|echinacities|ebooksread|chinahighlights|chicagotribune|chateaumusar|chateauksara|cantickhead|cameroun-foret|calexplornia|clarin|deseretnews|czechtourism|davidrumsey|darjeeling-tourism|cyclingnews|cn-zhangjiajie|cruzanrum|contactmusic|constructionweekonline)\.com/g, 'https://www.$1.com');
} else if (TLD == '.ru') {
line = line.replace(/http\:\/\/www\.(vokrugsveta|kommersant|gazeta|gazprom|mineral|vesti|ng|skitalets|nkj|ruschudo|interfax|aroundspb|webmineral|interfax-russia|rosbalt|1sn|prussia39|nftn|bashinform|bellona|trud|krugosvet|booksite|ngpedia|ntv|rfgf|poxod|1tv|infox|pravda|pravenc|travel|altzapovednik|classes|moya-planeta|gismeteo|eao|news29|garant|citywalls|gazprom-neft|rostmuseum|mvestnik|riatomsk|rgo|e-vid|fishnews|fontanka|irkutskoil|iscmoscow|nakanune|runivers|yugopolis|pravdasevera|popmech|korabel|monographies|archaeolog|rae|city-n|vedu|nsktv|surgutneftegas|tv21|lukoil|soldat|sobaka|atomic-energy|aviaport|arhpress|nsu|votpusk|ssc-ras|geografia|stapravda|vsp|mirkruizov|lingvo|metalinfo|marshruty|gkz-rf|greek|gold10|grozny-inform|historicus|expeducation|eurosport|eprussia|gazeta\.spb|gasu|gardener|fsk-ees|forum\.aroundspb|finanz|homesoverseas|kavkaz-uzel|jewish|kunstkamera)\.ru/g, 'https://www.$1.ru');
line = line.replace(/http\:\/\/www\.(kostyor|kolym-pravda|ibiza|ikirov|huminfakt|ilovegreece|ivangorod|info83|indigenous|towiki|topauthor|timeout|timacad|tsu|uralweb|svirsky|studentlibrary|srpska|sport-express|spbmuseum|systema|the-village|tensy|vest-news|sovross|zonazakona|zel-veter|yuga|zskaluga|worldofnature|zrpress|vestikavkaza|vitaly-company|vishersky|vipgeo|vprazdnik|vzsar|oval|osd|oreanda|oblgazeta|epochtimes|murman|nngasu|ngtp|pnp|scienceforum|science-education|samluka|sakha\.gov|s-vfu|rusrep|ruslang|skneman|sea-law|sibran|sedmitza|qrz|proselki|prodam-ostrov|privet-italia|prima-tv|press-line|polska-kaliningrad|ridjey|rosneft|rosnedra\.gov|rosmorport|rfbr|calend|baltfriends|astronews|arsvest|bn|biosoil|bio\.msu|aqualogo|burneft|advis|abkhazia|47news|100bestbooks|ammonit|alabin|altertravel|alppp|alpfederation|dprk|donland|domex|dfacto|destinations|e1|echo\.msk|eastrussia|chinatrips|chinahighlights)\.ru/g, 'https://www.$1.ru');
} else if (TLD == '.org') {
line = line.replace(/http\:\/\/www\.(africanworldheritagesites|agu|ahne-llyn-aonb|ajsonline|akdn|alareen|american-historama|americanforests|anadyr|answersingenesis|azattyk|birdlife|bsc-eoc|canids|canlii|cifor|cmas|cpawsyukon|culturalsurvival|cwgc|dangerousroads|dbnl|democracynow|downtoearth-indonesia|euler-foundation|fauna-flora|fnpf|galapagos|geographic|geokniga|geosociety|globalforestwatch|globalsecurity|gutenberg|healthdata|hikingincolorado|hikr|himalayanclub|historycooperative|hrnk|iau|ilri|inaturalist|interkriti|isars|iucn|iucnredlist|kew|kimberleysociety|lapl|lcie|livius|mindat|monachus-guardian|muni|nationsonline|nature|nepalmountaineering|newadvent|npca|nwcouncil|nycgovparks|octagonmoonrise|olympic|onlinenevada|openstreetmap|panda|parksconservancy|pegasusarchive|periyartigerreserve|pewtrusts|planinarskisavezrs|plosone|pnas|radiosvoboda|radomes|rand|rferl|san\.beck|sciencemag|serafimovich|sfgov|sossi|sprep|stat-niger|summitpost|travelfish|trjfas|un|unece|unep-wcmc|unep|unst|usdct|wcs|wdl|wild-russia|wisconsinhistory|wmf|worldagroforestry|worldbank|worldcat|worldstatesmen|worldwildlife|wsws|yadvashem)\.org/g, 'https://www.$1.org');
} else if (TLD == '.uk') {
line = line.replace(/http\:\/\/www\.(anglesey-history\.co|bbc\.co|bgs\.ac|british-history\.ac|britishempire\.co|clubmed\.co|dailymail\.co|dailyrecord\.co|discoverthefarneislands\.co|english-heritage\.org|exmoor-nationalpark\.gov|explore-gower\.co|grough\.co|ibtimes\.co|ldwa\.org|legislation\.gov|loganair\.co|megalithic\.co|metoffice\.gov|nhm\.ac|ons\.gov|peakdistrict\.gov|railscot\.co|scotlandscensus\.gov|scotlandschurchestrust\.org|tate\.org|telegraph\.co|thebmc\.co|thesun\.co|thetimes\.co|ucl\.ac|walesonline\.co|walkhighlands\.co|wcmc\.org|wildlifeindia\.co)\.uk/g, 'https://www.$1.uk');
} else if (TLD == '.au') {
line = line.replace(/http\:\/\/www\.(abc\.net|abs\.gov|agfg\.com|albanyadvertiser\.com|austehc\.unimelb\.edu|brunyisland\.org|dalmura\.com|dpaw\.wa\.gov|earth2006\.org|easyweddings\.com|environment\.nsw\.gov|environment\.sa\.gov|gbrmpa\.gov|mrt\.tas\.gov|nationalparks\.nsw\.gov|parks\.tas\.gov|parks\.vic\.gov|parksaustralia\.gov|publish\.csiro|rainbowcoast\.com|rswa\.org|slsa\.sa\.gov|smh\.com|stbarbara\.com|theage\.com|thelist\.tas\.gov|utas\.edu|watoday\.com|wellingtonpark\.org)\.au/g, 'https://www.$1.au');
} else if (TLD == '.net') {
line = line.replace(/http\:\/\/www\.(adv-geosci|americansouthwest|bigwalls|chamonix|f-16|folkstreams|hydrol-earth-syst-sci|letsgosago|losangelesnews|maldivestourism|mendikat|opendemocracy|panarmenian|protectedplanet|remontees-mecaniques|researchgate|retscreen|sabanews|santorini|satelliteviews|solomonencyclopaedia|telesurtv|valaam|vettorg|visitmozambique|vulkane|walkopedia)\.net/g, 'https://www.$1.net');
} else if (TLD == '.de') {
line = line.replace(/http\:\/\/www\.(bfn|biosphaerenreservat-oberlausitz|chiemsee-inseln|dhm|eva\.mpg|evolution-mensch|freiepresse|herrenchiemsee|jv-karlsruhe|kapstadt|landesarchiv-bw|landkartenarchiv|nationalpark-harz|spiegel|sueddeutsche|tim-online\.nrw|vladi-private-islands|volksliederarchiv|wiesbaden|wlb-stuttgart)\.de/g, 'https://www.$1.de');
} else if (TLD == '.gr') {
line = line.replace(/http\:\/\/www\.(capital|clickatlife|greeknewsagenda|gtp|imzante|karpenissi|kathimerini|konitsa|kosisland|kythnos|nskoufas|rhodes|sportsmag|statistics|tanea|tovima|visitgreece|volleyleague)\.gr/g, 'https://www.$1.gr');
} else if (TLD == '.gov') {
line = line.replace(/http\:\/\/www\.(cdfa\.ca|eia|faa|fs\.usda|fws|gao|jpl\.nasa|loc|nasa|ncdc\.noaa|ncparks|nps|npwrc\.usgs|nsf|recreation)\.gov/g, 'https://www.$1.gov');
} else if (TLD == '.ca') {
line = line.replace(/http\:\/\/www\.(aadnc-aandc\.gc|bible|cbc|cen\.ulaval|electionsquebec\.qc|energy\.alberta|env\.gov\.bc|environnement\.gouv\.qc|globalresearch|heritage\.nf|historicplaces|naturecanada|pc\.gc|speakers|unb)\.ca/g, 'https://www.$1.ca');
} else if (TLD == '.it') {
line = line.replace(/http\:\/\/www\.(alicudihotel|asianews|bikelabvideo|centrostudinatura|ct\.ingv|gazzetta|giornaletrentino|guidasicilia|lastampa|lescienze|monasterodibose|nigrizia|protezionecivile\.gov|repubblica)\.it/g, 'https://www.$1.it');
} else if (TLD == '.info') {
line = line.replace(/http\:\/\/www\.(activestudy|aipetri|anapa|c-inform|lordhoweisland|mius|pslava|scottish-places|slovenia|sthelenaisland|touringtasmania|vostlit|wandernsuedtirol)\.info/g, 'https://www.$1.info');
} else if (TLD == '.ch') {
line = line.replace(/http\:\/\/www\.(bls|e-rara|eigernorthface|gipfelbuch|hoherkasten|kora|nzz|saas-fee|swisseduc|swissinfo|tagesanzeiger|trail|zermatt)\.ch/g, 'https://www.$1.ch');
} else if (TLD == '.edu') {
line = line.replace(/http\:\/\/www\.(academia|cfa\.harvard|journals\.uchicago|lgs\.lsu|lib\.utexas|library\.wisc|marc\.ucsb|mona\.uwi|presidency\.ucsb|tamu|uaf)\.edu/g, 'https://www.$1.edu');
} else if (TLD == '.fr') {
line = line.replace(/http\:\/\/www\.(conservation-nature|infoclimat|insee|larepubliquedespyrenees|larousse|lefigaro|legifrance\.gouv|persee|rfi|rtl|taaf)\.fr/g, 'https://www.$1.fr');
} else if (TLD == '.il') {
line = line.replace(/http\:\/\/www\.(9tv\.co|deshe\.org|globes\.co|huji\.ac|kasham\.org|newsru\.co|parks\.org|sviva\.gov|tau\.ac|trekker\.co|wzo\.org)\.il/g, 'https://www.$1.il');
} else if (TLD == '.nz') {
line = line.replace(/http\:\/\/www\.(beehive\.govt|doc\.govt|gsnz\.org|landcareresearch\.co|legislation\.govt|maritimenz\.govt|nzherald\.co|scoop\.co|stats\.govt|teara\.govt)\.nz/g, 'https://www.$1.nz');
} else if (TLD == '.fi') {
line = line.replace(/http\:\/\/www\.(doria|environment|geologinenseura|luontoon|metsa|nationalparks|rantasalmi|ruka|vanhakartta|ymparisto)\.fi/g, 'https://www.$1.fi');
} else if (TLD == '.jp') {
line = line.replace(/http\:\/\/www\.(e-stat\.go|gsi\.go|japantimes\.co|jpp\.co|mlit\.go|mofa\.go|nemuro\.pref\.hokkaido\.lg|nta\.go|pref\.hokkaido\.lg|takaosan\.or)\.jp/g, 'https://www.$1.jp');
} else if (TLD == '.es') {
line = line.replace(/http\:\/\/www\.(abc|barrancodelinfierno|canarias7|diariodeibiza|elmaestrat|laverdad|personales\.ulpgc|pielagos|valdezcaray)\.es/g, 'https://www.$1.es');
} else if (TLD == '.ee') {
line = line.replace(/http\:\/\/www\.(alutagusevald|hiiumaa|kalapeedia|loodusajakiri|noavv|ra|rmk|stat)\.ee/g, 'https://www.$1.ee');
} else if (TLD == '.eu') {
line = line.replace(/http\:\/\/www\.(culturecongress|echodnia|europarl\.europa|europeanjournaloftaxonomy|kavkaz-uzel|postojnska-jama)\.eu/g, 'https://www.$1.eu');
} else if (TLD == '.ie') {
line = line.replace(/http\:\/\/www\.(gsi|heritageireland|independent|irishstatutebook|met|rte)\.ie/g, 'https://www.$1.ie');
} else if (TLD == '.br') {
line = line.replace(/http\:\/\/www\.(ibge\.gov|icmbio\.gov|ispn\.org|oeco\.org|scielo)\.br/g, 'https://www.$1.br');
} else if (TLD == '.kz') {
line = line.replace(/http\:\/\/www\.(inform|kmg|mountain|uralskweek|zakon)\.kz/g, 'https://www.$1.kz');
} else if (TLD == '.cz') {
line = line.replace(/http\:\/\/www\.(horyevropy|hrad|kr-vysocina|novinky|novinyvm)\.cz/g, 'https://www.$1.cz');
} else if (TLD == '.ar') {
line = line.replace(/http\:\/\/www\.(ign\.gob|lanacion\.com|lavoz\.com|peapaleontologica\.org|unidiversidad\.com)\.ar/g, 'https://www.$1.ar');
} else if (TLD == '.cl') {
line = line.replace(/http\:\/\/www\.(conaf|elmostrador|gochile|plataformaurbana|scielo)\.cl/g, 'https://www.$1.cl');
} else if (TLD == '.ir') {
line = line.replace(/http\:\/\/www\.(bums\.ac|hamshahrionline|kazerunsfu\.ac|sid)\.ir/g, 'https://www.$1.ir');
} else if (TLD == '.is') {
line = line.replace(/http\:\/\/www\.(akureyri|icenews|isor|visindavefur)\.is/g, 'https://www.$1.is');
} else if (TLD == '.pl') {
line = line.replace(/http\:\/\/www\.(kampinoski-pn\.gov|smz\.waw|wroclaw|wspolczesna)\.pl/g, 'https://www.$1.pl');
} else if (TLD == '.ua') {
line = line.replace(/http\:\/\/www\.(kp|phototravel\.dp|umoloda\.kiev|zoology\.dp)\.ua/g, 'https://www.$1.ua');
} else if (TLD == '.se') {
line = line.replace(/http\:\/\/www\.(artfakta|dn|naturvardsverket|scb)\.se/g, 'https://www.$1.se');
} else if (TLD == '.no') {
line = line.replace(/http\:\/\/www\.(nina|ssb|vulkaner|yr)\.no/g, 'https://www.$1.no');
} else if (TLD == '.nl') {
line = line.replace(/http\:\/\/www\.(natuurmonumenten|tudelft|vocsite|wildsolutions)\.nl/g, 'https://www.$1.nl');
} else if (TLD == '.hr') {
line = line.replace(/http\:\/\/www\.(dulist|enciklopedija|hr|vecernji)\.hr/g, 'https://www.$1.hr');
} else if (TLD == '.by') {
line = line.replace(/http\:\/\/www\.(belstat\.gov|belta|bible)\.by/g, 'https://www.$1.by');
} else if (TLD == '.sk') {
line = line.replace(/http\:\/\/www\.(bratislavskenoviny|infoglobe|regionsnina)\.sk/g, 'https://www.$1.sk');
} else if (TLD == '.mx') {
line = line.replace(/http\:\/\/www\.(eluniversal\.com|jornada\.unam|yucatan\.com)\.mx/g, 'https://www.$1.mx');
} else if (TLD == '.be') {
line = line.replace(/http\:\/\/www\.(dekamer|hln|lalibre)\.be/g, 'https://www.$1.be');
} else if (TLD == '.dk') {
line = line.replace(/http\:\/\/www\.(gavnoe|kb|statistikbanken)\.dk/g, 'https://www.$1.dk');
} else if (TLD == '.am') {
line = line.replace(/http\:\/\/www\.(armstat|aysor)\.am/g, 'https://www.$1.am');
} else if (TLD == '.in') {
line = line.replace(/http\:\/\/www\.(census2011\.co|corbettnationalpark)\.in/g, 'https://www.$1.in');
} else if (TLD == '.us') {
line = line.replace(/http\:\/\/www\.(desertinvasion|fs\.fed)\.us/g, 'https://www.$1.us');
} else if (TLD == '.bo') {
line = line.replace(/http\:\/\/www\.(ine\.gob|opinion\.com)\.bo/g, 'https://www.$1.bo');
} else if (TLD == '.rs') {
line = line.replace(/http\:\/\/www\.(novosti|politika)\.rs/g, 'https://www.$1.rs');
} else if (TLD == '.za') {
line = line.replace(/http\:\/\/www\.(mozambique\.co|places\.co)\.za/g, 'https://www.$1.za');
} else if (TLD == '.az') {
line = line.replace(/http\:\/\/www\.(ebooks|politika)\.az/g, 'https://www.$1.az');
} else if (TLD == '.travel') {
line = line.replace(/http\:\/\/www\.(samoa|serbia)\.travel/g, 'https://www.$1.travel');
} else if (TLD == '.cn') {
line = line.replace(/http\:\/\/www\.(ciis\.org|syria\.org)\.cn/g, 'https://www.$1.cn');
} else if (TLD == '.my') {
line = line.replace(/http\:\/\/www\.(tabinwildlife\.com|thestar\.com)\.my/g, 'https://www.$1.my');
} else if (TLD == '.lv') {
line = line.replace(/http\:\/\/www\.(daba\.gov|varam\.gov)\.lv/g, 'https://www.$1.lv');
} else if (TLD == '.sb') {
line = line.replace(/http\:\/\/www\.(parliament\.gov|visitsolomons\.com)\.sb/g, 'https://www.$1.sb');
} else if (TLD == '.ge') {
line = line.replace(/http\:\/\/www\.(apsny)\.ge/g, 'https://www.$1.ge');
} else if (TLD == '.aq') {
line = line.replace(/http\:\/\/www\.(ats)\.aq/g, 'https://www.$1.aq');
} else if (TLD == '.bs') {
line = line.replace(/http\:\/\/www\.(bahamas\.gov)\.bs/g, 'https://www.$1.bs');
} else if (TLD == '.co') {
line = line.replace(/http\:\/\/www\.(banrep\.gov)\.co/g, 'https://www.$1.co');
} else if (TLD == '.md') {
line = line.replace(/http\:\/\/www\.(canal3)\.md/g, 'https://www.$1.md');
} else if (TLD == '.mo') {
line = line.replace(/http\:\/\/www\.(dscc\.gov)\.mo/g, 'https://www.$1.mo');
} else if (TLD == '.kg') {
line = line.replace(/http\:\/\/www\.(for)\.kg/g, 'https://www.$1.kg');
} else if (TLD == '.kr') {
line = line.replace(/http\:\/\/www\.(hani\.co)\.kr/g, 'https://www.$1.kr');
} else if (TLD == '.tr') {
line = line.replace(/http\:\/\/www\.(hurriyet\.com)\.tr/g, 'https://www.$1.tr');
} else if (TLD == '.pt') {
line = line.replace(/http\:\/\/www\.(ine)\.pt/g, 'https://www.$1.pt');
} else if (TLD == '.pf') {
line = line.replace(/http\:\/\/www\.(ispf)\.pf/g, 'https://www.$1.pf');
} else if (TLD == '.la') {
line = line.replace(/http\:\/\/www\.(lausitz)\.la/g, 'https://www.$1.la');
} else if (TLD == '.mt') {
line = line.replace(/http\:\/\/www\.(miym\.com)\.mt/g, 'https://www.$1.mt');
} else if (TLD == '.id') {
line = line.replace(/http\:\/\/www\.(pa-bawean\.go)\.id/g, 'https://www.$1.id');
} else if (TLD == '.ba') {
line = line.replace(/http\:\/\/www\.(rtvtk)\.ba/g, 'https://www.$1.ba');
} else if (TLD == '.me') {
line = line.replace(/http\:\/\/www\.(rulit)\.me/g, 'https://www.$1.me');
} else if (TLD == '.ro') {
line = line.replace(/http\:\/\/www\.(speotravaux\.iser)\.ro/g, 'https://www.$1.ro');
} else if (TLD == '.bg') {
line = line.replace(/http\:\/\/www\.(strandja)\.bg/g, 'https://www.$1.bg');
} else if (TLD == '.pk') {
line = line.replace(/http\:\/\/www\.(thenews\.com)\.pk/g, 'https://www.$1.pk');
} else if (TLD == '.biz') {
line = line.replace(/http\:\/\/www\.(tilachar)\.biz/g, 'https://www.$1.biz');
} else if (TLD == '.su') {
line = line.replace(/http\:\/\/www\.(trp)\.su/g, 'https://www.$1.su');
} else if (TLD == '.at') {
line = line.replace(/http\:\/\/www\.(verwaltung\.steiermark)\.at/g, 'https://www.$1.at');
} else if (TLD == '.zm') {
line = line.replace(/http\:\/\/www\.(visitzambia\.co)\.zm/g, 'https://www.$1.zm');
} else if (TLD == '.int') {
line = line.replace(/http\:\/\/www\.(who)\.int/g, 'https://www.$1.int');
}
}
else
{
if (TLD == '.ru') {
line = line.replace(/http\:\/\/(lenta|docs\.cntd|ria|tass|cyberleninka|poxod|elementy|rg|pravdasevera|bigenc|novayagazeta\.spb|ogv\.karelia|vz|webmineral|nedradv|bashgazet|nature\.baikal|hab\.mk|krymea|expert|gold\.1prime|guide\.travel|neftegaz|wiki\.web|uraloved|gazeta|kamskoye-ustye\.tatarstan|inosmi|gazetazp|prirodasibiri|img-fotki\.yandex|nat-geo|guide-israel|penza-flora\.okis|regnum|ysia|elar\.urfu|alpfederation|moluch|v102|leopard-land|bellona|lib\.rgo|toponym\.antat|baikalfund|rekachusovaya|portal-kultura|terijoki\.spb|aif|yamburg-dobycha\.gazprom|svpressa|youroute|pandia|voopiik-don|zapoved-mordovia|zapovednik-vrn|2yxa|vladnews|arhangelsk\.allnw|stav\.aif|archive\.travel|statehistory|thelib|nversia|prohotel|ngs24|altapress|primamedia|big-archive|drugoigorod|green\.tsu|geo\.asu\.edu|turbina|sc\.mil|tvkultura|fotki\.yandex|rusrep|treeportal|camp-altai|rngoil|sobory|urban3p|rt-online|iscmoscow|zmmu\.msu|zapovednik-kbr|zakon-region2|yarkoe-country|yambe|yakutiamedia|yakutia24|kipros|kgo66|kerch\.com|kavkaz\.mk|katun24|kandalaksha-reserve|jeduvkrym|irkobl|kirov\.rgo|loveopium|loshchits|lib\.kunstkamera|lenoblinform|lenobl|lakebaikal|kudarf|krymania|krasnoe\.ucoz|iosif-vm|gubernia74|hontos|guides\.rusarchives|geography-a|hub\.sfedu|int\.rgo|influenza\.spb|igkrc|ib\.komisc|huntmap|geoenergetics|nwae\.spb|nvo\.ng|nsu|npsochi|nord-news|niidokuchaeva|oilcapital|newizv|new\.xurzarin|park-meshersky|park-beringia|old\.rgo|ours-nature|otr-online|otherreferats\.allbest|otdih\.nakubani|orthomission|orenzap|mirmarok|minstroy\.samregion|mil|maps\.aopa|nbdrx|nature\.1001chudo|nat\.astrobl|naked-science|nadymdobycha\.gazprom|my\.mail|museum\.krasfond|msu\.lenobl|moxnpn)\.ru/g, 'https://$1.ru');
line = line.replace(/http\:\/\/(mosjour|mos-holidays|geocrimea|barcelona-spain|bibliopskov|belhist|azbyka|atv\.ucoz|citysakh|china-sky|bogoslov|brasil-russia|bozem\.ucoz|botsad\.msu|asu\.edu|asiarussia|club\.foto|agesmystery|abc-jewels|7vershin|aksay-museum|73online|47channel|29|1ul|arhpress|argumenti|anchr|allingvo|geo88|ecology\.gpntb|echo\.msk|flnka|geo\.koltyrin|gazetadaily|gazeta\.spb|gagarinskiymedia|function\.mil|fishmonger|fisher\.spb|fantlab|fakt-tv|dagestan\.rgo|culturavrn|culttourism|crimea|earth-chronicles|download\.proshkolu|dorinfo|dog\.my1|dni|pattayatrip|worldconstitutions|wek|161|web\.snauka|rutraveller|samara\.aif|sakhapress|sakhalife|rustelegraph|science\.snauka|rus\.bystroy|runivers|sochi-24|smolensk\.rgo|slovari\.bibliofond|skitalets|sibkray|sia|shkolazhizni|severpost|severdv|sever-press|scientificrussia|rus-shipping|promariel|prokarelia|priroda36|priroda\.pskov|pravchelny|posibiri|podelise|raaar|pln-pskov|pljussa\.reg60|peterhofmuseum|pesh-com|racechrono|rscf|routes\.votpusk|rostov\.mk|rostec|rk\.gov|radioblago|risk|rgavmf|region33\.ucoz|region\.murman|raenza|socotra|water-rf|uzb\.ucoz|vcvetu|vbgcity|vasostrov|valentin-nuzhdenko|valaam|vestiprim|utu\.customs|uralmines|ulrgo|ulin|twentysix|vesti-yamal|vgltu|vlad\.mk|warbler|w\.histrf|vtruda|vseonefti|vologda-oblast|volgastat\.gks|vmilane|vlad\.aif|video\.yandex|vital\.lib\.tsu|visit-voronezh|tvzvezda|spb\.mk|tegrk|survinat|sun\.tsu|subscribe|stomestrf|static\.diary|states-of-america|starling\.rinet|srgazeta|sport-marafon|spbdnevnik|textarchive|turizmnt|turizm\.ngs|travellanka|theatremuseum|tourism\.interfax|tonkosti|tksalavat|tinaocenter|zuratkul)\.ru/g, 'https://$1.ru');
} else if (TLD == '.com') {
line = line.replace(/http\:\/\/(peakbagger|jalita|onlinelibrary\.wiley|flot|naukarus|romveres\.livejournal|krasnews|latimesblogs\.latimes|ru\.euronews|distancecalculator\.globefeed|centralsib|centralasia-adventures|barentsobserver|velolive|news\.ifeng|projects\.latimes|bivouac|gulfnews|ukrainaincognita|edition\.cnn|cheloveknauka|bushwalk|10000birds|yuri-maksimov\.livejournal|zooeco|khortytsalife|korpensoga|journalmetro|jamaica-gleaner|ivitas\.livejournal|madainproject|listverse|link\.springer|law\.justia|kubantur|krymoteka|hn\.qq|grancanaria|geoknigi|hotelsbroker|io9\.gizmodo|in\.reuters|info-rm|indianexpress|imdb|hubpages|igor-solomadin\.livejournal|ierapetramyguide\.wordpress|idahosummits|ny\.curbed|novostipmr|newswise|news\.sky|news\.mongabay|nypost|okha\.sakh|new-sebastopol|pacificwrecks|parovoz|palm\.newsru|paanajarvi-park|oreivatein|orangesmile|opstinaugljevik\.tripod|megamashina\.livejournal|mevamevo\.livejournal|mediaindonesia|max425\.wordpress|mastersbox|marinas|mybigfatgreekmarriageru\.wordpress|navajotours|n\.ziyouz|moon|pembrokeshire-herald|barakasamsara|blogs\.chicagotribune|b-port|auto-dnevnik)\.com/g, 'https://$1.com');
line = line.replace(/http\:\/\/(austhrutime|blacksea7|certs-it|calgaryherald|bradshawfoundation|7summits|aeromed2\.wordpress|adelecosgrovebray\.hubpages|abhoc|abcnews\.go|3planeta|akfireinfo|alaskatours|artkostyuk|artdaily|archive\.vcstar|archipelagofastfact\.wordpress|antinormanist\.livejournal|ant-ufa|ancientimes\.blogspot|climbing|emedicine\.medscape|ermakvagus|elevation\.maplogs|economictimes\.indiatimes|es\.scribd|etio\.webs|fromheretonowhere|famouswonders|explorebyyourself|europeforvisitors|euro-map|earth911|cvarnou\.livejournal|devilonwheels|cs\.cruise|crimeanblog\.blogspot|creation|correodelsur|dotearth\.blogs\.nytimes|e-polonskiy\.livejournal|dutcheastindies\.webs|donbass-info|dm-fedorov\.livejournal|wuvulu|wattsupwiththat|sand-boarding|saariselka|russian\.china|ruslapland\.livejournal|silkadv|skyscraperpage|sites\.google|semyaigorod\.livejournal|sorrentocoastlimo|poluostrov-krym|polyus|rmbooks|ru\.reuters|ru-royalty\.livejournal|records\.mastersbox|raregoldnuggets|velib|vancouversun|valday|vahemart\.livejournal|uwiseismic|uk\.reuters|uk\.news\.yahoo|ucmopuockon\.livejournal|vostokmedia|vizaviz\.livejournal|viktorkotl\.livejournal|streetdogstory|tastracks\.webs|travel\.nytimes|travel\.kompas|tourism\.webindia123|timesofindia\.indiatimes)\.com/g, 'https://$1.com');
} else if (TLD == '.org') {
line = line.replace(/http\:\/\/(2mn|advances\.sciencemag|airportsbase|alexisphoenix|archive|assets\.panda|babel\.hathitrust|bib\.convdocs|cameralabs|caves|cominf|de\.wikinews|dieoff|dx\.doi|electionspuertorico|en\.climate-data|en\.wikisource|eol|esa\.un|exploringsolutionspast|geographic|geosfera|historylib|iccrimea|indiatogether|insideclimatenews|iranicaonline|istrianet|jgs\.lyellcollection|journals\.cambridge|journals\.plos|madelineislandmuseum\.wisconsinhistory|mem\.lyellcollection|news\.sciencemag|newzealandecology|pib\.socioambiental|redbook-ua|researcharchive\.calacademy|ru\.wadiocese|ru\.wikinews|rus\.azattyq|rus\.ozodi|sciencenow\.sciencemag|soysambuconservancy|sp\.lyellcollection|unispal\.un|unstats\.un|www3\.gobiernodecanarias)\.org/g, 'https://$1.org');
} else if (TLD == '.ua') {
line = line.replace(/http\:\/\/(3sea\.org|4sport|7chudes\.in|analitika\.at|animalworld\.com|cg\.gov|chtyvo\.org|cml\.happy\.kiev|collectedpapers\.com|dklg\.kmu\.gov|dp\.kp|eco\.cg\.gov|esu\.com|gazetaslovo\.at|geonews\.com|infodon\.org|interfax\.com|kga\.gov|kiev\.pravda\.com|kievvlast\.com|kp|necu\.org|new\.pamyatky\.kiev|plants-club|pzf\.land\.kiev|slk\.kh|sud|zakon\.rada\.gov)\.ua/g, 'https://$1.ua');
} else if (TLD == '.edu') {
line = line.replace(/http\:\/\/(anthropology\.colostate|avo\.alaska|books\.nap|bu\.academia|cmes\.arizona|collections\.dartmouth|digitalassets\.lib\.berkeley|e360\.yale|earlham|en-uoa-gr\.academia|faculty\.georgetown|library\.puc|libweb5\.princeton|matsu\.alaska|muse\.jhu|pages\.uoregon|pangea\.stanford|penelope\.uchicago|permafrost\.gi\.alaska|pirlwww\.lpl\.arizona|prism\.oregonstate|repository\.library\.csuci|santacruz\.nrs\.ucsb|scholarspace\.manoa\.hawaii|volcano\.oregonstate|volcano\.si|whmc\.umsystem|wwi\.lib\.byu)\.edu/g, 'https://$1.edu');
} else if (TLD == '.net') {
line = line.replace(/http\:\/\/(article\.tebyan|asiamountains|aviation-safety|biz\.liga|booksandideas|earthpapers|eco-turizm|enc\.daum|histdoc|iknigi|korrespondent|lifeglobe|mirchudes|modernlib|monomax\.sisadminov|navoprosotveta|news\.bigmir|protectedplanet|rgdoi|short-toed-eagle|tak-to-ent|tourlib|travel\.tochka|trvlworld|visitcentralbalkan)\.net/g, 'https://$1.net');
} else if (TLD == '.gov') {
line = line.replace(/http\:\/\/(antwrp\.gsfc\.nasa|apa\.ny|cfpub\.epa|dec\.alaska|earthobservatory\.nasa|eclipse\.gsfc\.nasa|egsc\.usgs|erg\.usgs|focus\.nps|geomaps\.wr\.usgs|geopubs\.wr\.usgs|libraryphoto\.cr\.usgs|neo\.sci\.gsfc\.nasa|npgallery\.nps|oceanexplorer\.noaa|permanent\.access\.gpo|photojournal\.jpl\.nasa|planetarynames\.wr\.usgs|pubs\.usgs|tpwd\.texas|vulcan\.wr\.usgs|water\.usgs|www2\.jpl\.nasa)\.gov/g, 'https://$1.gov');
} else if (TLD == '.info') {
line = line.replace(/http\:\/\/(allcastle|astr|azpolitika|cl\.geoview|dan-news|gis-lab|govp|iahs|ikatkov|kp\.geoview|n-dv|rostender|sakhalin|satmaps|smi\.kuban|tayga|uralsky|vu\.geoview|wf\.geoview|xakac)\.info/g, 'https://$1.info');
} else if (TLD == '.kz') {
line = line.replace(/http\:\/\/(24|adilet\.zan|apgazeta|atyrautv|chonja|e-history|geography|gnpp-buiratau|ikitap|jagrafia\.ucoz|kapital|mk-kz|mountain|news\.nur|ruh|speleokz\.ucoz|tengrinews)\.kz/g, 'https://$1.kz');
} else if (TLD == '.au') {
line = line.replace(/http\:\/\/(adb\.anu\.edu|allsaints-southhobart\.org|data\.aad\.gov|ebooks\.adelaide\.edu|eprints\.utas\.edu|helictite\.caves\.org|location\.sa\.gov|maps\.land\.vic\.gov|parks\.dpaw\.wa\.gov)\.au/g, 'https://$1.au');
} else if (TLD == '.az') {
line = line.replace(/http\:\/\/(1news|files\.preslib|history|modern|news\.day|silent|yanardag|zerkalo)\.az/g, 'https://$1.az');
} else if (TLD == '.uk') {
line = line.replace(/http\:\/\/(arts\.guardian\.co|biblicalarchaeology\.org|cairngorms\.co|digital\.nls|discoveringbristol\.org|explore\.bfi\.org|herbaria\.plants\.ox\.ac|maps\.google\.co)\.uk/g, 'https://$1.uk');
} else if (TLD == '.ca') {
line = line.replace(/http\:\/\/(apps\.gov\.bc|circle\.ubc|epe\.lac-bac\.gc|japan\.apike|toponymie\.gouv\.qc|www12\.statcan\.gc)\.ca/g, 'https://$1.ca');
} else if (TLD == '.vn') {
line = line.replace(/http\:\/\/(baothuathienhue|dantri\.com|saigon-gpdaily\.com|tuoitrenews|vietnam\.vnanet|vietnamnews)\.vn/g, 'https://$1.vn');
} else if (TLD == '.by') {
line = line.replace(/http\:\/\/(bdg|dzerlib|grodnonews|minenergo\.gov|mrik\.gov|wildlife)\.by/g, 'https://$1.by');
} else if (TLD == '.su') {
line = line.replace(/http\:\/\/(ecoportal|encsakhalin|mold|skr|vkrym|zabroska)\.su/g, 'https://$1.su');
} else if (TLD == '.gr') {
line = line.replace(/http\:\/\/(antiparos|biodiversitysitia|buk|filotis\.itia\.ntua|ir\.lib\.uth|mandras-eidyllias)\.gr/g, 'https://$1.gr');
} else if (TLD == '.ee') {
line = line.replace(/http\:\/\/(epl\.delfi|maaleht\.delfi|pub\.stat|rus\.err|rus\.postimees|rus\.telegram)\.ee/g, 'https://$1.ee');
} else if (TLD == '.pl') {
line = line.replace(/http\:\/\/(bpn\.com|krakow\.wyborcza|mapy\.geoportal\.gov|tpkgdansk|trakt\.poznan|wyborcza)\.pl/g, 'https://$1.pl');
} else if (TLD == '.fr') {
line = line.replace(/http\:\/\/(gallica\.bnf|museefabre\.montpellier3m|sciencepress\.mnhn|tel\.archives-ouvertes|tipaza\.typepad)\.fr/g, 'https://$1.fr');
} else if (TLD == '.eu') {
line = line.replace(/http\:\/\/(cordis\.europa|db\.edcs|ec\.europa|eunis\.eea\.europa|natura2000\.eea\.europa)\.eu/g, 'https://$1.eu');
} else if (TLD == '.nz') {
line = line.replace(/http\:\/\/(paperspast\.natlib\.govt|rsnz\.natlib\.govt|teaohou\.natlib\.govt|teara\.govt|tvnz\.co)\.nz/g, 'https://$1.nz');
} else if (TLD == '.il') {
line = line.replace(/http\:\/\/(arch\.haifa\.ac|flora\.org|news\.walla\.co|parks\.org)\.il/g, 'https://$1.il');
} else if (TLD == '.tv') {
line = line.replace(/http\:\/\/(crimea24|grozny|ren|tvoemisto)\.tv/g, 'https://$1.tv');
} else if (TLD == '.ch') {
line = line.replace(/http\:\/\/(biblio\.unibe|hls-dhs-dss|map\.geo\.admin|nashagazeta)\.ch/g, 'https://$1.ch');
} else if (TLD == '.cz') {
line = line.replace(/http\:\/\/(hranickapropast|jihlava\.idnes|mapy\.mzk|zpravy\.idnes)\.cz/g, 'https://$1.cz');
} else if (TLD == '.hr') {
line = line.replace(/http\:\/\/(dnevnik|hrcak\.srce|zadarski\.slobodnadalmacija)\.hr/g, 'https://$1.hr');
} else if (TLD == '.jp') {
line = line.replace(/http\:\/\/(dictionary\.goo\.ne|mainichi|news\.tv-asahi\.co)\.jp/g, 'https://$1.jp');
} else if (TLD == '.bg') {
line = line.replace(/http\:\/\/(bnr|dnes\.dir|mgu)\.bg/g, 'https://$1.bg');
} else if (TLD == '.nl') {
line = line.replace(/http\:\/\/(natuurcultuur|nos|wetten\.overheid)\.nl/g, 'https://$1.nl');
} else if (TLD == '.id') {
line = line.replace(/http\:\/\/(bpjt\.pu\.go|ntt\.bps\.go|sp2010\.bps\.go)\.id/g, 'https://$1.id');
} else if (TLD == '.de') {
line = line.replace(/http\:\/\/(digitale\.bibliothek\.uni-halle|www1\.nls\.niedersachsen|zefys\.staatsbibliothek-berlin)\.de/g, 'https://$1.de');
} else if (TLD == '.travel') {
line = line.replace(/http\:\/\/(account|azerbaijan)\.travel/g, 'https://$1.travel');
} else if (TLD == '.cat') {
line = line.replace(/http\:\/\/(cabrera\.dbalears|parcsnaturals\.gencat)\.cat/g, 'https://$1.cat');
} else if (TLD == '.md') {
line = line.replace(/http\:\/\/(ecology|trm)\.md/g, 'https://$1.md');
} else if (TLD == '.is') {
line = line.replace(/http\:\/\/(en\.vedur|timarit)\.is/g, 'https://$1.is');
} else if (TLD == '.lv') {
line = line.replace(/http\:\/\/(gorod|rus\.delfi)\.lv/g, 'https://$1.lv');
} else if (TLD == '.mk') {
line = line.replace(/http\:\/\/(js\.ugd\.edu|tvm)\.mk/g, 'https://$1.mk');
} else if (TLD == '.am') {
line = line.replace(/http\:\/\/(news|photoclub\.do)\.am/g, 'https://$1.am');
} else if (TLD == '.it') {
line = line.replace(/http\:\/\/(digilander\.libero|palermo\.repubblica)\.it/g, 'https://$1.it');
} else if (TLD == '.no') {
line = line.replace(/http\:\/\/(snl|ssb)\.no/g, 'https://$1.no');
} else if (TLD == '.in') {
line = line.replace(/http\:\/\/(haryanaforest\.gov|theory\.tifr\.res)\.in/g, 'https://$1.in');
} else if (TLD == '.dk') {
line = line.replace(/http\:\/\/(statistikbanken|www2\.dmu)\.dk/g, 'https://$1.dk');
} else if (TLD == '.xn--p1ai') {
line = line.replace(/http\:\/\/(xn--80aajhqhktebqcvc2c9e6cj|xn--d1ahaoghbejbc5k)\.xn--p1ai/g, 'https://$1.xn--p1ai');
} else if (TLD == '.fi') {
line = line.replace(/http\:\/\/(virtuaaliviipuri\.tamk|yle)\.fi/g, 'https://$1.fi');
} else if (TLD == '.nyc') {
line = line.replace(/http\:\/\/(afisha)\.nyc/g, 'https://$1.nyc');
} else if (TLD == '.ro') {
line = line.replace(/http\:\/\/(biodiversitate\.mmediu)\.ro/g, 'https://$1.ro');
} else if (TLD == '.es') {
line = line.replace(/http\:\/\/(dialnet\.unirioja)\.es/g, 'https://$1.es');
} 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 == '.kr') {
line = line.replace(/http\:\/\/(english\.knps\.or)\.kr/g, 'https://$1.kr');
} else if (TLD == '.name') {
line = line.replace(/http\:\/\/(gako)\.name/g, 'https://$1.name');
} else if (TLD == '.fo') {
line = line.replace(/http\:\/\/(heimabeiti)\.fo/g, 'https://$1.fo');
} else if (TLD == '.io') {
line = line.replace(/http\:\/\/(husnullin\.baza)\.io/g, 'https://$1.io');
} else if (TLD == '.hu') {
line = line.replace(/http\:\/\/(index)\.hu/g, 'https://$1.hu');
} else if (TLD == '.ws') {
line = line.replace(/http\:\/\/(kamni)\.ws/g, 'https://$1.ws');
} else if (TLD == '.ie') {
line = line.replace(/http\:\/\/(mountainviews)\.ie/g, 'https://$1.ie');
} else if (TLD == '.at') {
line = line.replace(/http\:\/\/(opac\.geologie\.ac)\.at/g, 'https://$1.at');
} else if (TLD == '.me') {
line = line.replace(/http\:\/\/(petlike)\.me/g, 'https://$1.me');
} else if (TLD == '.land') {
line = line.replace(/http\:\/\/(prim)\.land/g, 'https://$1.land');
} else if (TLD == '.br') {
line = line.replace(/http\:\/\/(saladeimprensa\.ibge\.gov)\.br/g, 'https://$1.br');
} else if (TLD == '.press') {
line = line.replace(/http\:\/\/(sevastopol)\.press/g, 'https://$1.press');
} else if (TLD == '.fm') {
line = line.replace(/http\:\/\/(sib)\.fm/g, 'https://$1.fm');
} else if (TLD == '.lk') {
line = line.replace(/http\:\/\/(sundaytimes)\.lk/g, 'https://$1.lk');
} else if (TLD == '.today') {
line = line.replace(/http\:\/\/(tv2)\.today/g, 'https://$1.today');
} else if (TLD == '.ae') {
line = line.replace(/http\:\/\/(visitabudhabi)\.ae/g, 'https://$1.ae');
}
}
return line;
});
r(/https?\:\/\/(www\.[^\/ \]\n\|\}]+)/g, function ( line, domain ) {//устаревшие www
var TLD = domain.match(/(\.[^\.]+?$)/g);
if (TLD == '.ru') {
line = line.replace(/\:\/\/www\.(2r|34gaz|3dnews|admin\.tomsk|aif|altai\.aif|applied-research|archaeology\.nsc|astronomy|baltinfo|bgtrk|bibliopskov|catalogmineralov|council\.gov|crimea|cultinfo|culture\.pskov|dagzapoved|dni|dommuseum|ecosystema|flnka|fundamental-research|geoinform|gornovosti|gosthelp|gudok|icecave|ipae\.uran|iran|irk\.aif|itogi|kmvline|kp74|kronoki|kuban\.aif|kulturologia|lenta|lesder|lukoil-zs|mkset|moluch|moya-planeta|mprkk|my\.arcto|nat-geo|ncrc|newdaynews|novayagazeta|ogbus|oilcapital|online812|ortho-rus|portalostranah|pravo\.gov|prayslain|pressa\.spb|proza|regions|regnum|rg|ria|risk|rostov\.aif|rusk|rusmarka|rutraveller|sanmashuk|sarrest|science-education|scienceforum|shopandmall|skunb|spb\.aif|stroygaz|testpilot|travelstar|ufagen|uralrockart|uriit|v102|valaam|vatandash|vdmst|vetert|vetrogon|vistgroup|vlg\.aif|vz|westra|wwf|zapovednik-65|zoodrug|zoonovosib)\.ru/g, '://$1.ru');
} else if (TLD == '.com') {
line = line.replace(/\:\/\/www\.(abhoc|alexclimb|allaroundnevada|amerisurv|apnews|b-port|bivouac|britishcolumbia|caribbeantravel|cuencahighlife|designiscentral|discover-bulgaria|dprktoday|edurnepasaban|elpensante|explorenorth|galapagosalternative|igoterra|israeltripplanner|mediaindonesia|mesaverdecountry|nauka-shop|newlocalhistory|newzealandlighthouses|oilru|oreivatein|pacificislandair|pacificwrecks|piknicelectronik|scubaboard|southaustralia|studyspanish|theoildrum|timesofmalta|tocrete|tomsknews|tourist-area|ukrreferat|ukrrudprom|uralstalker|volcanolive|vostokmedia|wuvulu|wysotsky|zapovedniki-mira)\.com/g, '://$1.com');
} else if (TLD == '.org') {
line = line.replace(/\:\/\/www\.(archive|biblearchaeology|biodiversityexplorer|bioone|caminandopanama|caves|discoverytrail|dzanga-sangha|gondwanalink|hawaiiatolls|iranicaonline|karstwaters|newzealandecology|parkmonrepos|rdxc|trivalleycares|ugandawildlife)\.org/g, '://$1.org');
} else if (TLD == '.info') {
line = line.replace(/\:\/\/www\.(krotov|poskok|sakhalin|shamora|sibir)\.info/g, '://$1.info');
} else if (TLD == '.uk') {
line = line.replace(/\:\/\/www\.(car-hire-centre\.co|eafa\.org|jncc\.gov|westrayheritage\.co)\.uk/g, '://$1.uk');
} else if (TLD == '.kz') {
line = line.replace(/\:\/\/www\.(adilet\.zan|bourabai|kase|uralsk-akimat)\.kz/g, '://$1.kz');
} else if (TLD == '.ua') {
line = line.replace(/\:\/\/www\.(city\.kharkov|kreschatic\.kiev|nashkray\.kiev|zabor\.zp)\.ua/g, '://$1.ua');
} else if (TLD == '.edu') {
line = line.replace(/\:\/\/www\.(avo\.alaska|geology\.sdsu|lib\.byu|volcano\.si)\.edu/g, '://$1.edu');
} else if (TLD == '.nz') {
line = line.replace(/\:\/\/www\.(niwa\.co|royalsociety\.org|tiritirimatangi\.org)\.nz/g, '://$1.nz');
} else if (TLD == '.az') {
line = line.replace(/\:\/\/www\.(1news|tourism)\.az/g, '://$1.az');
} else if (TLD == '.by') {
line = line.replace(/\:\/\/www\.(geoversum|pinsknews)\.by/g, '://$1.by');
} else if (TLD == '.net') {
line = line.replace(/\:\/\/www\.(histdoc|lawphil)\.net/g, '://$1.net');
} else if (TLD == '.ee') {
line = line.replace(/\:\/\/www\.(keskkonnaamet|ruhnu)\.ee/g, '://$1.ee');
} else if (TLD == '.fi') {
line = line.replace(/\:\/\/www\.(po-russki\.nationalparks|posiva)\.fi/g, '://$1.fi');
} else if (TLD == '.tv') {
line = line.replace(/\:\/\/www\.(gtrkvainah|stavropolye)\.tv/g, '://$1.tv');
} else if (TLD == '.de') {
line = line.replace(/\:\/\/www\.(taz|themenpark-umwelt\.baden-wuerttemberg)\.de/g, '://$1.de');
} else if (TLD == '.ca') {
line = line.replace(/\:\/\/www\.(horizonweekly|toponymie\.gouv\.qc)\.ca/g, '://$1.ca');
} else if (TLD == '.nl') {
line = line.replace(/\:\/\/www\.(repository\.naturalis|waddenzee)\.nl/g, '://$1.nl');
} else if (TLD == '.nu') {
line = line.replace(/\:\/\/www\.(bornholm)\.nu/g, '://$1.nu');
} else if (TLD == '.au') {
line = line.replace(/\:\/\/www\.(breakloose\.com)\.au/g, '://$1.au');
} else if (TLD == '.ar') {
line = line.replace(/\:\/\/www\.(cienciahoy\.org)\.ar/g, '://$1.ar');
} else if (TLD == '.us') {
line = line.replace(/\:\/\/www\.(commerce\.state\.ak)\.us/g, '://$1.us');
} else if (TLD == '.si') {
line = line.replace(/\:\/\/www\.(enavtika)\.si/g, '://$1.si');
} else if (TLD == '.ch') {
line = line.replace(/\:\/\/www\.(hls-dhs-dss)\.ch/g, '://$1.ch');
} else if (TLD == '.int') {
line = line.replace(/\:\/\/www\.(iho)\.int/g, '://$1.int');
} else if (TLD == '.jm') {
line = line.replace(/\:\/\/www\.(isa\.org)\.jm/g, '://$1.jm');
} else if (TLD == '.gr') {
line = line.replace(/\:\/\/www\.(kedke)\.gr/g, '://$1.gr');
} else if (TLD == '.pl') {
line = line.replace(/\:\/\/www\.(nid)\.pl/g, '://$1.pl');
} else if (TLD == '.lt') {
line = line.replace(/\:\/\/www\.(obzor)\.lt/g, '://$1.lt');
} else if (TLD == '.ke') {
line = line.replace(/\:\/\/www\.(paukwa\.or)\.ke/g, '://$1.ke');
} else if (TLD == '.pt') {
line = line.replace(/\:\/\/www\.(portugalvirtual)\.pt/g, '://$1.pt');
} else if (TLD == '.cat') {
line = line.replace(/\:\/\/www\.(raco)\.cat/g, '://$1.cat');
} else if (TLD == '.fr') {
line = line.replace(/\:\/\/www\.(skitour)\.fr/g, '://$1.fr');
} else if (TLD == '.hr') {
line = line.replace(/\:\/\/www\.(slobodnadalmacija)\.hr/g, '://$1.hr');
} else if (TLD == '.no') {
line = line.replace(/\:\/\/www\.(snl)\.no/g, '://$1.no');
} else if (TLD == '.gl') {
line = line.replace(/\:\/\/www\.(stat)\.gl/g, '://$1.gl');
} else if (TLD == '.es') {
line = line.replace(/\:\/\/www\.(turist\.ucoz)\.es/g, '://$1.es');
} else if (TLD == '.dk') {
line = line.replace(/\:\/\/www\.(ue)\.dk/g, '://$1.dk');
} else if (TLD == '.at') {
line = line.replace(/\:\/\/www\.(uni-klu\.ac)\.at/g, '://$1.at');
} else if (TLD == '.uz') {
line = line.replace(/\:\/\/www\.(vesti)\.uz/g, '://$1.uz');
} else if (TLD == '.cz') {
line = line.replace(/\:\/\/www\.(vets\.estranky)\.cz/g, '://$1.cz');
} else if (TLD == '.uy') {
line = line.replace(/\:\/\/www\.(wrm\.org)\.uy/g, '://$1.uy');
}
return line;
});