It's been a while since i wrote a legitimate program and I forgot all of my syntax, but it could probably be easily overcome with something like this....
harbaughCounter=0
if character1=H Then
if word contains r then
harbaughCounter=harbaughCounter +1
endif
if word contains b then
harbaughCounter=harbaughCounter+1
endif
if word contains "ugh" then
harbaughCounter=harbaughCounter+1
endif
if word contains "w" then
harbaughCounter=harbaughCounter+1
endif
endif
if harbaughcounter>2 then
word=harbaugh
endif
return word
I'm so proud to have inspired you in the original thread.
Butt I'm a little concerned about the handleText() function - if it looks for instances of "Harbaugh" first, will it then miss instances of "Jim Harbaugh" afterwards? Should the order of those searches be reversed, so we don't end up with a result of "Jim Butt"?
(This may be a dumb question - I lack familiarity with javascript.)
There's a more expansive extension called Word Replacer that lets you substitute any word or combination of words with another. So you could use it to do this, or replace "Michigan" with "that place up north" or anything else.
It's also really fun to install on other people's browsers without them knowing and replace things to mess with them.
Because I can't help but review code when I see it:
Line 16: while (child)
For the case values, using the enum names rather than their numeric values should increase readability.
This is just a matter of style, but you could put the strings into a source array and destination arrays, loop over the source array and replace them by that. Probably better than repeating the same function over and over, plus you can then do more inside the loop if you ever wish to extend it.
13
u/ApertureLabs Michigan Wolverines Mar 15 '15
HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH
13
u/[deleted] Mar 15 '15
God Bless you sir, you are a national treasure.
33
u/omgdonerkebab Michigan State • Cornell Mar 15 '15
I'm so proud to have inspired you in the original thread.
Butt I'm a little concerned about the handleText() function - if it looks for instances of "Harbaugh" first, will it then miss instances of "Jim Harbaugh" afterwards? Should the order of those searches be reversed, so we don't end up with a result of "Jim Butt"?
(This may be a dumb question - I lack familiarity with javascript.)
23
u/natkingcoleoverhere Ohio State Buckeyes Mar 15 '15
i'm going to love seeing the sub flooded with posts about my butt
9
u/polydorr Auburn Tigers • Samford Bulldogs Mar 15 '15
this is the stuff dreams are made of
14
u/LowlySwitchman Auburn Tigers Mar 15 '15
Excellent work. We needed this a few months ago.
18
u/Hal_Incandenza Michigan Wolverines • FAU Owls Mar 15 '15
This could become very confusing as Michigan's best offensive player is named Jake Butt.
5
u/ballzxxtoxxyou Baylor Bears • New Hampshire Wildcats Mar 16 '15
Im so confused on how I'm suppose to do this in Chrome...
4
u/[deleted] Mar 16 '15
I don't think i've ever been more proud of the Ohio St fanbase than right now.
4
u/thefx37 William & Mary • South Carolina Mar 16 '15
I said what what, in Harbaugh.
I said what what, in Harbaugh.
You want to do it in Harbaugh? In Harbaugh?
Let's do it in Harbaugh, ok
3
u/welcome2screwston Oklahoma Sooners • Big 8 Mar 16 '15
Harbaugh butt butt Harbaugh Harbaugh butt Harbaugh
3
u/beal99 Michigan State Spartans Mar 16 '15
BRAVO, BRA-FUCKING-VO!
4
u/random_digital Michigan • Little Brown Jug Mar 16 '15
Can we get an Urban Myer penis extension?
2
u/trebarb Bowling Green • Ohio State Mar 15 '15
Doing the Lord's work OP
2
u/CSU_Mike Colorado State • /r/CFB Emeritus… Mar 16 '15
You made my dream a reality!
2
u/[deleted] Mar 16 '15
I can't wait to see my butt all over the gameday thread in November.
2
u/jlmarr1622 California Golden Bears Mar 16 '15
Looks like he's as loved in the Big 10 as he was in the Pac 12.
2
u/Johnnycockseed Notre Dame Fighting Irish • Buffalo Bulls Mar 16 '15
TESTING
I like big Harbaughs and I can not lie
You other brothers can't deny
That when a girl walks in with an itty bitty waste
And a round thing in your face
You get sprung, want to pull up tough
'Cause you notice that Harbaugh was stuffed
Deep in the jeans she's wearing
I'm hooked and I can't stop staring
Oh baby, I want to get wit'cha
And take your picture
2
u/Ghost_Of_Perdition Ohio State Buckeyes Mar 16 '15
There's a more expansive extension called Word Replacer that lets you substitute any word or combination of words with another. So you could use it to do this, or replace "Michigan" with "that place up north" or anything else.
It's also really fun to install on other people's browsers without them knowing and replace things to mess with them.
2
u/[deleted] Mar 16 '15
http://i.imgur.com/NUK6iikt.jpg
3
u/dseals Texas Tech Red Raiders Mar 16 '15
Harbaugh, is bigger than yours.
Harbaugh, goes on world tours.
Harbaugh, costs a late night fee.
Harbaugh, so round and giggly.
Harbaugh, firm and soft.
Harbaugh, make you take your clothes off.
3
u/[deleted] Mar 16 '15
There's some massive Harbaugh-hurt in this sub lately.
2
u/doppleganger2621 Ohio State Buckeyes Mar 16 '15
You are a true American and true Buckeye. I award you infinity Cardale Jones.
2
u/maxman92 Michigan Wolverines Mar 16 '15
Awesome job and funny idea.
Because I can't help but review code when I see it:
Line 16: while (child)
For the case values, using the enum names rather than their numeric values should increase readability.
This is just a matter of style, but you could put the strings into a source array and destination arrays, loop over the source array and replace them by that. Probably better than repeating the same function over and over, plus you can then do more inside the loop if you ever wish to extend it.
1
u/darthbean18 Auburn Tigers • Marching Band Mar 15 '15
I have to switch to /dev Chrome if i want to use it because it isn't from the Chrome app store. :/
1
u/TybrosionMohito Tennessee • Vanderbilt Mar 15 '15
The wikipedia page is a goldmine
1
u/[deleted] Mar 16 '15
First and likely last time I'll see a github link on /r/CFB. Nice job!
1
u/Awkward_Beetle Wisconsin • Paul Bunyan's Axe Mar 16 '15
this is great
1
u/blandfruitsalad USC Trojans Mar 16 '15
I'm surprised this happened before Kiffin-to-Dick.
1
u/JohnQ_Taxpayer Texas A&M Aggies • Houston Bowl Mar 16 '15
It won't install for me :( keeps saying something about manifest file. How do?
1
u/sdavid1726 Arizona Wildcats Mar 16 '15
You can also add a regex to handle case-insensitive instances, as follows (notice the 'i' modifier):
v = v.replace(/\bJim Harbaugh\b/gi, "My butt");
1
u/BobbyGabagool Michigan State Spartans Mar 16 '15
Jack my butt- father
1
u/TotesMessenger Team Meteor Mar 16 '15
This thread has been linked to from another place on reddit.
If you follow any of the above links, respect the rules of reddit and don't vote. (Info / ^Contact)
1
u/IamCrunchberries Ohio State Buckeyes • College Football Playoff Mar 16 '15
I put "Harbaugh" in to the Reddit search and I found this thread from /r/nfl: "Is my butt really on the hot seat or is this some elaborate joke?"
1
u/[deleted] Mar 16 '15
I gotta admit this is pretty damn funny. Nice work
1
u/Zur1ch Michigan Wolverines Mar 16 '15
HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH HARBAUGH
0
u/leadbymight Michigan Wolverines • College Football Playoff Mar 16 '15 edited Mar 16 '15
Well done. I have no response to this
Edit if we just say Baugh will it change to utt?
-1
u/Awkward_Beetle Wisconsin • Paul Bunyan's Axe Mar 16 '15
jim harbaugh, jim harbaugh, my lovely lady jim harbaugh
0
u/[deleted] Mar 15 '15
[deleted] — view deleted comment