From d79a13a3b3c26cd4655eb81ae3b29d95c1b2478d Mon Sep 17 00:00:00 2001 From: Amrit Panesar Date: Fri, 6 Jun 2014 09:37:24 -0700 Subject: [PATCH] First Commit! This should work out nicely --- CloudToButt.crx | Bin 1065 -> 0 bytes README.md | 34 +++------------------------------- Source/content_script.js | 11 ++++++----- Source/manifest.json | 4 ++-- 4 files changed, 11 insertions(+), 38 deletions(-) delete mode 100644 CloudToButt.crx 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/README.md b/README.md index 5a44f51..f0d06a5 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,9 @@ -cloud-to-butt +walk-to-wank ============= -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) - -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. Thank you for your concern. - -Screenshot Gallery ------------------- - -http://www.flickr.com/groups/cloud-to-butt/ +Chrome extension that replaces occurrences of 'walk' with 'wank' 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 ---------------- - -Can be found here: https://github.com/DaveRandom/cloud-to-butt-opera +In Chrome, choose Window > Extensions. Drag WalkToWank.crx into the page that appears. diff --git a/Source/content_script.js b/Source/content_script.js index 5a61aaa..0b11982 100644 --- a/Source/content_script.js +++ b/Source/content_script.js @@ -30,11 +30,12 @@ function walk(node) function handleText(textNode) { var v = textNode.nodeValue; - - 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"); - v = v.replace(/\bthe cloud\b/g, "my butt"); + + // Deal with the easy case + v = v.replace(/\b(W|w)alk/g, function(match, p1, p2, offset, string) { + w = String.fromCharCode(p1.charCodeAt(0)); + return w + "ank"; + }); textNode.nodeValue = v; } diff --git a/Source/manifest.json b/Source/manifest.json index 205e2c4..1a26132 100644 --- a/Source/manifest.json +++ b/Source/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 2, - "name": "Cloud To Butt", + "name": "Walk To Wank", "version": "1.0", - "description": "Replaces the text 'the cloud' with 'my butt'.", + "description": "Replaces the text 'walk' with 'wank'.", "content_scripts": [ {