From 217dca6d114def800bbc54648ad6ebd5932de562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Falc=C3=A3o?= Date: Tue, 7 Nov 2023 01:12:05 +0000 Subject: [PATCH] upgrades manifest to v3 and presents `.zip` extension --- CloudToButt.crx | Bin 1065 -> 0 bytes CloudToButt.zip | Bin 0 -> 961 bytes README.md | 29 ++++++++--------------------- Source/content_script.js | 21 ++++++++++----------- Source/manifest.json | 10 ++++------ 5 files changed, 22 insertions(+), 38 deletions(-) delete mode 100644 CloudToButt.crx create mode 100644 CloudToButt.zip diff --git a/CloudToButt.crx b/CloudToButt.crx deleted file mode 100644 index a5db2d8b37268bf9256c18b82e97137f4eb9e47b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1065 zcmZ=RGBROeU|?7T#0@}f&^X_KmyJ`a&7#6uXmR# z4=q}I@7w+36V|aj`w%tr-h~M#)Be0?VrFDu%oU&8A9C1lyRL)x%2h$ehmWT@+a|OY z9$nS&XiKHAg2<$rSrwmr`lelxyZ>iS%%^v*S`jYAzn1)OFMbi9c~fzM#)Pou)rU7I zc@)J>XPLVHx7M?3vWw(-6y~Pqtq?7B2u|-dG2vO`#@cxxM4!LhDZ1!)uD|D@vXqOH zT}@WT><$X>W@Zrqh7<=7GcX8zoKPRl$iQ$E7>I&EesX?ZNorn6d~tG7W$*LAwyfkj zvGL$i<)_!KomRN8cD}0P#riAd*_umktY&)@GdqP*wJyp?D0hACoWn9Vjyz8;ULk11 zpm`$T$ST(zkxUa_-BMU?v-msnuM#f%Nu9QhnzK&%l|DT4Fwwxf^ztoHWyR}NRnA;S z1sQRNEE)yoOq~^T@Oi(vtYmE3I^P|lJ7<|QEbf$^*q|&Q*qn7-m|rtL_5`nXu|(RF zRX#jMCOI~9woE)$SfnewYU$(BJqq_e%-eH*#qAfnjbta8UO0So@BM__ke<&8(z!(~ zQ&;Xvk!HQgl%~&K@n+53jekRn{>+w{dm{Yk+t!MY^LOkO(62l4^8Qb2!SC&R#D4Ok z#spW>!AqNfF~ACp4PGFfo0ylGmRbyogZ#YEzSCUI1_G|vPlof{WLc7Nd+F(K{9ffs zla6Ud`6#8mVg7i3_KJXA5)$X;THfh2PMnha{>93wM-QUYUHOj3J_wWK*=8{SWG$*%zkDR2s=#K8i)940;(gVxU+vz4wXP@9 z&Ux7t|6>jCW&|cF+zAcnLk6Hvp#US^4;tZX1@CLpW=(&?b` GfdK$SKCn0d diff --git a/CloudToButt.zip b/CloudToButt.zip new file mode 100644 index 0000000000000000000000000000000000000000..fc891648b0597df8b4da6d4fd7fbf5971b140b6e GIT binary patch literal 961 zcmWIWW@Zs#U|`^2SjCYZUhebP>l7mc!*XT@20;cHhUEOblGMDC_~PWE%z_fVtm4oR zP6prb=54>U-Mw_v&tESe&04s3^Wrz= zcRcU^kqTR_l$6DOa#9`hMx(n8hBo$xExYzfyjSgid9mlKQ2V_fZyu`%oC=v`UA|oA z&{feGrN~s?qSP3n&tCr~IW2tq_)BlZkvl6kWGT#Kd2vI|iZk;_N7T=25ARAHkSOe~!vA#J#0?kA1o%_q;t#*N z&1lEpp{?~dyr|Su@4x4<@KbO9Px&~t==UO-jobYfmi)T^k0Ah_D0+d3;&03CZ%ctm z(ho|`O7j(C;p-L}`b+u6|@ z>~qoO%nkNO`^_&py-a#g^zKYz+Bui_=wfI8tIY2Cb3`p=${KI)IzHj(%Hm*VarWb# z9!H*S*D%@|ev?c3OO*+8ZMQLB?AnXWTRB?vnItFo8FBhM>z??>d;P(bEYXZ~PTkPi z$GYciZZbA&@ARLPXXv2eGHH3{B(+6%)?Te${QtSu1*0q6>8kNR*aN&7ndF#pWdRAG zpBWf{DV(995yZlhAy^?90xdHj8;co;$i|8?F`x%2&`3~_Vi?KF266)v5Uv8!jKECF GzyJU{qJMh; literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 8b8a2271..138f0ed7 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,25 @@ cloud-to-butt ============= + +##### Fork of [panicsteve/cloud-to-butt](https://github.com/panicsteve/cloud-to-butt) with support to manifest v3 + ![](logo.png) Chrome extension that replaces occurrences of 'the cloud' with 'my butt' -[Direct download of crx file](https://github.com/panicsteve/cloud-to-butt/blob/master/CloudToButt.crx?raw=true) +[Direct download of crx file](https://github.com/gabrielfalcao/cloud-to-butt/blob/master/CloudToButt.zip?raw=true) + -Note that there are forks of this extension that simply replace 'cloud' with 'butt'. -In my personal opinion, that approach is too broad and it's less funny as a result, but it is clearly a very -polarizing issue in the cloud-to-butt user community. Forks are free to do whatever they like. But officially, _this_ extension replaces only the phrase described above, and therefore it did not replace your cloudflare URLs with buttflare URLs. Thank you for your concern. Screenshot Gallery ------------------ http://www.flickr.com/groups/cloud-to-butt/ -Installation ------------- - -In Chrome, choose Window > Extensions. Drag CloudToButt.crx into the page that appears. -Safari Version --------------- -Can be found here: https://github.com/logancollins/cloud-to-butt-safari - -Firefox Version ---------------- - -Can be found here: https://github.com/DaveRandom/cloud-to-butt-mozilla - - -Opera Version ---------------- +Installation +------------ -Can be found here: https://github.com/DaveRandom/cloud-to-butt-opera +In Chrome, choose Window > Extensions. Drag CloudToButt.zip into the page that appears. diff --git a/Source/content_script.js b/Source/content_script.js index 9e6baf57..bb035ecb 100644 --- a/Source/content_script.js +++ b/Source/content_script.js @@ -1,12 +1,13 @@ -walk(document.body); - -function walk(node) +window.onload = function () { + walk(document.body); +} + function walk(node) { // I stole this function from here: // http://is.gd/mwZp7E - + var child, next; - + var tagName = node.tagName ? node.tagName.toLowerCase() : ""; if (tagName == 'input' || tagName == 'textarea') { return; @@ -15,13 +16,13 @@ function walk(node) return; } - switch ( node.nodeType ) + switch ( node.nodeType ) { case 1: // Element case 9: // Document case 11: // Document fragment child = node.firstChild; - while ( child ) + while ( child ) { next = child.nextSibling; walk(child); @@ -35,7 +36,7 @@ function walk(node) } } -function handleText(textNode) +function handleText(textNode) { var v = textNode.nodeValue; @@ -43,8 +44,6 @@ function handleText(textNode) v = v.replace(/\bThe cloud\b/g, "My butt"); v = v.replace(/\bthe Cloud\b/g, "my Butt"); v = v.replace(/\bthe cloud\b/g, "my butt"); - + textNode.nodeValue = v; } - - diff --git a/Source/manifest.json b/Source/manifest.json index 205e2c4f..c6571ab9 100644 --- a/Source/manifest.json +++ b/Source/manifest.json @@ -1,15 +1,13 @@ { - "manifest_version": 2, + "manifest_version": 3, "name": "Cloud To Butt", - "version": "1.0", + "version": "1.0.1", "description": "Replaces the text 'the cloud' with 'my butt'.", - "content_scripts": + "content_scripts": [ { "matches": ["*://*/*"], - "js": ["content_script.js"], - "run_at": "document_end" + "js": ["content_script.js"] } ] } -