PK l68chrome/UT k7Gk7GUxPK l688chrome/controledescripts.jarUT k7Gk7GUxPK v7content/UT EGk7GUxPK |68&O' ' content/classes.jsUT f*G NGUxfunction Arvore (itens) { this.itens = itens; } function Politica (nome, sites, permissoes) { this.nome = nome; this.sites = sites ? sites : null; this.permissoes = permissoes ? permissoes : new Array(); } Arvore.prototype = { QueryInterface: function (aIID) { if (aIID.equals(Components.interfaces.nsITreeView) || aIID.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; }, getCellText: function (linha, coluna) { var texto = null; if (coluna.id == "avancado-propriedade") texto = this.itens[linha].propriedade; else switch (this.itens[linha].status) { case "noAccess": texto = CdS.stringset.getString("controledescripts.block");break; case "allAccess": texto = CdS.stringset.getString("controledescripts.allow");break; case "sameOrigin": texto = CdS.stringset.getString("controledescripts.sameOrigin");break; } return texto; }, get rowCount() {return this.itens.length;}, cycleHeader: function(coluna) {}, getCellProperties: function(linha, coluna, props) {}, getColumnProperties: function(colid, coluna, props) {}, getImageSrc: function(linha, coluna) {return null;}, getLevel: function(linha) {return 0;}, getRowProperties: function(linha, props) {}, isContainer: function(linha) {return false;}, isSeparator: function(linha) {return false;}, isSorted: function() {return false;}, setTree: function(treebox) {this.treebox = treebox;} } Politica.prototype = { adicionarPermissao: function (permissao) { if (permissao) { this.permissoes.push(permissao); this.ordenarPermissoes(); return true; } return false; }, editarPermissao: function (indice, permissao) { if (permissao && indice >= 0 && indice <= this.permissoes.length) { this.permissoes[indice] = permissao; this.ordenarPermissoes(); return true; } return false; }, ordenarPermissoes: function () { var ordenador = function (a, b) { if (a.propriedade > b.propriedade) return 1; else if (a.propriedade < b.propriedade) return -1; else return 0; } this.permissoes.sort(ordenador); }, removerPermissao: function (indice) { this.permissoes.splice(indice, 1); return true; }, renomear: function (nomeNovo) { if (nomeNovo) { this.nome = nomeNovo; return true; } return false; } } PK *8_Ycontent/contents.rdfUT FlG NGUx chrome://controledescripts/content/overlay/sm-navigator.xul chrome://controledescripts/content/overlay/sm-scripts.xul chrome://controledescripts/content/overlay/geral.xul PK 7]//content/prefs.xulUT fhXG NGUx %controledescriptsDTD; ]> PK $}685 content/overlay/geral.jsUT *G NGUxfunction CdSIniciar () { var ferramentasFx = document.getElementById("menu_ToolsPopup"); var ferramentasSm = document.getElementById("taskPopup"); var contexto = document.getElementById("contentAreaContextMenu"); if (ferramentasFx) ferramentasFx.addEventListener("popupshowing", CdSAtualizarMenu, false); if (ferramentasSm) ferramentasSm.addEventListener("popupshowing", CdSAtualizarMenu, false); if (contexto) contexto.addEventListener("popupshowing", CdSAtualizarMenu, false); if (CdSUtil.obterBooleana("extensions.controledescripts.shortcut.enabled")) { var key = document.createElement("key"); key.id = "key_openCdS"; key.setAttribute("command", "cmd_openCdS"); key.setAttribute("modifiers", CdSUtil.obterString("extensions.controledescripts.shortcut.modifiers")); key.setAttribute("key", CdSUtil.obterString("extensions.controledescripts.shortcut.key")); document.getElementById("controledescripts-keyset").appendChild(key); } CdSAtualizarPrefs(false); CdSObservador.atualizarComando(); } function CdSAbrirPrefs () { var recursos = "centerscreen,chrome,resizable"; openDialog("chrome://controledescripts/content/prefs.xul", "controledescripts-prefs", recursos); } function CdSAtualizarBotao () { var sep = document.getElementById("navegacao-sep"); var item = document.getElementById("navegacao-item"); var menu = document.getElementById("navegacao-menu"); var politicas = null; if (CdSUtil.existePreferencia("capability.policy.policynames")) politicas = CdSUtil.obterString("capability.policy.policynames"); if (politicas) { item.setAttribute("class", "default"); sep.hidden = menu.hidden = false; } else { item.removeAttribute("class"); sep.hidden = menu.hidden = true; } } function CdSAtualizarIcone () { var broadcaster = document.getElementById("brd_menuCdS"); var exibirIcone = CdSUtil.obterBooleana("extensions.controledescripts.showIcons"); broadcaster.setAttribute("class", (exibirIcone ? broadcaster.getAttribute("menuclass") : "")); } function CdSAtualizarMenu () { var item = document.getElementById("ferramentas-item"); var menu = document.getElementById("ferramentas-menu"); var jsAtivado = CdSUtil.obterBooleana("javascript.enabled"); var exibirMenu = CdSUtil.obterBooleana("extensions.controledescripts.showMenuitem.tools"); var conteudoValido = true; if (gContextMenu) { item = document.getElementById("contexto-item"); menu = document.getElementById("contexto-menu"); exibirMenu = CdSUtil.obterBooleana("extensions.controledescripts.showMenuitem.context") && jsAtivado; conteudoValido = !gContextMenu.onImage && !gContextMenu.onTextInput && !gContextMenu.isTextSelected && !gContextMenu.isContentSelected && !gContextMenu.onMathML && (!gContextMenu.onLink || gContextMenu.onSaveableLink); } if (exibirMenu && conteudoValido) { var politicas = null; if (CdSUtil.existePreferencia("capability.policy.policynames")) politicas = CdSUtil.obterString("capability.policy.policynames"); if (politicas && jsAtivado) { item.hidden = !(menu.hidden = false); if (gContextMenu) { document.getElementById("menu-site").hidden = gContextMenu.onSaveableLink; document.getElementById("menu-link").hidden = !gContextMenu.onSaveableLink; } } else item.hidden = !(menu.hidden = true); } else item.hidden = menu.hidden = true; CdSAtualizarIcone(); } function CdSAtualizarPrefs (manterCompatibilidade) { if (CdSUtil.existePreferencia("controledescripts.ocultarmenu")) { CdSUtil.salvarString("extensions.controledescripts.showMenuitem.tools", !CdSUtil.obterBooleana("controledescripts.ocultarmenu")); if (!manterCompatibilidade) CdSUtil.limparPreferencia("controledescripts.ocultarmenu"); } if (CdSUtil.existePreferencia("controledescripts.exibiricones")) { CdSUtil.salvarString("extensions.controledescripts.showIcons", CdSUtil.obterBooleana("controledescripts.exibiricones")); if (!manterCompatibilidade) CdSUtil.limparPreferencia("controledescripts.exibiricones"); } } function CdSEditarSites (nomePol, salvar, sites) { if (salvar) CdSUtil.salvarString("capability.policy."+nomePol+".sites", sites); else { var endereco = (gContextMenu && gContextMenu.onSaveableLink) ? gContextMenu.link.href : window._content.document.location.href; var lista = CdSUtil.obterString("capability.policy."+nomePol+".sites"); openDialog("chrome://controledescripts/content/dialogs/sites.xul", "controledescripts-sites", "chrome,centerscreen", {nomePol: nomePol, sites: lista, siteP: endereco}); } } function CdSPreencherPoliticas (popup) { var politicas = null; if (CdSUtil.existePreferencia("capability.policy.policynames")) politicas = CdSUtil.obterString("capability.policy.policynames"); if (politicas) { var itens = popup.childNodes; politicas = politicas.split(/\s|,/); for (var i = itens.length; i > 0; i--) popup.removeChild(popup.lastChild); for (i in politicas) { var menuitem = document.createElement("menuitem"); menuitem.setAttribute("label", decodeURIComponent(politicas[i])); menuitem.setAttribute("oncommand", "CdSEditarSites('"+politicas[i]+"', false);"); popup.appendChild(menuitem); } } } function CdSSair () { window.removeEventListener("load", CdSIniciar, false); window.removeEventListener("unload", CdSSair, false); CdSUtil.sBranch.QueryInterface(Components.interfaces.nsIPrefBranchInternal) .removeObserver(CdSObservador.preferencia, CdSObservador); } var CdSObservador = { preferencia: "javascript.enabled", observe: function (assunto, topico, preferencia) { if (topico == "nsPref:changed" && preferencia == this.preferencia) this.atualizarComando(); }, atualizarComando: function () { var comando = document.getElementById("cmd_openCdS"); if (CdSUtil.obterBooleana(this.preferencia)) comando.removeAttribute("disabled"); else comando.setAttribute("disabled", true); } } //////////////////////////////////////////////////////////////////////////////// window.addEventListener("load", CdSIniciar, false); window.addEventListener("unload", CdSSair, false); CdSUtil.sBranch.QueryInterface(Components.interfaces.nsIPrefBranchInternal) .addObserver(CdSObservador.preferencia, CdSObservador, false); PK v74content/overlay/geral.xulUT EG NGUx %controledescriptsDTD; ]> PK µ(8YD content/overlay/sm-navigator.xulUT LG NGUx %controledescriptsDTD; ]> PK Pn7content/icons/UT n:Gk7GUxPK 66content/icons/icone_16.pngUT H́F NGUxPNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<kIDATxlSklSUs:lݱAfe >..&  2>1!,$h1$"ⰲ, Chuumbkio"?9=+T=tx=ޒDz˹4]Eݴl >P<0@ 6%;;7wSȫ c'z˘9< <ǁnN%1G>{0EyWʨQH6 0P5 a Vt3Tפw I QOp*qSssF3uj%Ty9{us<tᄒ;zB,o#u~xb $RL!펱 ?fۦ;I@ XM54TV Ϟ8(y4Ml:7û۶v7M݂Qt&%XXI$<7iZhnhKH|.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UT XJF NGUx %controledescriptsDTD; ]> PK Ev7wB content/dialogs/permissao.jsUT bEG NGUxvar controledescripts = { iniciar: function () { this.iniciarItens(); this.edicao = window.arguments[0].edicao; this.nomePol = window.arguments[0].nomePol; if (this.edicao) { document.title = this.stringset.getString("controledescripts.editPermission"); this.propriedade.value = this.edicao.propriedade; switch (this.edicao.status) { case "sameOrigin": this.status.selectedIndex = 2; break; case "allAccess": this.status.selectedIndex = 1; break; default: this.status.selectedIndex = 0; } this.verificarAcesso(true); } else document.title = this.stringset.getString("controledescripts.addPermission"); }, iniciarItens: function () { this.acesso = document.getElementById("permissao-acesso"); this.propriedade = document.getElementById("permissao-propriedade"); this.status = document.getElementById("permissao-status"); this.stringset = document.getElementById("permissao-strings"); }, salvar: function () { if (this.propriedade.value) { this.propriedade.value = this.propriedade.value.replace(/^\w/, this.propriedade.value.charAt(0).toUpperCase()); if (this.edicao) opener.CdS.editarPermissao(this.nomePol, {propriedade: this.propriedade.value, status: this.status.value}); else opener.CdS.adicionarPermissao(this.nomePol, {propriedade: this.propriedade.value, status: this.status.value}); return true; } else { alert(this.stringset.getString("controledescripts.emptyProperty")); this.propriedade.focus(); return false; } }, selecionarAcesso: function () { var novo = this.acesso.value; var anterior = this.verificarAcesso(false); if (novo != anterior) switch (anterior) { case ".get": this.propriedade.value = this.propriedade.value.replace(/\.get$/, ""); this.propriedade.value += novo; break; case ".set": this.propriedade.value = this.propriedade.value.replace(/\.set$/, ""); this.propriedade.value += novo; break; default: this.propriedade.value += novo; } }, verificarAcesso: function (alterar) { var sufixo = this.propriedade.value.substring(this.propriedade.value.length - 4, this.propriedade.value.length); if (alterar) switch (sufixo) { case ".get": this.acesso.selectedIndex = 1; break; case ".set": this.acesso.selectedIndex = 2; break; default: this.acesso.selectedIndex = 0; } if (sufixo == ".get" || sufixo == ".set") return sufixo; return ""; } } PK uu7Y7"((content/dialogs/permissao.xulUT >~DG NGUx %controledescriptsDTD; ]>