├── lindinho.PNG ├── caranguejo.PNG ├── odebrechter.crx ├── substitutions ├── images │ ├── .directory │ ├── enabled.png │ ├── icon128.png │ ├── disabled.png │ └── Odebrechter.svg ├── fonts │ ├── SheepSansBold.eot │ ├── SheepSansBold.ttf │ ├── SheepSansBold.woff │ └── styles.css ├── manifest.json ├── css │ ├── substitutions.css │ └── font-awesome.min.css ├── js │ ├── substitutions.js │ ├── options.js │ ├── background.js │ └── jquery.min.js └── html │ └── config.html ├── LICENSE └── README.md /lindinho.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/lindinho.PNG -------------------------------------------------------------------------------- /caranguejo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/caranguejo.PNG -------------------------------------------------------------------------------- /odebrechter.crx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/odebrechter.crx -------------------------------------------------------------------------------- /substitutions/images/.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | PreviewsShown=true 3 | Timestamp=2013,11,9,11,27,16 4 | Version=3 5 | -------------------------------------------------------------------------------- /substitutions/images/enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/substitutions/images/enabled.png -------------------------------------------------------------------------------- /substitutions/images/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/substitutions/images/icon128.png -------------------------------------------------------------------------------- /substitutions/images/disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/substitutions/images/disabled.png -------------------------------------------------------------------------------- /substitutions/fonts/SheepSansBold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/substitutions/fonts/SheepSansBold.eot -------------------------------------------------------------------------------- /substitutions/fonts/SheepSansBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/substitutions/fonts/SheepSansBold.ttf -------------------------------------------------------------------------------- /substitutions/fonts/SheepSansBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whiletruedoechoZueiradone/Odebrechter/HEAD/substitutions/fonts/SheepSansBold.woff -------------------------------------------------------------------------------- /substitutions/fonts/styles.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face { 3 | font-family: 'SheepSansBold'; 4 | src: url('SheepSansBold.eot?#iefix') format('embedded-opentype'), url('SheepSansBold.woff') format('woff'), url('SheepSansBold.ttf') format('truetype'), url('SheepSansBold.svg#SheepSansBold') format('svg'); 5 | font-weight: normal; 6 | font-style: normal; 7 | } 8 | -------------------------------------------------------------------------------- /substitutions/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Odebrechter Codinomes", 4 | "description": "Setor de Operações Estruturadas", 5 | "version": "1.4.1", 6 | "options_page": "html/config.html", 7 | "browser_action": { 8 | "default_icon": { 9 | "19": "images/enabled.png" 10 | }, 11 | "default_title": "clique para desabilitar" 12 | }, 13 | "background": { 14 | "scripts": [ 15 | "js/background.js" 16 | ], 17 | "persistent": false 18 | }, 19 | "permissions": [ 20 | "tabs", 21 | "storage", 22 | "http://*/*", 23 | "https://*/*" 24 | ], 25 | "icons": { 26 | "128": "images/icon128.png" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /substitutions/css/substitutions.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face { 3 | 4 | font-family: "SheepSansBold"; 5 | 6 | src: url("../fonts/SheepSansBold.otf") format("opentype"); 7 | 8 | } 9 | 10 | .title { 11 | 12 | width: 100%; 13 | 14 | text-align: center; 15 | 16 | margin-bottom: 20px; 17 | 18 | } 19 | 20 | body, h1, h3, button, .btn { 21 | 22 | font-family: "SheepSansBold"; 23 | 24 | word-spacing: 2px; 25 | 26 | margin-bottom: 40px; 27 | 28 | } 29 | 30 | p { 31 | 32 | font-size: 16px; 33 | 34 | } 35 | 36 | #options { 37 | 38 | margin-top: 100px 39 | 40 | } 41 | 42 | .menu-btn { 43 | 44 | text-align: center; 45 | 46 | } 47 | 48 | .btn { 49 | 50 | text-align: center; 51 | 52 | margin: 0 auto; 53 | 54 | } 55 | 56 | .save-btn { 57 | 58 | width: 140px; 59 | 60 | } 61 | 62 | .reset-btn { 63 | 64 | width: 200px; 65 | 66 | } 67 | 68 | .refresh-btn { 69 | 70 | width: 230px; 71 | 72 | } 73 | 74 | .ginp { 75 | 76 | margin-top: 10px; 77 | 78 | } 79 | 80 | .headings { 81 | 82 | text-align: center; 83 | 84 | } 85 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Anon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /substitutions/js/substitutions.js: -------------------------------------------------------------------------------- 1 | // Tribute to justin.giancola and the s/keyboard/leopard chrome extension. 2 | // Icon and idea are from www.xkcd.com/1288 3 | chrome.runtime.sendMessage("config", function(response) { 4 | "use strict"; 5 | // taken from http://stackoverflow.com/questions/17264639/replace-text-but-keep-case 6 | function matchCase(text, pattern) { 7 | var result = ''; 8 | for (var i = 0; i < text.length; i++) { 9 | var c = text.charAt(i); 10 | var p = pattern.charCodeAt(i); 11 | if (p >= 65 && p < 65 + 26) { 12 | result += c.toUpperCase(); 13 | } else { 14 | result += c.toLowerCase(); 15 | } 16 | } 17 | return result; 18 | } 19 | var substitute = (function() { 20 | "use strict"; 21 | var replacements, ignore, i, replacementsObject, original; 22 | replacements = response; 23 | replacementsObject = []; 24 | for (i = replacements.length - 1; i >= 0; i--) { 25 | original = new RegExp("\\b" + replacements[i][0] + "\\b", "gi"); 26 | replacementsObject.push([original, replacements[i][1]]); 27 | } 28 | return function(node) { 29 | var i; 30 | var ignore = { 31 | "STYLE": 0, 32 | "SCRIPT": 0, 33 | "NOSCRIPT": 0, 34 | "IFRAME": 0, 35 | "OBJECT": 0, 36 | "INPUT": 0, 37 | "FORM": 0, 38 | "TEXTAREA": 0 39 | }; 40 | if (node.parentElement.tagName in ignore) { 41 | return; 42 | } 43 | for (i = replacementsObject.length - 1; i >= 0; i--) { 44 | node.nodeValue = node.nodeValue.replace(replacementsObject[i][0], function(match) { 45 | return matchCase(replacementsObject[i][1], match); 46 | }); 47 | } 48 | }; 49 | })(); 50 | 51 | var node, iter; 52 | var iter = document.createNodeIterator(document.body, NodeFilter.SHOW_TEXT); 53 | while ((node = iter.nextNode())) { 54 | substitute(node); 55 | } 56 | }); 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Chrome Extension "Odebrechter" 2 | ================== 3 | 4 | 5 | ## Intro 6 | 7 | Cansado de ler sobre o apocalip...digo... noticiário político ultimamente? 8 | Diretamente do "Setor de Operações Estruturadas" vem ai uma extensão para o Google Chrome que vai faze-lo sorrir até o próximo escândalo...ou pelos próximos 15 min (whichever comes first)... 9 | 10 | A Extensão "substitui" todas as citações de nomes de politicos por seus codinomes segundo listados nas "listas de doações da odebrecht" (divulgadas durante a operação lava jato) 11 | 12 | O usuário também pode adicionar novos codinomes (diretamente nas configurações) 13 | 14 | ![caranguejo](https://github.com/whiletruedoechoZueiradone/Odebrechter/raw/master/caranguejo.PNG) 15 | ![lindinho](https://github.com/whiletruedoechoZueiradone/Odebrechter/raw/master/lindinho.PNG) 16 | 17 | 18 | ## Fontes: 19 | 20 | - http://www1.folha.uol.com.br/poder/2016/03/1753226-pf-acha-planilha-de-pagamentos-da-odebrecht-para-politicos.shtml 21 | - http://g1.globo.com/politica/operacao-lava-jato/noticia/2016/03/planilhas-da-odebrecht-trazem-codinomes-e-valores-vultosos-diz-pf.html 22 | - http://www.otempo.com.br/capa/pol%C3%ADtica/veja-a-lista-dos-apelidos-dos-pol%C3%ADticos-na-lista-da-odebrecht-1.1265445 23 | 24 | by whiletruedoechoZueiradone 25 | 26 | ## Instalação 27 | 28 | Por enquanto (aguardando aprovação na Chrome Store) para instalar siga os seguintes passos: 29 | 30 | Baixe o arquivo : https://github.com/whiletruedoechoZueiradone/Odebrechter/raw/master/odebrechter.crx 31 | 32 | Instale arrastando para a lista de extensões , conforme é mostrado , por exemplo , em http://www.howtogeek.com/120743/how-to-install-extensions-from-outside-the-chrome-web-store/ 33 | 34 | ## FAQ: 35 | 36 | Pergunta: "Mas não tem o codinome X do politico Y" , 37 | Resp: poste uma issue acima e atualizarei o mais rápido possível! 38 | 39 | ================== 40 | Um fork do incrível: 41 | "xkcd substitutions chrome extension" (https://github.com/Posnet/xkcd-substitutions) by Posnet 42 | 43 | -------------------------------------------------------------------------------- /substitutions/html/config.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Odebrechter Config 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 | Odebrechter 23 |
24 | 48 |
49 | 50 |
51 |
52 |

Website Blacklist

53 |

Embora a extensão tenta não afetar coisas como forms de login ou emails devido a natureza complexa de alguns sites, isso pode não ser garantido 100%..

54 |

A lista abaixo é de sites que não serão afetados pelo Odebrechter.

55 |

Caso sinta necessidade adicione outros à lista...

56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 |
64 |

Lista de Codinomes

65 |

O nome original será substituído pelo codinome.

66 |

divirta-se:

67 |
68 |
69 |
70 | 71 |
72 |

73 |

Código Fonte em:

74 |

Zueira Open Source copi...ermm ...baseada na extension XKCD-Substitutions

75 |
76 | 77 |
78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /substitutions/js/options.js: -------------------------------------------------------------------------------- 1 | // var saved = true; 2 | var next = 1; 3 | 4 | function makeDirty() { 5 | $("#save").removeClass("btn-success").addClass("btn-warning").children("i").removeClass("fa-check").addClass("fa-save"); 6 | $("#save span").text(" Clique para Salvar"); 7 | // saved = false; 8 | } 9 | 10 | function makeClean() { 11 | $("#save").removeClass("btn-warning").addClass("btn-success").children("i").removeClass("fa-save").addClass("fa-check"); 12 | $("#save span").text("Salvo"); 13 | // saved = true; 14 | } 15 | 16 | function saveOptions(e) { 17 | e.preventDefault; 18 | console.log("ping"); 19 | var blacklist = $("#website-blacklist").val().replace(/\s+/g, "").toLowerCase().split(","); 20 | var replacements = []; 21 | var originals = $('#replacements [name="origin"]'); 22 | var replaces = $('#replacements [name="replace"]'); 23 | for (var i = ((Math.max(originals.length, replaces.length)) - 1); i >= 0; i--) { 24 | var org = originals[i].value.toLowerCase() 25 | var rep = replaces[i].value.toLowerCase() 26 | if (org === "" && rep === "") { 27 | continue; 28 | } 29 | replacements.push([org, rep]); 30 | }; 31 | chrome.storage.sync.set({ 32 | "blacklist": blacklist, 33 | "replacements": replacements 34 | }, 35 | function() { 36 | makeClean(); 37 | } 38 | ); 39 | } 40 | 41 | function reset(){ 42 | chrome.storage.sync.set({ 43 | "blacklist": default_blacklisted_sites, 44 | "replacements": default_replacements 45 | }, 46 | function() { 47 | makeClean(); 48 | populateSettings(); 49 | } 50 | ); 51 | } 52 | 53 | function populateSettings() { 54 | $("#replacements").empty(); 55 | $("blacklist input").val(""); 56 | chrome.storage.sync.get(null, function(result) { 57 | $("#blacklist input").val(result["blacklist"].join(", ")); 58 | var replacements = result['replacements']; 59 | for (var i = 0; i < replacements.length; i++) { 60 | addbutt(null, replacements[i][0], replacements[i][1]); 61 | }; 62 | addbutt(); 63 | }); 64 | makeClean(); 65 | } 66 | 67 | function addbutt(e, original, replacement) { 68 | original = original || ""; 69 | replacement = replacement || ""; 70 | if (e) { 71 | e.preventDefault(); 72 | } 73 | var addto = "#field" + next; 74 | var removeBtn = ' ' 75 | var addBtn = '' 76 | next = next + 1; 77 | var newIn = '