Browse Source

🅱️oca🅱️ola

master
kline 6 months ago
commit
de59077428
4 changed files with 40 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 4
    0
      readme.md
  3. 16
    0
      src/bocabola.js
  4. 19
    0
      src/manifest.json

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
*.swp

+ 4
- 0
readme.md View File

@@ -0,0 +1,4 @@
Boca Bola
=========

It just memes you to life

+ 16
- 0
src/bocabola.js View File

@@ -0,0 +1,16 @@
function replaceInText(element, pattern, replacement) {
for (let node of element.childNodes) {
switch (node.nodeType) {
case Node.ELEMENT_NODE:
replaceInText(node, pattern, replacement);
break;
case Node.TEXT_NODE:
node.textContent = node.textContent.replace(pattern, replacement);
break;
case Node.DOCUMENT_NODE:
replaceInText(node, pattern, replacement);
}
}
}

replaceInText(document.body, /b/gi, "🅱️");

+ 19
- 0
src/manifest.json View File

@@ -0,0 +1,19 @@
{
"manifest_version": 2,

"name": "Boca Bola",
"version": "0.2",

"permissions": [
"<all_urls>"
],

"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["bocabola.js"]
}
]
}



Loading…
Cancel
Save