<html>
<head>
<title> Hosts Editor de arquivo </ititle>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<metahttp-equiv = "content-language" content = "en-cn">
<HTA: ApplicationId = "HostEdit"
ApplicationName = "HostEdit"
Border = "Gross"
Borderstyle = "Normal"
Legenda = "Sim"
Icon = "c: /windows/system32/rasphone.exe"
MaximizeButton = "Sim"
Minimizebutton = "sim"
ShowIssaskbar = "Sim"
SingleInstance = "Sim"
Sysmenu = "sim"
Versão = "1.0"
Windowstate = "Normal"/>
<scriptLanguage = "jscript">
window.onerror = function ()
{
Window.alert ("Ocorreu um erro desconhecido no programa, a janela atual será fechada!");
window.close ();
returnTrue;
}
Varwindoww = 450; // Formulário de largura
Varwindowh = 200; // formam alto
VarCanResize = false; // é possível alterar o tamanho
varwindoww2 = windoww; // largura o formulário ao editar
varwindowh2 = 200; // o formulário é alto ao editar
window.resizeto (windoww, janela);
//window.moveto(screen.width-windoww)/2 ,(screen.Height-Windowh)/2);
window.onResize = function () {if (! canResize) window.resizeto (windoww, windowh);}
functionInit ()
{
varui_table = document.getElementById ('ui_table');
varBestHeight = 70+ui_table.scrolHeight;
if (bestHeight> screen.Height) bestHeight = screen.Height;
window.resizeto (Windoww, bestHeight);
//window.moveto(screen.width-windoww)/2 ,(screen.Height-BestHeight)/2);
}
varhostfile = '// drivers // etc // hosts';
functionGetList () {
varhtml = '';
variáveis = '';
vari = 1;
FSO = newActivexObject ("script.filesystemoBject");
varspath = fso.getSpecialFolder (1)+HostFile;
host = fso.opentExtFile (spath, 1, falso);
while (! host.atendofstream) {
tmp = host.readline ();
if (/^#?/d {1,3} /./ d {1,3} /./ d {1,3} /./ d {1,3}/s+([a-za-z0-9/-]+/. [a-za-z0-9/-]+(/. (com | net | org | edu | info | biz | cc | tv | gov | mobi | nome | cn | enit | us | hk | tw))+) $/. teste (tmp)))))
{
as = tmp.Replace (// S+/, '|: |'). Split ('|: |');
ids+= '['+i+'],';
if (/^/#/. test (como [0])) {
zt = 'rede externa';