Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
let done = false ,
running = false ,
notify = 'mypdnsreporter' ,
token = '' ,
apiurl = '' ,
tabOp1 = false ,
tabOp2 = false ,
usePOP = false ,
lookupCAT = false ;
const baseurl = [ 'https://karma.crimeflare.eu.org:1984' , 'http://karma.im5wixghmfmt7gf7wb4xrgdm6byx2gj26zn47da6nwo7xvybgxnqryid.onion' ] ;
const waitstc = [ 'Hold on' , 'One moment' , 'Just a moment' , 'Just a sec' , 'Just a second' , 'Nice find' , 'Knock-knock!' , 'Brill!' , 'Brilliant!' , 'Cool!' , 'Good going!' , 'Good job!' , 'Good work!' , 'Great!' , 'Keep it up!' , 'Marvelous!' , 'Nice going!' , 'Outstanding!' , 'Perfect!' , 'Right on!' , 'Super!' , 'Superb!' , 'Terrific!' , 'Thanks!' , 'Wonderful!' , 'Wow!' , 'You are doing a good job!' ] ;
let domainCAT = { } ;
function showreply ( t , d , icon = '' ) {
browser . notifications . clear ( notify ) ;
browser . notifications . create ( notify , {
'type' : 'basic' ,
'title' : t ,
'message' : d ,
iconUrl : browser . runtime . getURL ( icon == '' ? 'icon.png' : 'i/' + icon + '.png' )
} ) ;
}
function toBinary ( string ) {
const codeUnits = new Uint16Array ( string . length ) ;
for ( let i = 0 ; i < codeUnits . length ; i ++ ) {
codeUnits [ i ] = string . charCodeAt ( i ) ;
}
return btoa ( String . fromCharCode ( ... new Uint8Array ( codeUnits . buffer ) ) ) ;
}
function ireport ( url , type , comment ) {
return new Promise ( ( g , b ) => {
fetch ( apiurl + '/api/mypdns/' , {
method : 'POST' ,
mode : 'cors' ,
headers : {
'Content-Type' : 'application/x-www-form-urlencoded'
} ,
body : ( tabOp2 ? 'wdesc&' : '' ) + 'k=' + token + '&cat=' + type + '&url=' + encodeURIComponent ( url ) + ( comment == '' ? '' : '&wmemo=' + encodeURIComponent ( toBinary ( comment ) ) )
} ) . then ( r => r . json ( ) ) . then ( r => {
g ( r ) ;
} ) . catch ( b ) ;
} ) ;
}
function iGetSiteCat ( fqdn ) {
return new Promise ( ( g , b ) => {
fetch ( apiurl + '/api/mypdns/cat/' , {
method : 'POST' ,
mode : 'cors' ,
headers : {
'Content-Type' : 'application/x-www-form-urlencoded'
} ,
body : 'f=' + fqdn
} ) . then ( r => r . json ( ) ) . then ( r => {
g ( r ) ;
} ) . catch ( b ) ;
} ) ;
}
function try _onion ( ) {
return new Promise ( ( g , b ) => {
fetch ( baseurl [ 1 ] + '/api/mypdns/' , {
method : 'GET' ,
mode : 'cors'
} ) . then ( r => r . json ( ) ) . then ( r => {
if ( r . reply ) {
g ( ) ;
} else {
b ( ) ;
}
} ) . catch ( b ) ;
} ) ;
}
function testing _onion ( ) {
browser . storage . local . set ( {
'tryonion' : 1
} ) ;
try _onion ( ) . then ( ( ) => {
browser . storage . local . set ( {
'top3' : 1
} ) ;
apiurl = baseurl [ 1 ] ;
} , ( ) => { } ) ;
}
function reporting ( i , t ) {
if ( i . menuItemId == 'openMass' ) {
browser . tabs . create ( {
active : true ,
url : browser . runtime . getURL ( 'massrep/index.html' )
} ) ;
return ;
}
if ( i . menuItemId == 'searchIt' ) {
browser . tabs . create ( {
active : true ,
url : 'https://mypdns.org/my-privacy-dns/matrix/-/issues?scope=all&sort=created_date&state=opened&search=' + encodeURIComponent ( i . selectionText . trim ( ) )
} ) ;
return ;
}
if ( running ) {
return ;
}
let cattype , url = '' ;
if ( i . menuItemId . startsWith ( 'actPAGE' ) ) {
url = i . pageUrl ;
cattype = i . menuItemId . split ( '_' ) [ 1 ] ;
}
if ( i . menuItemId . startsWith ( 'actLINK' ) ) {
url = i . linkUrl ;
cattype = i . menuItemId . split ( '_' ) [ 1 ] ;
}
if ( ! /^http(|s):\/\/([a-z0-9]{1})([a-z0-9.-]{0,254})\.([a-z]{2,50})(|\/(.*))$/ . test ( url ) ) {
showreply ( 'Sorry' , 'You cannot report this site.' ) ;
return ;
}
let fqdn = ( new URL ( url ) ) . host ;
if ( /^(mypdns\.org|youtube\.com)$/ . test ( fqdn ) ) {
showreply ( 'Sorry' , 'You cannot report this site.' ) ;
return ;
}
if ( token == '' ) {
showreply ( 'Before you begin' , 'Please set your token.' ) ;
browser . runtime . openOptionsPage ( ) ;
return ;
}
running = true ;
showreply ( waitstc [ Math . floor ( Math . random ( ) * waitstc . length ) ] , 'Reporting ' + cattype + ' ' + fqdn + '...' , cattype ) ;
ireport ( url , cattype , i . comment || '' ) . then ( g => {
if ( g . reply ) {
if ( g . reply == 'roger' ) {
showreply ( 'Reported ' + fqdn , url ) ;
} else {
showreply ( 'Reply' , g . reply ) ;
if ( tabOp1 && g . reply . startsWith ( 'Issue for this domain is already exist.' ) ) {
browser . tabs . create ( {
active : true ,
url : 'https://mypdns.org/my-privacy-dns/matrix/-/issues/' + g . issue
} ) ;
}
}
} else {
showreply ( 'Sorry' , 'Something is wrong. Please try again later.' ) ;
}
running = false ;
} , b => {
showreply ( 'Sorry' , 'Unable to connect. Please try again later.' ) ;
running = false ;
} ) ;
}
function reload _menu ( ) {
browser . storage . local . get ( ) . then ( r => {
browser . menus . removeAll ( ) ;
browser . menus . create ( {
id : 'iactLINK' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Report this Link as' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
id : 'iactPAGE' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Report this Page as' ,
contexts : [ 'page' ]
} ) ;
let iLastMenu = '' ;
if ( r . nocat01 != '1' ) {
iLastMenu = '01' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_adware' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Adware' ,
icons : {
'32' : 'i/adware.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_adware' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Adware' ,
icons : {
'32' : 'i/adware.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat02 != '1' ) {
iLastMenu = '02' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_drugs' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Drugs' ,
icons : {
'32' : 'i/drugs.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_drugs' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Drugs' ,
icons : {
'32' : 'i/drugs.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat03 != '1' ) {
iLastMenu = '03' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_gambling' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Gambling' ,
icons : {
'32' : 'i/gambling.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_gambling' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Gambling' ,
icons : {
'32' : 'i/gambling.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat17 != '1' ) {
iLastMenu = '17' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_porngore' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Gore' ,
icons : {
'32' : 'i/porngore.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_porngore' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Gore' ,
icons : {
'32' : 'i/porngore.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat04 != '1' ) {
iLastMenu = '04' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_malicious' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Malicious' ,
icons : {
'32' : 'i/malicious.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_malicious' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Malicious' ,
icons : {
'32' : 'i/malicious.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat05 != '1' ) {
iLastMenu = '05' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_movies' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Movies' ,
icons : {
'32' : 'i/movies.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_movies' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Movies' ,
icons : {
'32' : 'i/movies.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat06 != '1' ) {
iLastMenu = '06' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_news' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'News' ,
icons : {
'32' : 'i/news.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_news' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'News' ,
icons : {
'32' : 'i/news.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat07 != '1' ) {
iLastMenu = '07' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_phishing' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Phishing' ,
icons : {
'32' : 'i/phishing.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_phishing' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Phishing' ,
icons : {
'32' : 'i/phishing.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
2022-09-08 18:15:17 -04:00
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat21 != '1' ) {
iLastMenu = '21' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_pirated' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Pirated' ,
icons : {
'32' : 'i/pirated.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_pirated' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Pirated' ,
icons : {
'32' : 'i/pirated.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat08 != '1' ) {
iLastMenu = '08' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_politics' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Politics' ,
icons : {
'32' : 'i/politics.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_politics' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Politics' ,
icons : {
'32' : 'i/politics.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat09 != '1' ) {
iLastMenu = '09' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_porn' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Porn' ,
icons : {
'32' : 'i/porn.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_porn' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Porn' ,
icons : {
'32' : 'i/porn.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat19 != '1' ) {
iLastMenu = '19' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_pornstrict' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Porn (Strict)' ,
icons : {
'32' : 'i/pornstrict.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_pornstrict' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Porn (Strict)' ,
icons : {
'32' : 'i/pornstrict.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat15 != '1' ) {
iLastMenu = '15' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_redirector' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Url Shortener' ,
icons : {
'32' : 'i/redirector.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_redirector' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Url Shortener' ,
icons : {
'32' : 'i/redirector.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat10 != '1' ) {
iLastMenu = '10' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_religion' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Religion' ,
icons : {
'32' : 'i/religion.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_religion' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Religion' ,
icons : {
'32' : 'i/religion.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat14 != '1' ) {
iLastMenu = '14' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_scamming' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Scamming' ,
icons : {
'32' : 'i/scamming.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_scamming' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Scamming' ,
icons : {
'32' : 'i/scamming.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat18 != '1' ) {
iLastMenu = '18' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_pornsnuff' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Snuff' ,
icons : {
'32' : 'i/pornsnuff.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_pornsnuff' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Snuff' ,
icons : {
'32' : 'i/pornsnuff.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat11 != '1' ) {
iLastMenu = '11' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_spyware' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Spyware' ,
icons : {
'32' : 'i/spyware.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_spyware' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Spyware' ,
icons : {
'32' : 'i/spyware.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat20 != '1' ) {
iLastMenu = '20' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_torrent' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Torrent' ,
icons : {
'32' : 'i/torrent.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_torrent' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Torrent' ,
icons : {
'32' : 'i/torrent.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat12 != '1' ) {
iLastMenu = '12' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_tracking' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Tracking' ,
icons : {
'32' : 'i/tracking.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_tracking' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Tracking' ,
icons : {
'32' : 'i/tracking.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat16 != '1' ) {
iLastMenu = '16' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_typosquatting' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Typo Squatting' ,
icons : {
'32' : 'i/typosquatting.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_typosquatting' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Typo Squatting' ,
icons : {
'32' : 'i/typosquatting.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( r . nocat13 != '1' ) {
iLastMenu = '13' ;
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'actLINK_weapons' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Weapons' ,
icons : {
'32' : 'i/weapons.png'
} ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'actPAGE_weapons' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Weapons' ,
icons : {
'32' : 'i/weapons.png'
} ,
contexts : [ 'page' ]
} ) ;
if ( r . nocat98 != '1' ) {
browser . menus . create ( {
parentId : 'iactLINK' ,
id : 'sepaLink_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'link' ]
} ) ;
browser . menus . create ( {
parentId : 'iactPAGE' ,
id : 'sepaPage_' + iLastMenu ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
type : 'separator' ,
contexts : [ 'page' ]
} ) ;
}
}
if ( iLastMenu == '' ) {
browser . menus . removeAll ( ) ;
}
if ( r . nocat99 == '1' ) {
browser . menus . create ( {
id : 'openMass' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Open Mass Report tool' ,
contexts : [ 'page' ]
} ) ;
}
if ( r . nocat97 == '1' ) {
browser . menus . create ( {
id : 'searchIt' ,
documentUrlPatterns : [ 'http://*/*' , 'https://*/*' ] ,
title : 'Search "%s" on Matrix' ,
contexts : [ 'selection' ]
} ) ;
}
if ( r . nocat96 == '1' ) {
browser . menus . removeAll ( ) ;
}
if ( r . nocat95 == '1' ) {
usePOP = true ;
browser . browserAction . setPopup ( {
popup : 'pop/pop.html'
} ) ;
} else {
usePOP = false ;
browser . browserAction . setPopup ( {
popup : ''
} ) ;
}
} ) ;
}
browser . menus . onClicked . addListener ( reporting ) ;
if ( ! done ) {
done = true ;
browser . storage . local . get ( ) . then ( r => {
apiurl = ( r . top3 != 1 ) ? baseurl [ 0 ] : baseurl [ 1 ] ;
if ( r . token && r . token . length == 20 ) {
token = r . token ;
}
tabOp1 = ( r . top1 == 1 ) ? true : false ;
tabOp2 = ( r . top2 == 1 ) ? true : false ;
lookupCAT = ( r . top8 == 1 ) ? true : false ;
if ( r . tryonion != 1 ) {
setTimeout ( testing _onion , 70000 ) ;
}
usePOP = ( r . nocat95 == 1 ) ? true : false ;
} ) ;
reload _menu ( ) ;
}
browser . browserAction . onClicked . addListener ( ( ) => {
if ( ! usePOP ) {
browser . sidebarAction . close ( ) ;
browser . sidebarAction . open ( ) ;
}
} ) ;
function tUNIX ( ) {
return Math . floor ( Date . now ( ) / 1000 ) ;
}
function update _icon ( tID , tURL = '' ) {
if ( tURL == '' ) {
browser . tabs . query ( {
active : true ,
currentWindow : true
} ) . then ( function ( t ) {
if ( t [ 0 ] ) {
update _icon ( t [ 0 ] . id , t [ 0 ] . url ) ;
}
} ) ;
} else {
if ( ! tID ) {
return ;
}
let _url = new URL ( tURL ) ;
2022-09-01 06:50:11 -04:00
if ( ( _url . protocol != 'https:' && _url . protocol != 'http:' ) || _url . hostname . length < 4 ) {
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
browser . browserAction . setIcon ( {
tabId : tID ,
path : 'icon.png'
} ) ;
browser . browserAction . setTitle ( {
tabId : tID ,
title : null
} ) ;
browser . browserAction . setBadgeText ( {
tabId : tID ,
text : null
} ) ;
return ;
}
let domain = get _realdomain ( _url . hostname ) ;
if ( ! domainCAT [ domain ] ) {
browser . browserAction . setIcon ( {
tabId : tID ,
path : 'icon.png'
} ) ;
browser . browserAction . setTitle ( {
tabId : tID ,
title : null
} ) ;
browser . browserAction . setBadgeText ( {
tabId : tID ,
text : null
} ) ;
return ;
}
let labels = domainCAT [ domain ] [ 2 ] . join ( ', ' ) ;
browser . browserAction . setIcon ( {
tabId : tID ,
path : ( domainCAT [ domain ] [ 1 ] == '' ? 'icon.png' : 'i/' + domainCAT [ domain ] [ 1 ] + '.png' )
} ) ;
browser . browserAction . setTitle ( {
tabId : tID ,
title : labels
} ) ;
if ( /(AdWare|Malicious|Spyware|Tracking)/ . test ( labels ) ) {
browser . browserAction . setBadgeText ( {
tabId : tID ,
text : '!'
} ) ;
} else {
browser . browserAction . setBadgeText ( {
tabId : tID ,
text : null
} ) ;
}
return ;
}
}
function get _realdomain ( w ) {
let wa = w . split ( '.' ) ;
let wa _l = wa . length ;
if ( wa _l < 3 || ( wa _l == 4 && /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/ . test ( w ) ) ) {
return w ;
}
wa . reverse ( ) ;
switch ( wa [ 0 ] ) {
case 'ac' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'mil' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ad' :
if ( wa [ 1 ] == 'nom' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ae' :
if ( [ 'co' , 'net' , 'org' , 'sch' , 'ac' , 'gov' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'aero' :
if ( [ 'accident-investigation' , 'accident-prevention' , 'aerobatic' , 'aeroclub' , 'aerodrome' , 'agents' , 'aircraft' , 'airline' , 'airport' , 'air-surveillance' , 'airtraffic' , 'air-traffic-control' , 'ambulance' , 'amusement' , 'association' , 'author' , 'ballooning' , 'broker' , 'caa' , 'cargo' , 'catering' , 'certification' , 'championship' , 'charter' , 'civilaviation' , 'club' , 'conference' , 'consultant' , 'consulting' , 'control' , 'council' , 'crew' , 'design' , 'dgca' , 'educator' , 'emergency' , 'engine' , 'engineer' , 'entertainment' , 'equipment' , 'exchange' , 'express' , 'federation' , 'flight' , 'freight' , 'fuel' , 'gliding' , 'government' , 'groundhandling' , 'group' , 'hanggliding' , 'homebuilt' , 'insurance' , 'journal' , 'journalist' , 'leasing' , 'logistics' , 'magazine' , 'maintenance' , 'media' , 'microlight' , 'modelling' , 'navigation' , 'parachuting' , 'paragliding' , 'passenger-association' , 'pilot' , 'press' , 'production' , 'recreation' , 'repbody' , 'res' , 'research' , 'rotorcraft' , 'safety' , 'scientist' , 'services' , 'show' , 'skydiving' , 'software' , 'student' , 'trader' , 'trading' , 'trainer' , 'union' , 'workinggroup' , 'works' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'af' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ag' :
if ( [ 'com' , 'net' , 'org' , 'co' , 'nom' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ai' :
if ( [ 'off' , 'com' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'al' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ao' :
if ( [ 'co' , 'ed' , 'it' , 'og' , 'pb' , 'gv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ar' :
if ( [ 'com' , 'edu' , 'gov' , 'gob' , 'int' , 'mil' , 'net' , 'org' , 'tur' , 'musica' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'as' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'at' :
if ( [ 'gv' , 'ac' , 'co' , 'or' , 'priv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'au' :
if ( wa [ 1 ] == 'gov' && wa [ 3 ] != undefined ) {
if ( [ 'act' , 'nsw' , 'nt' , 'qld' , 'sa' , 'tas' , 'vic' , 'wa' ] . includes ( wa [ 2 ] ) ) {
return wa [ 3 ] + '.' + wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
}
} ;
if ( wa [ 1 ] == 'edu' && wa [ 3 ] != undefined ) {
if ( [ 'act' , 'catholic' , 'eq' , 'nsw' , 'nt' , 'sa' , 'tas' , 'vic' , 'wa' ] . includes ( wa [ 2 ] ) ) {
return wa [ 3 ] + '.' + wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
}
} ;
if ( [ 'act' , 'asn' , 'com' , 'conf' , 'csiro' , 'edu' , 'gov' , 'id' , 'info' , 'net' , 'nsw' , 'nt' , 'org' , 'oz' , 'qld' , 'sa' , 'tas' , 'vic' , 'wa' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'aw' :
if ( wa [ 1 ] == 'com' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'az' :
if ( [ 'biz' , 'com' , 'edu' , 'gov' , 'info' , 'int' , 'mil' , 'name' , 'net' , 'org' , 'pp' , 'pro' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ba' :
if ( [ 'co' , 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' , 'rs' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bb' :
if ( [ 'biz' , 'co' , 'com' , 'edu' , 'gov' , 'info' , 'net' , 'org' , 'store' , 'tv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bd' :
if ( [ 'com' , 'edu' , 'ac' , 'net' , 'gov' , 'org' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'be' :
if ( wa [ 1 ] == 'ac' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bf' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bg' :
if ( [ 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bh' :
if ( [ 'com' , 'info' , 'cc' , 'edu' , 'biz' , 'net' , 'org' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bi' :
if ( [ 'ac' , 'co' , 'com' , 'edu' , 'gouv' , 'gov' , 'int' , 'mil' , 'net' , 'or' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bj' :
if ( [ 'asso' , 'barreau' , 'gouv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bm' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bn' :
if ( [ 'com' , 'net' , 'org' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bo' :
if ( [ 'academia' , 'agro' , 'arte' , 'blog' , 'bolivia' , 'ciencia' , 'com' , 'cooperativa' , 'democracia' , 'deporte' , 'ecologia' , 'economia' , 'edu' , 'empresa' , 'gob' , 'gov' , 'indigena' , 'industria' , 'info' , 'int' , 'medicina' , 'mil' , 'movimiento' , 'musica' , 'natural' , 'net' , 'nombre' , 'noticias' , 'org' , 'patria' , 'plurinacional' , 'politica' , 'profesional' , 'pueblo' , 'revista' , 'salud' , 'tecnologia' , 'tksat' , 'transporte' , 'tv' , 'web' , 'wiki' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'br' :
if ( [ '9guacu' , 'abc' , 'adm' , 'adv' , 'agr' , 'aju' , 'am' , 'anani' , 'aparecida' , 'arq' , 'art' , 'ato' , 'b' , 'barueri' , 'belem' , 'bhz' , 'bio' , 'blog' , 'bmd' , 'boavista' , 'bsb' , 'campinagrande' , 'campinas' , 'caxias' , 'cim' , 'cng' , 'cnt' , 'com' , 'contagem' , 'coop' , 'cri' , 'cuiaba' , 'curitiba' , 'def' , 'ecn' , 'eco' , 'edu' , 'emp' , 'eng' , 'esp' , 'etc' , 'eti' , 'far' , 'feira' , 'flog' , 'floripa' , 'fm' , 'fnd' , 'fortal' , 'fot' , 'foz' , 'fst' , 'g12' , 'ggf' , 'goiania' , 'gov' , 'gru' , 'imb' , 'ind' , 'inf' , 'jab' , 'jampa' , 'jdf' , 'joinville' , 'jor' , 'jus' , 'leg' , 'lel' , 'londrina' , 'macapa' , 'maceio' , 'manaus' , 'maringa' , 'mat' , 'med' , 'mil' , 'morena' , 'mp' , 'mus' , 'natal' , 'net' , 'niteroi' , 'nom' , 'not' , 'ntr' , 'odo' , 'ong' , 'org' , 'osasco' , 'palmas' , 'poa' , 'ppg' , 'pro' , 'psc' , 'psi' , 'pvh' , 'qsl' , 'radio' , 'rec' , 'recife' , 'ribeirao' , 'rio' , 'riobranco' , 'riopreto' , 'salvador' , 'sampa' , 'santamaria' , 'santoandre' , 'saobernardo' , 'saogonca' , 'sjc' , 'slg' , 'slz' , 'sorocaba' , 'srv' , 'taxi' , 'teo' , 'the' , 'tmp' , 'trd' , 'tur' , 'tv' , 'udi' , 'vet' , 'vix' , 'vlog' , 'wiki' , 'zlg' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bs' :
if ( [ 'com' , 'net' , 'org' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bt' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bw' :
if ( [ 'org' , 'ac' , 'co' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'by' :
if ( [ 'gov' , 'mil' , 'com' , 'of' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'bz' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'nym' , 'of' , 'org' , 'za' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ca' :
if ( [ 'ab' , 'bc' , 'gc' , 'mb' , 'nb' , 'nf' , 'nl' , 'ns' , 'nt' , 'nu' , 'on' , 'pe' , 'qc' , 'sk' , 'yk' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cd' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ci' :
if ( [ 'ac' , 'asso' , 'co' , 'com' , 'ed' , 'edu' , 'go' , 'gouv' , 'int' , 'md' , 'net' , 'or' , 'org' , 'presse' , 'xn--aroport-bya' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ck' :
if ( [ 'biz' , 'co' , 'edu' , 'gen' , 'gov' , 'info' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cl' :
if ( [ 'gov' , 'gob' , 'co' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cm' :
if ( [ 'co' , 'com' , 'gov' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cn' :
if ( [ 'ac' , 'ah' , 'bj' , 'com' , 'cq' , 'edu' , 'fj' , 'gd' , 'gov' , 'gs' , 'gx' , 'gz' , 'ha' , 'hb' , 'he' , 'hi' , 'hk' , 'hl' , 'hn' , 'jl' , 'js' , 'jx' , 'ln' , 'mil' , 'mo' , 'net' , 'nm' , 'nx' , 'org' , 'qh' , 'sc' , 'sd' , 'sh' , 'sn' , 'sx' , 'tj' , 'tw' , 'xj' , 'xn--55qx5d' , 'xn--io0a7i' , 'xn--od0alg' , 'xz' , 'yn' , 'zj' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'co' :
if ( [ 'arts' , 'com' , 'edu' , 'firm' , 'gov' , 'info' , 'int' , 'mil' , 'net' , 'nom' , 'org' , 'rec' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'com' :
if ( [ 'africa' , 'ar' , 'br' , 'cn' , 'co' , 'de' , 'eu' , 'gb' , 'gr' , 'hu' , 'jpn' , 'kr' , 'mex' , 'no' , 'qc' , 'ru' , 'sa' , 'se' , 'uk' , 'us' , 'uy' , 'za' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cr' :
if ( [ 'ac' , 'co' , 'ed' , 'fi' , 'go' , 'or' , 'sa' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cu' :
if ( [ 'com' , 'edu' , 'org' , 'net' , 'gov' , 'inf' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cw' :
if ( [ 'com' , 'edu' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cx' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'cy' :
if ( [ 'ac' , 'biz' , 'com' , 'ekloges' , 'gov' , 'ltd' , 'name' , 'net' , 'org' , 'parliament' , 'press' , 'pro' , 'tm' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'dm' :
if ( [ 'com' , 'net' , 'org' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'do' :
if ( [ 'art' , 'com' , 'edu' , 'gob' , 'gov' , 'mil' , 'net' , 'org' , 'sld' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'dz' :
if ( [ 'art' , 'asso' , 'com' , 'edu' , 'gov' , 'net' , 'org' , 'pol' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ec' :
if ( [ 'com' , 'edu' , 'fin' , 'gob' , 'gov' , 'info' , 'k12' , 'med' , 'mil' , 'net' , 'org' , 'pro' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ee' :
if ( [ 'aip' , 'com' , 'edu' , 'fie' , 'gov' , 'lib' , 'med' , 'org' , 'pri' , 'riik' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'eg' :
if ( [ 'com' , 'edu' , 'eun' , 'gov' , 'mil' , 'name' , 'net' , 'org' , 'sci' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'es' :
if ( [ 'com' , 'nom' , 'org' , 'gob' , 'edu' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'et' :
if ( [ 'com' , 'gov' , 'org' , 'edu' , 'net' , 'biz' , 'name' , 'info' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'fi' :
if ( wa [ 1 ] == 'aland' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'fj' :
if ( [ 'ac' , 'biz' , 'com' , 'info' , 'mil' , 'name' , 'net' , 'org' , 'pro' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'fr' :
if ( [ 'aeroport' , 'assedic' , 'asso' , 'avocat' , 'avoues' , 'cci' , 'chambagri' , 'chirurgiens-dentistes' , 'com' , 'experts-comptables' , 'geometre-expert' , 'gouv' , 'greta' , 'huissier-justice' , 'medecin' , 'nom' , 'notaires' , 'pharmacien' , 'port' , 'prd' , 'presse' , 'tm' , 'veterinaire' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ge' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' , 'pvt' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gg' :
if ( [ 'co' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gh' :
if ( [ 'com' , 'edu' , 'gov' , 'org' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gi' :
if ( [ 'com' , 'edu' , 'gov' , 'ltd' , 'mod' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gl' :
if ( [ 'co' , 'com' , 'edu' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gn' :
if ( [ 'ac' , 'com' , 'edu' , 'gov' , 'org' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gov' :
if ( [ 'al' , 'alabama' , 'alaska' , 'americansamoa' , 'ar' , 'arizona' , 'arkansas' , 'as' , 'az' , 'ca' , 'co' , 'colorado' , 'ct' , 'dc' , 'de' , 'delaware' , 'ehawaii' , 'fl' , 'florida' , 'ga' , 'georgia' , 'guam' , 'hawaii' , 'ia' , 'idaho' , 'il' , 'illinois' , 'in' , 'indiana' , 'iowa' , 'kansas' , 'kentucky' , 'ks' , 'ky' , 'la' , 'louisiana' , 'ma' , 'maine' , 'maryland' , 'mass' , 'massachusetts' , 'md' , 'mi' , 'michigan' , 'minnesota' , 'mississippi' , 'missouri' , 'mn' , 'mo' , 'montana' , 'ms' , 'mt' , 'nc' , 'nd' , 'ne' , 'nebraska' , 'nevada' , 'newjersey' , 'newmexico' , 'nh' , 'nj' , 'northcarolina' , 'northdakota' , 'nv' , 'ny' , 'ohio' , 'ok' , 'oklahoma' , 'oregon' , 'pa' , 'pennsylvania' , 'pr' , 'rhodeisland' , 'ri' , 'sc' , 'sd' , 'tennessee' , 'texas' , 'tn' , 'utah' , 'vermont' , 'vi' , 'virginia' , 'vt' , 'wa' , 'washington' , 'wi' , 'wisconsin' , 'wv' , 'wy' , 'wyoming' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gp' :
if ( [ 'com' , 'net' , 'mobi' , 'edu' , 'org' , 'asso' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gr' :
if ( [ 'co' , 'com' , 'edu' , 'gov' , 'mil' , 'mod' , 'net' , 'org' , 'sch' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gt' :
if ( [ 'com' , 'edu' , 'net' , 'gob' , 'org' , 'mil' , 'ind' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gu' :
if ( [ 'com' , 'edu' , 'gov' , 'guam' , 'info' , 'net' , 'org' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'gy' :
if ( [ 'co' , 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'hk' :
if ( [ 'com' , 'edu' , 'gov' , 'idv' , 'net' , 'org' , 'xn--55qx5d' , 'xn--ciqpn' , 'xn--gmq050i' , 'xn--gmqw5a' , 'xn--io0a7i' , 'xn--lcvr32d' , 'xn--mk0axi' , 'xn--mxtq1m' , 'xn--od0alg' , 'xn--od0aq3b' , 'xn--tn0ag' , 'xn--uc0atv' , 'xn--uc0ay4a' , 'xn--wcvs22d' , 'xn--zf0avx' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'hn' :
if ( [ 'com' , 'edu' , 'gob' , 'net' , 'org' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'hr' :
if ( [ 'iz' , 'from' , 'name' , 'com' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ht' :
if ( [ 'com' , 'shop' , 'firm' , 'info' , 'adult' , 'net' , 'pro' , 'org' , 'med' , 'art' , 'coop' , 'pol' , 'asso' , 'edu' , 'rel' , 'gouv' , 'perso' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'hu' :
if ( [ '2000' , 'agrar' , 'bolt' , 'casino' , 'city' , 'co' , 'edu' , 'erotica' , 'erotika' , 'film' , 'forum' , 'games' , 'gov' , 'hotel' , 'info' , 'ingatlan' , 'jogasz' , 'konyvelo' , 'lakas' , 'media' , 'mobi' , 'net' , 'news' , 'org' , 'priv' , 'reklam' , 'sex' , 'shop' , 'sport' , 'suli' , 'szex' , 'tm' , 'tozsde' , 'utazas' , 'video' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'id' :
if ( [ 'ac' , 'biz' , 'co' , 'desa' , 'go' , 'mil' , 'my' , 'net' , 'or' , 'ponpes' , 'sch' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ie' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'il' :
if ( [ 'ac' , 'co' , 'gov' , 'idf' , 'k12' , 'muni' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'im' :
if ( [ 'ac' , 'co' , 'com' , 'gov' , 'net' , 'org' , 'ro' , 'tt' , 'tv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'in' :
if ( [ 'ac' , 'co' , 'edu' , 'ernet' , 'firm' , 'gen' , 'gov' , 'ind' , 'mil' , 'net' , 'org' , 'res' , 'nic' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'int' :
if ( wa [ 1 ] == 'eu' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'io' :
if ( wa [ 1 ] == 'com' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'iq' :
if ( [ 'gov' , 'edu' , 'mil' , 'com' , 'org' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ir' :
if ( [ 'ac' , 'co' , 'gov' , 'id' , 'net' , 'org' , 'sch' , 'xn--mgba3a4f16a' , 'xn--mgba3a4fra' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'is' :
if ( [ 'net' , 'com' , 'edu' , 'gov' , 'org' , 'int' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'it' :
if ( [ 'abr' , 'abruzzo' , 'ag' , 'agrigento' , 'al' , 'alessandria' , 'alto-adige' , 'altoadige' , 'an' , 'ancona' , 'andria-barletta-trani' , 'andria-trani-barletta' , 'andriabarlettatrani' , 'andriatranibarletta' , 'ao' , 'aosta' , 'aosta-valley' , 'aostavalley' , 'aoste' , 'ap' , 'aq' , 'aquila' , 'ar' , 'arezzo' , 'ascoli-piceno' , 'ascolipiceno' , 'asti' , 'at' , 'av' , 'avellino' , 'ba' , 'balsan' , 'balsan-sudtirol' , 'balsan-suedtirol' , 'bari' , 'barletta-trani-andria' , 'barlettatraniandria' , 'bas' , 'basilicata' , 'belluno' , 'benevento' , 'bergamo' , 'bg' , 'bi' , 'biella' , 'bl' , 'bn' , 'bo' , 'bologna' , 'bolzano' , 'bolzano-altoadige' , 'bozen' , 'bozen-sudtirol' , 'bozen-suedtirol' , 'br' , 'brescia' , 'brindisi' , 'bs' , 'bt' , 'bulsan' , 'bulsan-sudtirol' , 'bulsan-suedtirol' , 'bz' , 'ca' , 'cagliari' , 'cal' , 'calabria' , 'caltanissetta' , 'cam' , 'campania' , 'campidano-medio' , 'campidanomedio' , 'campobasso' , 'carbonia-iglesias' , 'carboniaiglesias' , 'carrara-massa' , 'carraramassa' , 'caserta' , 'catania' , 'catanzaro' , 'cb' , 'ce' , 'cesena-forli' , 'cesenaforli' , 'ch' , 'chieti' , 'ci' , 'cl' , 'cn' , 'co' , 'como' , 'cosenza' , 'cr' , 'cremona' , 'crotone' , 'cs' , 'ct' , 'cuneo' , 'cz' , 'dell-ogliastra' , 'dellogliastra' , 'edu' , 'emilia-romagna' , 'emiliaromagna' , 'emr' , 'en' , 'enna' , 'fc' , 'fe' , 'fermo' , 'ferrara' , 'fg' , 'fi' , 'firenze' , 'florence' , 'fm' , 'foggia' , 'forli-cesena' , 'forlicesena' , 'fr' , 'friuli-v-giulia' , 'friuli-ve-giulia' , 'friuli-vegiulia' , 'friuli-venezia-giulia' , 'friuli-veneziagiulia' , 'friuli-vgiulia' , 'friuliv-giulia' , 'friulive-giulia' , 'friulivegiulia' , 'friulivenezia-giulia' , 'friuliveneziagiulia' , 'friulivgiulia' , 'frosinone' , 'fvg' , 'ge' , 'genoa' , 'genova' , 'go' , 'gorizia' , 'gov' , 'gr' , 'grosseto' , 'iglesias-carbonia' , 'iglesiascarbonia' , 'im' , 'imperia' , 'is' , 'isernia' , 'kr' , 'la-spezia' , 'laquila' , 'laspezia' , 'latina' , 'laz' , 'lazio' , 'lc' , 'le' , 'lecce' , 'lecco' , 'li' , 'lig' , 'liguria' , 'livorno' , 'lo' , 'lodi' , 'lom' , 'lombardia' , 'lombardy' , 'lt' , 'lu' , 'lucania' , 'lucca' , 'macerata' , 'mantova' , 'mar' , 'marche' , 'massa-carrara' , 'massacarrara' , 'matera' , 'mb' , 'mc' , 'me' , 'medio-campidano' , 'mediocampidano' , 'messina' , 'mi' , 'milan' , 'milano' , 'mn' , 'mo' , 'modena' , 'mol' , 'molise' , 'monza' , 'monza-brianza' , 'monza-e-della-brianza' , 'monzabrianza' , 'monzaebrianza' , 'monzaedellabrianza' , 'ms' , 'mt' , 'na' , 'naples' , 'napoli' , 'no' , 'novara' , 'nu' , 'nuoro' , 'og' , 'ogliastra' , 'olbia-tempio' , 'olbiatempio' , 'or' , 'oristano' , 'ot' , 'pa' , 'padova' , 'padua' , 'palermo' , 'parma' , 'pavia' , 'pc' , 'pd' , 'pe' , 'perugia' , 'pesaro-urbino' , 'pesarourbino' , 'pescara' , 'pg' , 'pi' , 'piacenza' , 'piedmont' , 'piemonte' , 'pisa' , 'pistoia' , 'pmn' , 'pn' , 'po' , 'pordenone' , 'potenza' , 'pr' , 'prato' , 'pt' , 'pu' , 'pug' , 'puglia' , 'pv' , 'pz' , 'ra' , 'ragusa' , 'ravenna' , 'rc' , 're' , 'reggio-calabria' , 'reggio-emilia' , 'reggiocalabria' , 'reggioemilia' , 'rg' , 'ri' , 'rieti' , 'rimini' , 'rm' , 'rn' , 'ro' , 'roma' , 'rome' , 'rovigo' , 'sa' , 'salerno' , 'sar' , 'sardegna' , 'sardinia' , 'sassari' , 'savona' , 'si' , 'sic' , 'sicilia' , 'sicily' , 'siena' , 'siracusa' , 'so' , 'sondrio' , 'sp' , 'sr' , 'ss' , 'suedtirol' , 'sv' , 'ta' , 'taa' , 'taranto' , 'te' , 'tempio-olbia' , 'tempioolbia' , 'teramo' , 'terni' , 'tn' , 'to' , 'torino' , 'tos' , 'toscana' , 'tp' , 'tr' , 'trani-andria-barletta' , 'trani-barletta-andria' , 'traniandriabarletta' , 'tranibarlettaandria' , 'trapani' , 'trentin-sud-tirol' , 'trentin-sudtirol' , 'trentin-sued-tirol' , 'trentin-suedtirol' , 'trentino' , 'trentino-a-adige' , 'trentino-aadige' , 'trentino-alto-adige' , 'trentino-altoadige' , 'trentino-s-tirol' , 'trentino-stirol' , 'trentino-sud-tirol' , 'trentino-sudtirol' , 'trentino-sued-tirol' , 'trentino-suedtirol' , 'trentinoa-adige' , 'trentinoaadige' , 'trentinoalto-adige' , 'trentinoaltoadige' , 'trentinos-tirol' , 'trentinostirol' , 'trentinosud-tirol' , 'trentinosudtirol' , 'trentinosued-tirol' , 'trentinosuedtirol' , 'trentinsud-tirol' , 'trentinsudtirol' , 'trentinsued-tirol' , 'trentinsuedtirol' , 'trento' , 'treviso' , 'trieste' , 'ts' , 'turin' , 'tuscany' , 'tv' , 'ud' , 'udine' , 'umb' , 'umbria' , 'urbino-pesaro' , 'urbinopesaro' , 'va' , 'val-d-aosta' , 'val-daosta' , '
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'je' :
if ( [ 'co' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'jm' :
if ( [ 'com' , 'net' , 'org' , 'edu' , 'gov' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'jo' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'name' , 'net' , 'org' , 'sch' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'jp' :
if ( [ 'ac' , 'ad' , 'aichi' , 'akita' , 'aomori' , 'chiba' , 'co' , 'ed' , 'ehime' , 'fukui' , 'fukuoka' , 'fukushima' , 'gifu' , 'go' , 'gr' , 'gunma' , 'hiroshima' , 'hokkaido' , 'hyogo' , 'ibaraki' , 'ishikawa' , 'iwate' , 'kagawa' , 'kagoshima' , 'kanagawa' , 'kochi' , 'kumamoto' , 'kyoto' , 'lg' , 'mie' , 'miyagi' , 'miyazaki' , 'nagano' , 'nagasaki' , 'nara' , 'ne' , 'niigata' , 'oita' , 'okayama' , 'okinawa' , 'or' , 'osaka' , 'saga' , 'saitama' , 'shiga' , 'shimane' , 'shizuoka' , 'tochigi' , 'tokushima' , 'tokyo' , 'tottori' , 'toyama' , 'wakayama' , 'xn--0trq7p7nn' , 'xn--1ctwo' , 'xn--1lqs03n' , 'xn--1lqs71d' , 'xn--2m4a15e' , 'xn--32vp30h' , 'xn--4it168d' , 'xn--4it797k' , 'xn--4pvxs' , 'xn--5js045d' , 'xn--5rtp49c' , 'xn--5rtq34k' , 'xn--6btw5a' , 'xn--6orx2r' , 'xn--7t0a264c' , 'xn--8ltr62k' , 'xn--8pvr4u' , 'xn--c3s14m' , 'xn--d5qv7z876c' , 'xn--djrs72d6uy' , 'xn--djty4k' , 'xn--efvn9s' , 'xn--ehqz56n' , 'xn--elqq16h' , 'xn--f6qx53a' , 'xn--k7yn95e' , 'xn--kbrq7o' , 'xn--klt787d' , 'xn--kltp7d' , 'xn--kltx9a' , 'xn--klty5x' , 'xn--mkru45i' , 'xn--nit225k' , 'xn--ntso0iqx3a' , 'xn--ntsq17g' , 'xn--pssu33l' , 'xn--qqqt11m' , 'xn--rht27z' , 'xn--rht3d' , 'xn--rht61e' , 'xn--rny31h' , 'xn--tor131o' , 'xn--uist22h' , 'xn--uisz3g' , 'xn--uuwu58a' , 'xn--vgu402c' , 'xn--zbx025d' , 'yamagata' , 'yamaguchi' , 'yamanashi' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ke' :
if ( [ 'ac' , 'co' , 'go' , 'info' , 'me' , 'mobi' , 'ne' , 'or' , 'sc' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kg' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kh' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' , 'per' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ki' :
if ( [ 'edu' , 'biz' , 'net' , 'org' , 'gov' , 'info' , 'com' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'km' :
if ( [ 'org' , 'nom' , 'gov' , 'prd' , 'tm' , 'edu' , 'mil' , 'ass' , 'com' , 'coop' , 'asso' , 'presse' , 'medecin' , 'notaires' , 'pharmaciens' , 'veterinaire' , 'gouv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kn' :
if ( [ 'net' , 'org' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kp' :
if ( [ 'com' , 'edu' , 'gov' , 'org' , 'rep' , 'tra' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kr' :
if ( [ 'ac' , 'busan' , 'cheju' , 'chonbuk' , 'chonnam' , 'chungbuk' , 'chungnam' , 'co' , 'daegu' , 'daejeon' , 'es' , 'gangwon' , 'go' , 'gwangju' , 'gyeongbuk' , 'gyeonggi' , 'gyeongnam' , 'hs' , 'incheon' , 'inchon' , 'jeju' , 'jeonbuk' , 'jeonnam' , 'kangwon' , 'kg' , 'kwangju' , 'kyongbuk' , 'kyonggi' , 'kyongnam' , 'mil' , 'ms' , 'ne' , 'nm' , 'or' , 'pe' , 'pusan' , 're' , 'sc' , 'seoul' , 'taegu' , 'taejon' , 'ulsan' , 'xn--bj0bj06e' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kw' :
if ( [ 'com' , 'edu' , 'emb' , 'gov' , 'ind' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ky' :
if ( [ 'edu' , 'gov' , 'com' , 'org' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'kz' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'la' :
if ( [ 'int' , 'net' , 'info' , 'edu' , 'gov' , 'per' , 'com' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'lb' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'lc' :
if ( [ 'com' , 'net' , 'co' , 'org' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'lk' :
if ( [ 'ac' , 'assn' , 'com' , 'edu' , 'gov' , 'grp' , 'hotel' , 'int' , 'ltd' , 'net' , 'ngo' , 'org' , 'sch' , 'soc' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'lr' :
if ( [ 'com' , 'edu' , 'gov' , 'org' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ls' :
if ( [ 'ac' , 'co' , 'gov' , 'net' , 'nul' , 'org' , 'parliament' , 'quadrant' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'lt' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'lv' :
if ( [ 'asn' , 'com' , 'conf' , 'edu' , 'gov' , 'id' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ly' :
if ( [ 'com' , 'edu' , 'gov' , 'id' , 'med' , 'net' , 'org' , 'plc' , 'sch' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ma' :
if ( [ 'ac' , 'co' , 'gov' , 'net' , 'org' , 'press' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mc' :
if ( [ 'tm' , 'asso' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'me' :
if ( [ 'co' , 'net' , 'org' , 'edu' , 'ac' , 'gov' , 'its' , 'priv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mg' :
if ( [ 'org' , 'nom' , 'gov' , 'prd' , 'tm' , 'edu' , 'mil' , 'com' , 'co' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mk' :
if ( [ 'com' , 'edu' , 'gov' , 'inf' , 'name' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ml' :
if ( [ 'com' , 'edu' , 'gouv' , 'gov' , 'net' , 'org' , 'presse' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mm' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mn' :
if ( [ 'gov' , 'edu' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mo' :
if ( [ 'com' , 'net' , 'org' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mr' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ms' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mt' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mu' :
if ( [ 'ac' , 'co' , 'com' , 'gov' , 'net' , 'or' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'museum' :
if ( [ 'academy' , 'agriculture' , 'air' , 'airguard' , 'alabama' , 'alaska' , 'amber' , 'ambulance' , 'american' , 'americana' , 'americanantiques' , 'americanart' , 'amsterdam' , 'and' , 'annefrank' , 'anthro' , 'anthropology' , 'antiques' , 'aquarium' , 'arboretum' , 'archaeological' , 'archaeology' , 'architecture' , 'art' , 'artanddesign' , 'artcenter' , 'artdeco' , 'arteducation' , 'artgallery' , 'arts' , 'artsandcrafts' , 'asmatart' , 'assassination' , 'assisi' , 'association' , 'astronomy' , 'atlanta' , 'austin' , 'australia' , 'automotive' , 'aviation' , 'axis' , 'badajoz' , 'baghdad' , 'bahn' , 'bale' , 'baltimore' , 'barcelona' , 'baseball' , 'basel' , 'baths' , 'bauern' , 'beauxarts' , 'beeldengeluid' , 'bellevue' , 'bergbau' , 'berkeley' , 'berlin' , 'bern' , 'bible' , 'bilbao' , 'bill' , 'birdart' , 'birthplace' , 'bonn' , 'boston' , 'botanical' , 'botanicalgarden' , 'botanicgarden' , 'botany' , 'brandywinevalley' , 'brasil' , 'bristol' , 'british' , 'britishcolumbia' , 'broadcast' , 'brunel' , 'brussel' , 'brussels' , 'bruxelles' , 'building' , 'burghof' , 'bus' , 'bushey' , 'cadaques' , 'california' , 'cambridge' , 'can' , 'canada' , 'capebreton' , 'carrier' , 'cartoonart' , 'casadelamoneda' , 'castle' , 'castres' , 'celtic' , 'center' , 'chattanooga' , 'cheltenham' , 'chesapeakebay' , 'chicago' , 'children' , 'childrens' , 'childrensgarden' , 'chiropractic' , 'chocolate' , 'christiansburg' , 'cincinnati' , 'cinema' , 'circus' , 'civilisation' , 'civilization' , 'civilwar' , 'clinton' , 'clock' , 'coal' , 'coastaldefence' , 'cody' , 'coldwar' , 'collection' , 'colonialwilliamsburg' , 'coloradoplateau' , 'columbia' , 'columbus' , 'communication' , 'communications' , 'community' , 'computer' , 'computerhistory' , 'comunicações' , 'contemporary' , 'contemporaryart' , 'convent' , 'copenhagen' , 'corporation' , 'correios-e-telecomunicações' , 'corvette' , 'costume' , 'countryestate' , 'county' , 'crafts' , 'cranbrook' , 'creation' , 'cultural' , 'culturalcenter' , 'culture' , 'cyber' , 'cymru' , 'dali' , 'dallas' , 'database' , 'ddr' , 'decorativearts' , 'delaware' , 'delmenhorst' , 'denmark' , 'depot' , 'design' , 'detroit' , 'dinosaur' , 'discovery' , 'dolls' , 'donostia' , 'durham' , 'eastafrica' , 'eastcoast' , 'education' , 'educational' , 'egyptian' , 'eisenbahn' , 'elburg' , 'elvendrell' , 'embroidery' , 'encyclopedic' , 'england' , 'entomology' , 'environment' , 'environmentalconservation' , 'epilepsy' , 'essex' , 'estate' , 'ethnology' , 'exeter' , 'exhibition' , 'family' , 'farm' , 'farmequipment' , 'farmers' , 'farmstead' , 'field' , 'figueres' , 'filatelia' , 'film' , 'fineart' , 'finearts' , 'finland' , 'flanders' , 'florida' , 'force' , 'fortmissoula' , 'fortworth' , 'foundation' , 'francaise' , 'frankfurt' , 'franziskaner' , 'freemasonry' , 'freiburg' , 'fribourg' , 'frog' , 'fundacio' , 'furniture' , 'gallery' , 'garden' , 'gateway' , 'geelvinck' , 'gemological' , 'geology' , 'georgia' , 'giessen' , 'glas' , 'glass' , 'gorge' , 'grandrapids' , 'graz' , 'guernsey' , 'halloffame' , 'hamburg' , 'handson' , 'harvestcelebration' , 'hawaii' , 'health' , 'heimatunduhren' , 'hellas' , 'helsinki' , 'hembygdsforbund' , 'heritage' , 'histoire' , 'historical' , 'historicalsociety' , 'historichouses' , 'historisch' , 'historisches' , 'history' , 'historyofscience' , 'horology' , 'house' , 'humanities' , 'illustration' , 'imageandsound' , 'indian' , 'indiana' , 'indianapolis' , 'indianmarket' , 'intelligence' , 'interactive' , 'iraq' , 'iron' , 'isleofman' , 'jamison' , 'jefferson' , 'jerusalem' , 'jewelry' , 'jewish' , 'jewishart' , 'jfk' , 'journalism' , 'judaica' , 'judygarland' , 'juedisches' , 'juif' , 'karate' , 'karikatur' , 'kids' , 'koebenhavn' , 'koeln' , 'kunst' , 'kunstsammlung' , 'kunstunddesign' , 'labor' , 'labour' , 'lajolla' , 'lancashire' , 'landes' , 'lans' , 'larsson' , 'lewismiller' , 'lincoln' , 'linz' , 'living' , 'livinghistory' , 'localhistory' , 'london' , 'losangeles' , 'louvre' , 'loyalist' , 'lucerne' , 'luxembourg' , 'luzern' , 'läns' , 'mad' , 'madrid' , 'mallorca' , 'manchester' , 'mansion' , 'mansions' , 'manx' , 'marburg' , 'maritime' , 'maritimo' , 'maryland' , 'marylhurst' , 'media' , 'medical' , 'medizinhistorisches' , 'meeres' , 'memorial' , 'mesaverde' , 'michigan' , 'midatlantic' , 'military' , 'mill' , 'miners' , 'mining' , 'minnesota' , 'missile' , 'missoula' , 'modern' , ' m
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mv' :
if ( [ 'aero' , 'biz' , 'com' , 'coop' , 'edu' , 'gov' , 'info' , 'int' , 'mil' , 'museum' , 'name' , 'net' , 'org' , 'pro' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mw' :
if ( [ 'ac' , 'biz' , 'co' , 'com' , 'coop' , 'edu' , 'gov' , 'int' , 'museum' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mx' :
if ( [ 'com' , 'edu' , 'gob' , 'net' , 'ngo' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'my' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'name' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'mz' :
if ( [ 'co' , 'net' , 'org' , 'ac' , 'gov' , 'edu' , 'mil' , 'adv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'na' :
if ( [ 'info' , 'pro' , 'name' , 'school' , 'or' , 'dr' , 'us' , 'mx' , 'ca' , 'in' , 'cc' , 'tv' , 'ws' , 'mobi' , 'co' , 'com' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'name' :
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
break ;
case 'nc' :
if ( [ 'asso' , 'nom' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'net' :
if ( [ 'gb' , 'hu' , 'in' , 'jp' , 'ru' , 'se' , 'uk' , 'za' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'nf' :
if ( [ 'arts' , 'com' , 'firm' , 'info' , 'net' , 'other' , 'per' , 'rec' , 'store' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ng' :
if ( [ 'com' , 'edu' , 'gov' , 'i' , 'mil' , 'mobi' , 'name' , 'net' , 'org' , 'sch' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ni' :
if ( [ 'ac' , 'biz' , 'co' , 'com' , 'edu' , 'gob' , 'in' , 'info' , 'int' , 'mil' , 'net' , 'nom' , 'org' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'nl' :
if ( wa [ 1 ] == 'bv' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'no' :
if ( [ 'aa' , 'aarborte' , 'aejrie' , 'afjord' , 'agdenes' , 'ah' , 'aknoluokta' , 'akrehamn' , 'al' , 'alaheadju' , 'alesund' , 'algard' , 'alstahaug' , 'alta' , 'alvdal' , 'amli' , 'amot' , 'andasuolo' , 'andebu' , 'andoy' , 'ardal' , 'aremark' , 'arendal' , 'arna' , 'aseral' , 'asker' , 'askim' , 'askoy' , 'askvoll' , 'asnes' , 'audnedaln' , 'aukra' , 'aure' , 'aurland' , 'austevoll' , 'austrheim' , 'averoy' , 'badaddja' , 'bahcavuotna' , 'bahccavuotna' , 'baidar' , 'bajddar' , 'balat' , 'balestrand' , 'ballangen' , 'balsfjord' , 'bamble' , 'bardu' , 'barum' , 'batsfjord' , 'bearalvahki' , 'beardu' , 'beiarn' , 'berg' , 'bergen' , 'berlevag' , 'bievat' , 'bindal' , 'birkenes' , 'bjarkoy' , 'bjerkreim' , 'bjugn' , 'bodo' , 'bokn' , 'bomlo' , 'bremanger' , 'bronnoy' , 'bronnoysund' , 'brumunddal' , 'bryne' , 'bu' , 'budejju' , 'bygland' , 'bykle' , 'cahcesuolo' , 'davvenjarga' , 'davvesiida' , 'deatnu' , 'dep' , 'dielddanuorri' , 'divtasvuodna' , 'divttasvuotna' , 'donna' , 'dovre' , 'drammen' , 'drangedal' , 'drobak' , 'dyroy' , 'egersund' , 'eid' , 'eidfjord' , 'eidsberg' , 'eidskog' , 'eidsvoll' , 'eigersund' , 'elverum' , 'enebakk' , 'engerdal' , 'etne' , 'etnedal' , 'evenassi' , 'evenes' , 'farsund' , 'fauske' , 'fedje' , 'fet' , 'fetsund' , 'fhs' , 'finnoy' , 'fitjar' , 'fjaler' , 'fjell' , 'fla' , 'flakstad' , 'flatanger' , 'flekkefjord' , 'flesberg' , 'flora' , 'floro' , 'fm' , 'folkebibl' , 'folldal' , 'forde' , 'forsand' , 'fosnes' , 'frana' , 'fredrikstad' , 'frei' , 'frogn' , 'froland' , 'frosta' , 'froya' , 'fuoisku' , 'fuossko' , 'fusa' , 'fylkesbibl' , 'fyresdal' , 'gaivuotna' , 'galsa' , 'gamvik' , 'gangaviika' , 'gaular' , 'gausdal' , 'giehtavuoatna' , 'gildeskal' , 'giske' , 'gjemnes' , 'gjerdrum' , 'gjerstad' , 'gjesdal' , 'gjovik' , 'gloppen' , 'gol' , 'gran' , 'grane' , 'granvin' , 'gratangen' , 'grimstad' , 'grong' , 'grue' , 'gulen' , 'guovdageaidnu' , 'ha' , 'habmer' , 'hadsel' , 'hagebostad' , 'halden' , 'halsa' , 'hamar' , 'hamaroy' , 'hammarfeasta' , 'hammerfest' , 'hapmir' , 'haram' , 'hareid' , 'harstad' , 'hasvik' , 'hattfjelldal' , 'haugesund' , 'hemne' , 'hemnes' , 'hemsedal' , 'herad' , 'hitra' , 'hjartdal' , 'hjelmeland' , 'hl' , 'hm' , 'hobol' , 'hof' , 'hokksund' , 'hol' , 'hole' , 'holmestrand' , 'holtalen' , 'honefoss' , 'hornindal' , 'horten' , 'hoyanger' , 'hoylandet' , 'hurdal' , 'hurum' , 'hvaler' , 'hyllestad' , 'ibestad' , 'idrett' , 'inderoy' , 'iveland' , 'ivgu' , 'jessheim' , 'jevnaker' , 'jolster' , 'jondal' , 'jorpeland' , 'kafjord' , 'karasjohka' , 'karasjok' , 'karlsoy' , 'karmoy' , 'kautokeino' , 'kirkenes' , 'klabu' , 'klepp' , 'kommune' , 'kongsberg' , 'kongsvinger' , 'kopervik' , 'kraanghke' , 'kragero' , 'kristiansand' , 'kristiansund' , 'krodsherad' , 'krokstadelva' , 'kvafjord' , 'kvalsund' , 'kvam' , 'kvanangen' , 'kvinesdal' , 'kvinnherad' , 'kviteseid' , 'kvitsoy' , 'laakesvuemie' , 'lahppi' , 'langevag' , 'lardal' , 'larvik' , 'lavagis' , 'lavangen' , 'leangaviika' , 'lebesby' , 'leikanger' , 'leirfjord' , 'leirvik' , 'leka' , 'leksvik' , 'lenvik' , 'lerdal' , 'lesja' , 'levanger' , 'lier' , 'lierne' , 'lillehammer' , 'lillesand' , 'lindas' , 'lindesnes' , 'loabat' , 'lodingen' , 'lom' , 'loppa' , 'lorenskog' , 'loten' , 'lund' , 'lunner' , 'luroy' , 'luster' , 'lyngdal' , 'lyngen' , 'malatvuopmi' , 'malselv' , 'malvik' , 'mandal' , 'marker' , 'marnardal' , 'masfjorden' , 'masoy' , 'meland' , 'meldal' , 'melhus' , 'meloy' , 'meraker' , 'midsund' , 'mil' , 'mjondalen' , 'moareke' , 'modalen' , 'modum' , 'molde' , 'mosjoen' , 'moskenes' , 'moss' , 'mosvik' , 'mr' , 'muosat' , 'museum' , 'naamesjevuemie' , 'namdalseid' , 'namsos' , 'namsskogan' , 'nannestad' , 'naroy' , 'narviika' , 'narvik' , 'naustdal' , 'navuotna' , 'nesna' , 'nesodden' , 'nesoddtangen' , 'nesseby' , 'nesset' , 'nissedal' , 'nittedal' , 'nl' , 'norddal' , 'nordkapp' , 'nordreisa' , 'notodden' , 'notteroy' , 'nt' , 'odda' , 'of' , 'oksnes' , 'ol' , 'omasvuotna' , 'oppdal' , 'oppegard' , 'orkanger' , 'orkdal' , 'orland' , 'orskog' , 'orsta' , 'osen' , 'oslo' , 'osoyro' , 'osteroy' , 'overhalla' , 'oyer' , 'oygarden' , 'porsanger' , 'porsangu' , 'porsgrunn' , 'priv' , 'rade' , 'radoy' , 'rahkkeravju' , 'raholt' , 'raisa' , 'rakkestad' , 'ralingen' , 'rana' , 'randaberg' , 'rauma' , 'rendalen' , 'rennebu' , 'rennesoy' , 'rindal' , 'ringebu' , 'ringerike' , 'ringsaker' , 'risor' , 'rissa' , 'rl' , 'roan' , 'rodoy' , 'rollag' , 'romsa' , 'romskog' , 'roros' ,
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'np' :
if ( [ 'aero' , 'asia' , 'biz' , 'com' , 'coop' , 'edu' , 'gov' , 'info' , 'jobs' , 'mil' , 'mobi' , 'museum' , 'name' , 'net' , 'org' , 'pro' , 'travel' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'nr' :
if ( [ 'biz' , 'com' , 'edu' , 'gov' , 'info' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'nz' :
if ( [ 'ac' , 'archie' , 'co' , 'cri' , 'geek' , 'gen' , 'govt' , 'health' , 'iwi' , 'kiwi' , 'maori' , 'mil' , 'net' , 'org' , 'parliament' , 'school' , 'xn--mori-qsa' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'om' :
if ( [ 'co' , 'com' , 'edu' , 'gov' , 'med' , 'museum' , 'net' , 'org' , 'pro' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'org' :
if ( wa [ 1 ] == 'eu' && wa [ 3 ] != undefined ) {
if ( [ 'al' , 'asso' , 'at' , 'au' , 'be' , 'bg' , 'ca' , 'cd' , 'ch' , 'cn' , 'cy' , 'cz' , 'de' , 'dk' , 'edu' , 'ee' , 'es' , 'fi' , 'fr' , 'gr' , 'hr' , 'hu' , 'ie' , 'il' , 'in' , 'int' , 'is' , 'it' , 'jp' , 'kr' , 'lt' , 'lu' , 'lv' , 'me' , 'mk' , 'mt' , 'my' , 'net' , 'ng' , 'nl' , 'no' , 'nz' , 'pl' , 'pt' , 'ro' , 'ru' , 'se' , 'si' , 'sk' , 'tr' , 'uk' , 'us' ] . includes ( wa [ 2 ] ) ) {
return wa [ 3 ] + '.' + wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
}
} ;
if ( [ 'ae' , 'eu' , 'hk' , 'jpn' , 'js' , 'us' , 'za' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pa' :
if ( [ 'abo' , 'ac' , 'com' , 'edu' , 'gob' , 'ing' , 'med' , 'net' , 'nom' , 'org' , 'sld' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pe' :
if ( [ 'com' , 'edu' , 'gob' , 'mil' , 'net' , 'nom' , 'org' , 'sld' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pf' :
if ( [ 'com' , 'org' , 'edu' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pg' :
if ( [ 'com' , 'net' , 'ac' , 'gov' , 'mil' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ph' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' , 'ngo' , 'i' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pk' :
if ( [ 'biz' , 'com' , 'edu' , 'fam' , 'gob' , 'gok' , 'gon' , 'gop' , 'gos' , 'gov' , 'info' , 'net' , 'org' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pl' :
if ( [ 'agro' , 'aid' , 'art' , 'atm' , 'augustow' , 'auto' , 'babia-gora' , 'bedzin' , 'beskidy' , 'bialowieza' , 'bialystok' , 'bielawa' , 'bieszczady' , 'biz' , 'boleslawiec' , 'bydgoszcz' , 'bytom' , 'cieszyn' , 'com' , 'czeladz' , 'czest' , 'dlugoleka' , 'edu' , 'elblag' , 'elk' , 'gda' , 'gdansk' , 'glogow' , 'gmina' , 'gniezno' , 'gorlice' , 'gov' , 'grajewo' , 'gsm' , 'ilawa' , 'info' , 'jaworzno' , 'jelenia-gora' , 'jgora' , 'kalisz' , 'karpacz' , 'kartuzy' , 'kaszuby' , 'katowice' , 'kazimierz-dolny' , 'kepno' , 'ketrzyn' , 'klodzko' , 'kobierzyce' , 'kolobrzeg' , 'konin' , 'konskowola' , 'krakow' , 'kutno' , 'lapy' , 'lebork' , 'legnica' , 'lezajsk' , 'limanowa' , 'lodz' , 'lomza' , 'lowicz' , 'lubin' , 'lublin' , 'lukow' , 'mail' , 'malbork' , 'malopolska' , 'mazowsze' , 'mazury' , 'media' , 'miasta' , 'mielec' , 'mielno' , 'mil' , 'mragowo' , 'naklo' , 'net' , 'ngo' , 'nieruchomosci' , 'nom' , 'nowaruda' , 'nysa' , 'olawa' , 'olecko' , 'olkusz' , 'olsztyn' , 'opoczno' , 'opole' , 'org' , 'ostroda' , 'ostroleka' , 'ostrowiec' , 'ostrowwlkp' , 'pc' , 'pila' , 'pisz' , 'podhale' , 'podlasie' , 'polkowice' , 'pomorskie' , 'pomorze' , 'powiat' , 'poznan' , 'priv' , 'prochowice' , 'pruszkow' , 'przeworsk' , 'pulawy' , 'radom' , 'rawa-maz' , 'realestate' , 'rel' , 'rybnik' , 'rzeszow' , 'sanok' , 'sejny' , 'sex' , 'shop' , 'sklep' , 'skoczow' , 'slask' , 'slupsk' , 'sos' , 'sosnowiec' , 'stalowa-wola' , 'starachowice' , 'stargard' , 'suwalki' , 'swidnica' , 'swiebodzin' , 'swinoujscie' , 'szczecin' , 'szczytno' , 'szkola' , 'targi' , 'tarnobrzeg' , 'tgory' , 'tm' , 'torun' , 'tourism' , 'travel' , 'turek' , 'turystyka' , 'tychy' , 'ustka' , 'walbrzych' , 'warmia' , 'warszawa' , 'waw' , 'wegrow' , 'wielun' , 'wlocl' , 'wloclawek' , 'wodzislaw' , 'wolomin' , 'wroc' , 'wroclaw' , 'zachpomor' , 'zagan' , 'zarow' , 'zgora' , 'zgorzelec' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pn' :
if ( [ 'in' , 'co' , 'eu' , 'org' , 'net' , 'me' , 'edu' , 'gov' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pr' :
if ( [ 'ac' , 'biz' , 'com' , 'edu' , 'est' , 'gov' , 'info' , 'isla' , 'name' , 'net' , 'org' , 'pro' , 'prof' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pro' :
if ( [ 'aaa' , 'aca' , 'acct' , 'eng' , 'avocat' , 'bar' , 'jur' , 'recht' , 'law' , 'med' , 'cpa' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ps' :
if ( [ 'edu' , 'gov' , 'sec' , 'plo' , 'com' , 'org' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pt' :
if ( [ 'com' , 'edu' , 'gov' , 'int' , 'net' , 'nome' , 'org' , 'publ' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'pw' :
if ( [ 'co' , 'ne' , 'or' , 'ed' , 'go' , 'belau' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'py' :
if ( [ 'com' , 'coop' , 'edu' , 'mil' , 'gov' , 'org' , 'net' , 'una' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'qa' :
if ( [ 'com' , 'edu' , 'sch' , 'gov' , 'mil' , 'net' , 'org' , 'name' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 're' :
if ( [ 'asso' , 'com' , 'nom' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ro' :
if ( [ 'arts' , 'com' , 'firm' , 'info' , 'nom' , 'nt' , 'org' , 'rec' , 'store' , 'tm' , 'www' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'rs' :
if ( [ 'ac' , 'co' , 'edu' , 'gov' , 'in' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ru' :
if ( [ 'ac' , 'adygeya' , 'altai' , 'amur' , 'amursk' , 'arkhangelsk' , 'astrakhan' , 'baikal' , 'bashkiria' , 'belgorod' , 'bir' , 'bryansk' , 'buryatia' , 'cap' , 'cbg' , 'chel' , 'chelyabinsk' , 'chita' , 'chukotka' , 'cmw' , 'com' , 'dagestan' , 'e-burg' , 'edu' , 'fareast' , 'gov' , 'grozny' , 'int' , 'irkutsk' , 'ivanovo' , 'izhevsk' , 'jamal' , 'jar' , 'joshkar-ola' , 'k-uralsk' , 'kalmykia' , 'kaluga' , 'kamchatka' , 'karelia' , 'kazan' , 'kchr' , 'kemerovo' , 'khabarovsk' , 'khakassia' , 'khv' , 'kirov' , 'kms' , 'koenig' , 'komi' , 'kostroma' , 'krasnoyarsk' , 'kuban' , 'kurgan' , 'kursk' , 'kustanai' , 'kuzbass' , 'lipetsk' , 'magadan' , 'magnitka' , 'mari' , 'mari-el' , 'marine' , 'mil' , 'mordovia' , 'mos' , 'mosreg' , 'msk' , 'murmansk' , 'mytis' , 'nakhodka' , 'nalchik' , 'net' , 'nkz' , 'nnov' , 'norilsk' , 'nov' , 'novosibirsk' , 'nsk' , 'omsk' , 'orenburg' , 'org' , 'oryol' , 'oskol' , 'palana' , 'penza' , 'perm' , 'pp' , 'pskov' , 'ptz' , 'pyatigorsk' , 'rnd' , 'rubtsovsk' , 'ryazan' , 'sakhalin' , 'samara' , 'saratov' , 'simbirsk' , 'smolensk' , 'snz' , 'spb' , 'stavropol' , 'stv' , 'surgut' , 'syzran' , 'tambov' , 'tatarstan' , 'test' , 'tlt' , 'tom' , 'tomsk' , 'tsaritsyn' , 'tsk' , 'tula' , 'tuva' , 'tver' , 'tyumen' , 'udm' , 'udmurtia' , 'ulan-ude' , 'vdonsk' , 'vladikavkaz' , 'vladimir' , 'vladivostok' , 'volgograd' , 'vologda' , 'voronezh' , 'vrn' , 'vyatka' , 'yakutia' , 'yamal' , 'yaroslavl' , 'yekaterinburg' , 'yuzhno-sakhalinsk' , 'zgrad' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'rw' :
if ( [ 'gov' , 'net' , 'edu' , 'ac' , 'com' , 'co' , 'int' , 'mil' , 'gouv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sa' :
if ( [ 'com' , 'edu' , 'gov' , 'med' , 'net' , 'org' , 'pub' , 'sch' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sb' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sc' :
if ( [ 'com' , 'edu' , 'gov' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sd' :
if ( [ 'com' , 'edu' , 'gov' , 'info' , 'med' , 'net' , 'org' , 'tv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'se' :
if ( [ 'a' , 'ac' , 'b' , 'bd' , 'brand' , 'c' , 'd' , 'e' , 'f' , 'fh' , 'fhsk' , 'fhv' , 'g' , 'h' , 'i' , 'k' , 'komforb' , 'kommunalforbund' , 'komvux' , 'l' , 'lanbib' , 'm' , 'n' , 'naturbruksgymn' , 'o' , 'org' , 'p' , 'parti' , 'pp' , 'press' , 'r' , 's' , 't' , 'tm' , 'u' , 'w' , 'x' , 'y' , 'z' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sg' :
if ( [ 'com' , 'edu' , 'gov' , 'idn' , 'net' , 'org' , 'per' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sh' :
if ( [ 'com' , 'net' , 'gov' , 'org' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sl' :
if ( [ 'com' , 'net' , 'edu' , 'gov' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sn' :
if ( [ 'art' , 'com' , 'edu' , 'gouv' , 'org' , 'perso' , 'univ' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'so' :
if ( [ 'com' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'st' :
if ( [ 'co' , 'com' , 'consulado' , 'edu' , 'embaixada' , 'gov' , 'mil' , 'net' , 'org' , 'principe' , 'saotome' , 'store' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sv' :
if ( [ 'edu' , 'gov' , 'com' , 'org' , 'red' , 'gob' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sx' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sy' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'sz' :
if ( [ 'co' , 'ac' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'th' :
if ( [ 'ac' , 'co' , 'go' , 'in' , 'mi' , 'net' , 'or' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tj' :
if ( [ 'ac' , 'aero' , 'biz' , 'co' , 'com' , 'coop' , 'dyn' , 'edu' , 'go' , 'gov' , 'info' , 'int' , 'mil' , 'museum' , 'my' , 'name' , 'net' , 'nic' , 'org' , 'per' , 'pro' , 'test' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tl' :
if ( wa [ 1 ] == 'gov' ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tm' :
if ( [ 'com' , 'co' , 'org' , 'net' , 'nom' , 'gov' , 'mil' , 'edu' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tn' :
if ( [ 'agrinet' , 'com' , 'defense' , 'edunet' , 'ens' , 'fin' , 'gov' , 'ind' , 'info' , 'intl' , 'mincom' , 'nat' , 'net' , 'org' , 'perso' , 'rnrt' , 'rns' , 'rnu' , 'tourism' , 'turen' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'to' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tr' :
if ( [ 'av' , 'bbs' , 'bel' , 'biz' , 'com' , 'dr' , 'edu' , 'gen' , 'gov' , 'info' , 'k12' , 'kep' , 'mil' , 'name' , 'nc' , 'net' , 'org' , 'pol' , 'tel' , 'tv' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tt' :
if ( [ 'co' , 'com' , 'org' , 'net' , 'biz' , 'info' , 'pro' , 'int' , 'coop' , 'jobs' , 'mobi' , 'travel' , 'museum' , 'aero' , 'name' , 'gov' , 'edu' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tw' :
if ( [ 'club' , 'com' , 'ebiz' , 'edu' , 'game' , 'gov' , 'idv' , 'mil' , 'net' , 'org' , 'xn--czrw28b' , 'xn--uc0atv' , 'xn--zf0ao64a' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'tz' :
if ( [ 'ac' , 'co' , 'go' , 'hotel' , 'info' , 'me' , 'mil' , 'mobi' , 'ne' , 'or' , 'sc' , 'tv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ua' :
if ( [ 'at' , 'cherkassy' , 'cherkasy' , 'chernigov' , 'chernihiv' , 'chernivtsi' , 'chernovtsy' , 'ck' , 'cn' , 'co' , 'com' , 'cr' , 'crimea' , 'cv' , 'dn' , 'dnepropetrovsk' , 'dnipropetrovsk' , 'dominic' , 'donetsk' , 'dp' , 'edu' , 'gov' , 'if' , 'in' , 'ivano-frankivsk' , 'kh' , 'kharkiv' , 'kharkov' , 'kherson' , 'khmelnitskiy' , 'khmelnytskyi' , 'kiev' , 'kirovograd' , 'km' , 'kr' , 'krym' , 'ks' , 'kv' , 'kyiv' , 'lg' , 'lt' , 'lugansk' , 'lutsk' , 'lv' , 'lviv' , 'mk' , 'mykolaiv' , 'net' , 'nikolaev' , 'od' , 'odesa' , 'odessa' , 'org' , 'pl' , 'poltava' , 'pp' , 'rivne' , 'rovno' , 'rv' , 'sb' , 'sebastopol' , 'sevastopol' , 'sm' , 'sumy' , 'te' , 'ternopil' , 'uz' , 'uzhgorod' , 'vinnica' , 'vinnytsia' , 'vn' , 'volyn' , 'yalta' , 'zaporizhzhe' , 'zaporizhzhia' , 'zhitomir' , 'zhytomyr' , 'zp' , 'zt' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ug' :
if ( [ 'co' , 'ac' , 'sc' , 'go' , 'ne' , 'or' , 'com' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'uk' :
if ( [ 'ac' , 'bl' , 'british-library' , 'co' , 'gov' , 'govt' , 'jcpc' , 'jet' , 'judiciary' , 'lea' , 'ltd' , 'me' , 'mil' , 'mod' , 'net' , 'nhs' , 'nic' , 'nls' , 'org' , 'orgn' , 'parliament' , 'plc' , 'police' , 'royal' , 'sch' , 'supremecourt' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'us' :
if ( [ 'aa' , 'ae' , 'ak' , 'al' , 'ap' , 'ar' , 'as' , 'az' , 'ca' , 'cm' , 'co' , 'ct' , 'cz' , 'dc' , 'de' , 'dni' , 'fed' , 'fl' , 'fm' , 'ga' , 'gu' , 'hi' , 'ia' , 'id' , 'il' , 'in' , 'isa' , 'kids' , 'ks' , 'ky' , 'la' , 'ma' , 'md' , 'me' , 'mh' , 'mi' , 'mn' , 'mo' , 'mp' , 'ms' , 'mt' , 'nb' , 'nc' , 'nd' , 'ne' , 'nh' , 'nj' , 'nm' , 'nsn' , 'nv' , 'ny' , 'oh' , 'ok' , 'or' , 'pa' , 'pi' , 'pr' , 'pw' , 'ri' , 'sc' , 'sd' , 'tn' , 'tt' , 'tx' , 'ut' , 'va' , 'vi' , 'vt' , 'wa' , 'wi' , 'wv' , 'wy' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'uy' :
if ( [ 'com' , 'edu' , 'gub' , 'net' , 'mil' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'uz' :
if ( [ 'co' , 'com' , 'org' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'vc' :
if ( [ 'com' , 'edu' , 'gov' , 'mil' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 've' :
if ( [ 'arts' , 'co' , 'com' , 'e12' , 'edu' , 'firm' , 'gob' , 'gov' , 'info' , 'int' , 'mil' , 'net' , 'org' , 'radio' , 'rec' , 'store' , 'tec' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'vi' :
if ( [ 'co' , 'org' , 'com' , 'net' , 'k12' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'vn' :
if ( [ 'ac' , 'biz' , 'com' , 'edu' , 'gov' , 'health' , 'info' , 'int' , 'mil' , 'name' , 'net' , 'org' , 'pro' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'vu' :
if ( [ 'com' , 'edu' , 'net' , 'org' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'ws' :
if ( [ 'org' , 'gov' , 'edu' , 'com' , 'net' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'xn--90a3ac' :
if ( [ 'xn--o1ac' , 'xn--c1avg' , 'xn--90azh' , 'xn--d1at' , 'xn--o1ach' , 'xn--80au' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'xn--j6w193g' :
if ( [ 'xn--55qx5d' , 'xn--wcvs22d' , 'xn--mxtq1m' , 'xn--gmqw5a' , 'xn--od0alg' , 'xn--uc0atv' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'xn--o3cw4h' :
if ( [ 'xn--12c1fe0br' , 'xn--12co0c3b4eva' , 'xn--h3cuzk1di' , 'xn--o3cyx2a' , 'xn--m3ch0j3a' , 'xn--12cfi8ixb8l' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'za' :
if ( [ 'ac' , 'agric' , 'alt' , 'bourse' , 'city' , 'co' , 'cybernet' , 'db' , 'edu' , 'gov' , 'grondar' , 'iaccess' , 'imt' , 'inca' , 'landesign' , 'law' , 'mil' , 'net' , 'ngo' , 'nis' , 'nom' , 'olivetti' , 'org' , 'pix' , 'school' , 'tm' , 'web' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'zm' :
if ( [ 'ac' , 'biz' , 'co' , 'com' , 'edu' , 'gov' , 'info' , 'mil' , 'net' , 'org' , 'sch' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
case 'zw' :
if ( [ 'co' , 'ac' , 'org' , 'gov' , 'mil' ] . includes ( wa [ 1 ] ) ) {
return wa [ 2 ] + '.' + wa [ 1 ] + '.' + wa [ 0 ] ;
} ;
break ;
}
return wa [ 1 ] + '.' + wa [ 0 ] ;
}
browser . webRequest . onBeforeRequest . addListener ( g => {
2022-09-01 06:50:11 -04:00
if ( ! lookupCAT || ! g . tabId ) {
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
return ;
}
let fqdn = ( new URL ( g . url ) ) . hostname ,
domain = get _realdomain ( fqdn ) ;
if ( domain . length < 4 || /^(mypdns\.(org|com)|crimeflare\.eu\.org)$/ . test ( domain ) ) {
return ;
}
if ( domainCAT [ domain ] ) {
domainCAT [ domain ] [ 0 ] = tUNIX ( ) ;
return ;
}
iGetSiteCat ( fqdn ) . then ( g => {
if ( g . length == 2 ) {
if ( g [ 0 ] . length >= 4 ) {
domainCAT [ domain ] = [ tUNIX ( ) , g [ 0 ] , g [ 1 ] ] ;
2022-09-01 06:50:11 -04:00
} else {
domainCAT [ domain ] = [ tUNIX ( ) , '' , [ ] ] ;
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
}
2022-09-01 06:50:11 -04:00
update _icon ( null ) ;
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
}
} , b => { } ) ;
} , {
2022-09-01 06:50:11 -04:00
types : [ 'main_frame' ] ,
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
urls : [ "http://*/*" , "https://*/*" ]
2022-09-01 06:50:11 -04:00
} ) ;
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
function cleanupDomainCAT ( ) {
2022-08-29 07:48:18 -04:00
let lowat = tUNIX ( ) - 172800 ;
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
for ( f in domainCAT ) {
if ( domainCAT [ f ] && domainCAT [ f ] [ 0 ] < lowat ) {
delete ( domainCAT [ f ] ) ;
}
}
setTimeout ( cleanupDomainCAT , 3600000 ) ;
}
cleanupDomainCAT ( ) ;
browser . tabs . onActivated . addListener ( ( ) => {
browser . tabs . query ( {
active : true ,
currentWindow : true
} ) . then ( function ( t ) {
if ( t [ 0 ] ) {
update _icon ( t [ 0 ] . id , t [ 0 ] . url ) ;
}
} ) ;
} ) ;
browser . tabs . onUpdated . addListener ( function ( a , b , t ) {
if ( t . active && t . id ) {
update _icon ( t . id , t . url ) ;
}
} ) ;
browser . webNavigation . onDOMContentLoaded . addListener ( ( ) => {
browser . tabs . query ( {
active : true ,
currentWindow : true
} ) . then ( function ( t ) {
if ( t [ 0 ] ) {
update _icon ( t [ 0 ] . id , t [ 0 ] . url ) ;
}
} ) ;
} ) ;
browser . webNavigation . onCompleted . addListener ( ( ) => {
browser . tabs . query ( {
active : true ,
currentWindow : true
} ) . then ( function ( t ) {
if ( t [ 0 ] ) {
update _icon ( t [ 0 ] . id , t [ 0 ] . url ) ;
}
} ) ;
} ) ;
browser . runtime . onMessage . addListener ( ( r , s , sr ) => {
2022-08-26 07:00:24 -04:00
if ( r [ 0 ] == 'iidCACHEget' ) {
let iidDOMAIN = get _realdomain ( r [ 1 ] ) + '.mpdns_iid' ;
if ( domainCAT [ iidDOMAIN ] ) {
sr ( [ true , domainCAT [ iidDOMAIN ] [ 1 ] ] ) ;
} else {
sr ( [ false , 0 ] ) ;
}
}
if ( r [ 0 ] == 'iidCACHEset' ) {
let iidDOMAIN = get _realdomain ( r [ 1 ] ) + '.mpdns_iid' ;
if ( ! domainCAT [ iidDOMAIN ] ) {
domainCAT [ iidDOMAIN ] = [ tUNIX ( ) , r [ 2 ] ,
[ ]
] ;
}
sr ( true ) ;
}
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
if ( r [ 0 ] == 'set' ) {
token = r [ 1 ] ;
if ( token . length == 20 ) {
showreply ( 'Welcome!' , 'Thank you for helping out this project.' ) ;
} else {
showreply ( 'See you later.' , 'Your Access Token is cleared.' ) ;
}
sr ( true ) ;
}
if ( r [ 0 ] == 'report' ) {
reporting ( {
menuItemId : 'actPAGE_' + r [ 1 ] ,
pageUrl : r [ 2 ] ,
comment : r [ 3 ] || ''
} , null ) ;
sr ( true ) ;
}
if ( r [ 0 ] == 'top1' ) {
tabOp1 = ( r [ 1 ] == 1 ) ? true : false ;
sr ( true ) ;
}
if ( r [ 0 ] == 'top2' ) {
tabOp2 = ( r [ 1 ] == 1 ) ? true : false ;
sr ( true ) ;
}
if ( r [ 0 ] == 'top3' ) {
apiurl = ( r [ 1 ] != 1 ) ? baseurl [ 0 ] : baseurl [ 1 ] ;
sr ( true ) ;
}
if ( r [ 0 ] == 'top8' ) {
lookupCAT = ( r [ 1 ] == 1 ) ? true : false ;
2022-09-01 06:50:11 -04:00
domainCAT = { } ;
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
update _icon ( null ) ;
sr ( true ) ;
}
if ( r [ 0 ] . startsWith ( 'topWP' ) || r [ 0 ] == 'top4' || r [ 0 ] == 'top5' || r [ 0 ] == 'top6' || r [ 0 ] == 'top7' ) {
sr ( true ) ;
}
if ( r [ 0 ] == 'menu' ) {
reload _menu ( ) ;
sr ( true ) ;
}
if ( r [ 0 ] == 'screenshot' ) {
browser . tabs . query ( {
active : true ,
currentWindow : true
} ) . then ( tab => {
if ( tab && tab [ 0 ] ) {
let tabFQDN = ( new URL ( tab [ 0 ] . url ) ) . host ;
browser . tabs . captureTab ( tab [ 0 ] . id , {
format : 'jpeg' ,
quality : 100
} ) . then ( ss => {
fetch ( ss ) . then ( ssd => ssd . blob ( ) ) . then ( ssd => {
let pic = URL . createObjectURL ( ssd ) ;
browser . downloads . download ( {
url : pic ,
filename : '[' + tabFQDN + '] ' + Math . round ( ( new Date ( ) ) . getTime ( ) / 1000 ) + '.jpg' ,
saveAs : true
} ) . then ( ( ) => { } , ( ) => {
URL . revokeObjectURL ( pic ) ;
} ) ;
} ) ;
} ) ;
}
} ) ;
sr ( true ) ;
}
2022-09-07 01:45:57 -04:00
if ( r [ 0 ] == 'opentab' ) {
browser . tabs . query ( {
currentWindow : true
} ) . then ( tabs => {
let tOpen = [ ] ,
tWho = - 1 ;
for ( let t of tabs ) {
if ( t && t . url ) {
tOpen . push ( t . url ) ;
if ( t . active ) {
tWho = t . id ;
}
}
}
for ( let t of r [ 1 ] ) {
if ( ! tOpen . includes ( t ) ) {
browser . tabs . create ( tWho == - 1 ? {
url : t
} : {
url : t ,
openerTabId : tWho
} ) ;
}
}
} , ( ) => { } ) ;
sr ( true ) ;
}
if ( r [ 0 ] == 'savepin' ) {
browser . storage . local . set ( {
[ r [ 1 ] ] : [ r [ 2 ] , r [ 3 ] ]
} ) ;
sr ( true ) ;
}
Update tool/mypdns_reporter/cli/mypdnsrep.app, tool/mypdns_reporter/gui/gui.zip, tool/mypdns_reporter/addon/chrome/addon.crx, tool/mypdns_reporter/addon/chrome/icon.png, tool/mypdns_reporter/addon/chrome/conf.html, tool/mypdns_reporter/addon/chrome/conf.js, tool/mypdns_reporter/addon/chrome/main.js, tool/mypdns_reporter/addon/chrome/manifest.json, tool/mypdns_reporter/addon/firefox/addon.xpi, tool/mypdns_reporter/addon/firefox/icon.png, tool/mypdns_reporter/addon/firefox/conf.html, tool/mypdns_reporter/addon/firefox/conf.js, tool/mypdns_reporter/addon/firefox/manifest.json, tool/mypdns_reporter/addon/firefox/main.js
2022-08-26 06:57:20 -04:00
return true ;
} ) ;
browser . runtime . onInstalled . addListener ( g => {
if ( g . reason == 'install' ) {
browser . runtime . openOptionsPage ( ) ;
showreply ( 'Hello!' , 'Please set your token to begin.' ) ;
}
2022-08-26 07:00:24 -04:00
} ) ;