This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LoganDark2's profile picture

The Unbritishifier

Started by LoganDark2, 01 February 2018 - 12:25 PM
LoganDark2 #1
Posted 01 February 2018 - 01:25 PM
Warning: This script modifies the client-side forum page, which means some features like search will not work as expected, as the American spellings you will see when using the script might actually be spelled differently in the post, and the server side sees those spellings instead.
Something rather annoying for me that I've been noticing quite a bit lately is that most of the forum members use British english. Now, while this might not be a problem for anyone else, it's quite annoying for me.

To solve this problem, I wrote myself a Tampermonkey script to automatically convert those pesky British spellings ("colour", "serialise", "licence") to my preferred American spellings (color, serialize, license). Since others may want to use it as well, I'm posting it here.

I understand some people may find it trivial, but my personal preference is American spelling. Sorry, Brits. The script can be found on Pastebin, and you can do whatever you want to it as long as you follow the terms of the MIT license (also embedded in the code).

I'd advise against reading the code if you're a diehard fan of British spelling, since I diss it a bit in there. Nothing too offensive, but it could trigger somebody. Just playing it safe.

Spoiler
to


And this is an important feature too:


to


Code blocks are preserved exactly, like they should be.
SquidDev #2
Posted 01 February 2018 - 07:55 PM
Something rather annoying for me that I've been noticing quite a bit lately is that most of the forum members use British english. Now, while this might not be a problem for anyone else, it's quite annoying for me.
Gee, how do you think the rest of us feel watching the English language be brutalised :P/>. In all seriousness, I rather like seeing different spellings of words, its' a nice reminder that the internet isn't homogeneous - there's people from all sorts of countries and languages. Apart from lazer, that spelling should go back to the pit it first crawled from.
CrazedProgrammer #3
Posted 01 February 2018 - 08:05 PM

Let me keep my beautiful colour
Edited on 01 February 2018 - 07:10 PM
LoganDark2 #4
Posted 01 February 2018 - 08:06 PM
This was half-joke, half-serious. I do use it myself, but I'm not in any way saying any spelling is better. I'm just sharing what I made.
HydroNitrogen #5
Posted 01 February 2018 - 09:26 PM
Wait like for real you are filtering out any foreign / diffrent culture content? That is how one gets major tunnel vision…
LoganDark2 #6
Posted 01 February 2018 - 11:58 PM
Wait like for real you are filtering out any foreign / diffrent culture content? That is how one gets major tunnel vision…

No! No. I am simply changing the spelling of words. "colour" to "color", etc
H4X0RZ #7
Posted 02 February 2018 - 05:50 AM
Wait like for real you are filtering out any foreign / diffrent culture content? That is how one gets major tunnel vision…

It's more like someone from Bayern filtering out the german that's taught at schools and universities.
EveryOS #8
Posted 02 February 2018 - 12:01 PM
The only British spelling I use is flavour, and only when I talk about versions of operating systems.
Other than that, I don't think I use any British spellings
Purple #9
Posted 03 February 2018 - 06:22 PM
How do you install these things and how easy would it be to convert it so that it produces the opposite effect? As in that it converts american to british?
LoganDark2 #10
Posted 03 February 2018 - 06:30 PM
How do you install these things and how easy would it be to convert it so that it produces the opposite effect? As in that it converts american to british?

a Tampermonkey script

https://tampermonkey.net/faq.php#Q100
https://tampermonkey.net/faq.php#Q102

British English still has a lot (a LOT) of words ending with "or". As this script blindly converts most words ending in "our" to "or", converting the other way ("or" to "our") would mess up way too many words. Plus, you would be adding a letter, instead of removing it - that would require guessing the case the extra letter would be in, which could be weird with mixed case words (although that's probably an edge case).

Converting "license" to "licence" and other words like that would be easy, since you're just changing a letter, not adding one. I'm not too interested in doing the work for you to "reverse" the script (since I myself prefer American spelling), so unfortunately if you're unable to code in JavaScript you won't be able to make any significant modifications yourself.

You could just add all the conversions you want to the specificBritishMisspellings (don't get mad at me for the name, I'm not too happy with myself either) object, since that is performed last (for every single word found in the document text). If you're able to code in Lua (which most of the people here are able to), you should be able to pick up the syntax for at least adding definitions to that object, since Lua tables and JS objects have a similar enough syntax.

Hope I helped.
Purple #11
Posted 07 February 2018 - 01:10 PM
So basically it's a thing for a browser I don't use. Forget I asked.
LoganDark2 #12
Posted 07 February 2018 - 08:10 PM
So basically it's a thing for a browser I don't use. Forget I asked.

:o/> You don't use Google Chrome? How could you! Google Chrome is the best browser ever made, ever! /s
Lupus590 #13
Posted 08 February 2018 - 10:10 AM
So basically it's a thing for a browser I don't use. Forget I asked.

I'm going to assume you use firefox then (probably not a 100% safe assumption, but meh): https://addons.mozilla.org/en-GB/firefox/addon/tampermonkey/
LoganDark2 #14
Posted 08 February 2018 - 03:16 PM
So basically it's a thing for a browser I don't use. Forget I asked.

I'm going to assume you use firefox then (probably not a 100% safe assumption, but meh): https://addons.mozilla.org/en-GB/firefox/addon/tampermonkey/

Isn't the Firefox version called Greasemonkey? Or is that just the old name and it's Tampermonkey everywhere now?
EveryOS #15
Posted 08 February 2018 - 03:50 PM
So basically it's a thing for a browser I don't use. Forget I asked.

:o/> You don't use Google Chrome? How could you! Google Chrome is the best browser ever made, ever! /s
Actually chromium is one-up to chrome
Opera, based off of chromium, is third best
Edited on 08 February 2018 - 02:51 PM
H4X0RZ #16
Posted 09 February 2018 - 12:34 PM
So basically it's a thing for a browser I don't use. Forget I asked.

:o/>/> You don't use Google Chrome? How could you! Google Chrome is the best browser ever made, ever! /s
Actually chromium is one-up to chrome
Opera, based off of chromium, is third best

Quantum > the chrome family :P/>
LoganDark2 #17
Posted 09 February 2018 - 12:36 PM
So basically it's a thing for a browser I don't use. Forget I asked.

:o/>/> You don't use Google Chrome? How could you! Google Chrome is the best browser ever made, ever! /s
Actually chromium is one-up to chrome
Opera, based off of chromium, is third best

Quantum > the chrome family :P/>

What a unique opinion :P/>
LDDestroier #18
Posted 09 February 2018 - 12:57 PM
Quantum > the chrome family :P/>

True for everything except flash games. There are too many good flash games.
LoganDark2 #19
Posted 09 February 2018 - 12:58 PM
Quantum > the chrome family :P/>

True [snip]

*gasp*
Purple #20
Posted 09 February 2018 - 02:12 PM
When I looked the term up before my last post, and I had to do it because all I got to my question about what it is was a repeat of the word without explanation so I had to manually look it up thus rendering me asking pointless and the reply anger inducing, the internet told me it was a thing for Microsoft Edge. And I don't use that.

Anyway, I don't really care anymore. Newer really cared either. Just wanted to know out of curiosity.
Edited on 09 February 2018 - 01:12 PM
LoganDark2 #21
Posted 09 February 2018 - 02:13 PM
When I looked the term up before my last post, and I had to do it because all I got to my question about what it is was a repeat of the word without explanation so I had to manually look it up thus rendering me asking pointless and the reply anger inducing, the internet told me it was a thing for Microsoft Edge. And I don't use that.

Anyway, I don't really care anymore. Newer really cared either. Just wanted to know out of curiosity.

What term up? Quantum? I think they're referring to Firefox Quantum.
EveryOS #22
Posted 09 February 2018 - 03:05 PM
Quantum > the chrome family :P/>
I thought quantum was the latest version of firefox? I'll look it up soon.

EDIT: Yea, Quantum is the firefox family
Edited on 09 February 2018 - 02:11 PM
H4X0RZ #23
Posted 09 February 2018 - 07:20 PM
Quantum > the chrome family :P/>
I thought quantum was the latest version of firefox? I'll look it up soon.

EDIT: Yea, Quantum is the firefox family

Yea, Quantum is the new firefox. I'm on nightly though, which was "Quantum" since last year :^)
Purple #24
Posted 11 February 2018 - 01:41 PM
So basically it's a thing for a browser I don't use. Forget I asked.

I'm going to assume you use firefox then (probably not a 100% safe assumption, but meh): https://addons.mozil...n/tampermonkey/

Isn't the Firefox version called Greasemonkey? Or is that just the old name and it's Tampermonkey everywhere now?
I know it by that name as well. I do not keep my browser up to date as keeping slightly older versions ensures I can more easily perform comparability testing without resorting to too many virtual machines.
biggest yikes #25
Posted 10 March 2018 - 09:06 PM
This thread offends me on so many levels.
Edited on 10 March 2018 - 08:06 PM
LoganDark2 #26
Posted 11 March 2018 - 06:39 AM
This thread offends me on so many levels.

Why?
biggest yikes #27
Posted 11 March 2018 - 05:20 PM
This thread offends me on so many levels.

Why?
People insulting British English and Firefox :P/>
LoganDark2 #28
Posted 11 March 2018 - 05:21 PM
This thread offends me on so many levels.

Why?
People insulting British English and Firefox :P/>

I never insulted British English or Firefox.