• Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
Thursday, November 19, 2026
No Result
View All Result
Subscribe Now
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    Trump’s Deal Turns Sour as Voters Withdraw Support

    Trump’s Deal Turns Sour as Voters Withdraw Support

    FAA Administrator Takes Responsibility as Mullin Faces Tough Questions Over Nationwide Ground Stop

    FAA Administrator Takes Responsibility as Mullin Faces Tough Questions Over Nationwide Ground Stop

    Mary Peltola Emerges Victorious in Alaska Senate Race, Making History for Democrats

    Mary Peltola Emerges Victorious in Alaska Senate Race, Making History for Democrats

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Trump Administration Revokes Pay Increase for Head Start Educators

    Trump Administration Revokes Pay Increase for Head Start Educators

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
The Insight Post
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    Trump’s Deal Turns Sour as Voters Withdraw Support

    Trump’s Deal Turns Sour as Voters Withdraw Support

    FAA Administrator Takes Responsibility as Mullin Faces Tough Questions Over Nationwide Ground Stop

    FAA Administrator Takes Responsibility as Mullin Faces Tough Questions Over Nationwide Ground Stop

    Mary Peltola Emerges Victorious in Alaska Senate Race, Making History for Democrats

    Mary Peltola Emerges Victorious in Alaska Senate Race, Making History for Democrats

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Trump Administration Revokes Pay Increase for Head Start Educators

    Trump Administration Revokes Pay Increase for Head Start Educators

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
No Result
View All Result
No Result
View All Result
Home Tech

How I made a Chrome extension for converting Reg US spelling • The Register

by Theinsightpost
October 22, 2022
in Tech
0 0
0
How I made a Chrome extension for converting Reg US spelling • The Register


Hands On The Register began life in London in 1994 and today has journalists and other staff all over the world, which is to say San Francisco, Sydney, Singapore, Berlin, and beyond.

It used to be that our vultures wrote in their local style: Americans used US spellings, the British relied on UK spellings, the Australians were pretty much in UK-mode, too, and everyone else did what felt natural. If an article was, for instance, written by the US team and published in the UK morning, the spelling would often be changed to British.

As we added more writers and editors around the world, and reached more people globally – now about 40 million unique readers a year – across all sorts of time zones, it became necessary for logistical and professional reasons to agree on just one consistent style for the whole site. After The Register moved from a .co.uk to a .com during the pandemic, we chose American spelling.

Why? Because it honestly reflects the true global nature of our readership. UK spelling may make us appear UK-only. Yes, we grew from Great Britain, but today we cater for as many enterprise tech folks as we can around the planet. We want our flavor of irreverent, informed technology journalism spread far and wide, so that we can do our bit to challenge vendors, explain what’s going on, and bite the hand that feeds IT.

The US spelling isn’t everyone’s cup of tea, though, or at least that’s the impression we got upon reading brick-centered notes hurled through our digital windows lately.

As an olive branch that passionate segment of our readership with a preference for the King’s English, this vulture decided to create a Chrome browser extension to change the words in published articles from US to UK spellings.

It’s called Spellerizer, because I was going for subtly stupid in the hope of standing apart from the sprawling, unrepentant witlessness that is the internet’s new normal. Also, the daft name serves as a reminder that the extension does not work all that well. But hey, it’s free.

Translation, even between US and UK spellings, is an art that requires consideration of context. Spellerizer is not that artful; it relies on a brute force search-and-replace algorithm that pays no attention to the words around it. So if it sees “check,” it will replace the US spelling with “cheque,” even if the appropriate UK spelling in that instance also happens to be “check.”

Really, I should have relied on a machine learning model to make more informed spelling changes. But then this wouldn’t have been a weekend coding project. Feel free to submit improvements via GitHub.

My hope in creating Spellerizer is to demonstrate that it’s reasonably easy to write a browser extension and to encourage those modestly familiar with JavaScript to try their hand at it.

Of course there are similarly approachable options, such as shell, Perl, or Python scripts to fetch, translate, and spit out pages. But the browser is a particularly important bit of software and is worth customizing if you enjoy writing code.

Spellerizer can be downloaded and installed from the Chrome Web Store or from its GitHub repo. The former is a better option if you want it to persist and receive updates – some people report that Chrome removes manually loaded (unpacked) extensions on browser restart as a security precaution. However, that’s not been my experience.

As I haven’t had an extension in the Chrome Web Store before, you can expect to see a warning – “This extension is not trusted by Enhanced Safe Browsing.” – on the chrome://extensions/ page post-installation. Google explains, “For new developers, it generally takes a few months to become trusted.”

Spellerizer is not officially endorsed by or supported by The Register and its publisher Situation Publishing which makes no warranty about its fitness or function. As the Chrome Web Store listing says, you probably don’t need it. But if you want it, if you really really want it, my editors are okay with the extension’s existence for the time being.

Google’s Chrome Extension API documentation is a good place to get familiar with the quirks of building a browser extension. Once you have a basic sense of how the major components (the manifest file, the service worker, content scripts, and other extension-related web pages) relate to one another, it’s worth installing an extension like Chrome extension source viewer (CRX) to view extension source code from the Chrome Web Store prior to download.

It’s possible to view the source code of an extension that’s already installed but it takes a bit more effort because you have to know the path to Chrome’s extension folder (chrome://version/ -> [Profile Path field]/extensions) and then recognize the correct 32-character identifier used for the extension’s directory name among others that may be present.

Spellerizer is perhaps more complicated than it needs to be because I chose to implement internationalization – a way to replace visible text strings in the extension with translated text based on the browser’s set language. The localize.js script gathers text values from HTML page elements marked with the “data-i18n” attribute and then substitutes translations pulled from the messages.json file.

The extension, written using Manifest v3, functions by loading the service worker, background.js, and showing onboarding-page.html upon installation. Preliminaries out of the way, it adds a listener function to the Spellerizer icon, which if you followed the instructions and pinned to the browser bar, will be visible without poking around the Extensions popup menu.

The listener function attached to the Spellerizer’s vulture icon triggers the content-script.js file, which does the bulk of the work. If clicked while viewing a Register page, it fetches the spelling data file, spelling_data.json (made available by developer Heiswayi Nrird under an MIT license), and iterates through all the DOM nodes – a tree structure used to organize the elements on a web page.

The approach I took was not particularly sophisticated – I have since learned that there’s a more concise way to iterate DOM nodes using a Treewalker object – but loops within loops get the job done. The scanWords function (line 20, content-script.js) separates display text associated with DOM nodes into individual words and compares each to every one of the 1700 or so US/UK word pairs. If it finds a match, it swaps the US spelling for the UK one, preserving the case of the original.

If the script finds any words to replace, it will update the extension icon’s badge with a number representing swapped word count. The badge disappears when you click to a different browser tab. And if you reload a Register page, any changes made disappear as they’re only client-side.

There’s also an options page that I added to test persisting data via the local storage API. Accessible via a ctrl-click on the Spellerizer icon, the options menu has a single checkbox labeled “World Peace.”

As you might imagine, it has no effect. Enjoy. ®



Source link

ShareTweetSend
Previous Post

3 charged in connection with attempted carjacking of off-duty officer that left a person shot – Chicago Tribune

Next Post

The stakes will increase come the 2024 T20 World Cup

Related News

Microsoft’s Satya Nadella Reveals Strategic Rationale Behind Layoff of 60,000 Employees
Tech

Microsoft’s Satya Nadella Reveals Strategic Rationale Behind Layoff of 60,000 Employees

November 19, 2026
Cybercriminals Embrace Innovative AI Tool for Streamlined Hacking Operations
Tech

Cybercriminals Embrace Innovative AI Tool for Streamlined Hacking Operations

November 18, 2026
Transform Your Laptop Setup with These 5 Affordable Accessories
Tech

Transform Your Laptop Setup with These 5 Affordable Accessories

November 15, 2026
Microsoft 365 Services Gradually Restore Functionality Following Global Outage
Tech

Microsoft 365 Services Gradually Restore Functionality Following Global Outage

November 14, 2026
Next Post
The stakes will increase come the 2024 T20 World Cup

The stakes will increase come the 2024 T20 World Cup

Discussion about this post

Subscribe To Our Newsletters

    Customer Support


    1251 Wilcrest Drive
    Houston, Texas
    77042 USA
    Call-832.795.1420
    e-mail – news@theinsightpost.com

    Subscribe To Our Newsletters

      Categories

      • Africa
      • Africa-East
      • African Sports
      • American Sports
      • Arts
      • Asia
      • Australia
      • Business
      • Business Asia
      • Business- Africa
      • Canada
      • Defense
      • Education
      • Egypt
      • Energy
      • Entertainment
      • Europe
      • European Soccer
      • Finance
      • Germany
      • Ghana
      • Health
      • Insight
      • International
      • Investing
      • Japan
      • Latest Headlines
      • Life & Living
      • Markets
      • Mobile
      • Movies
      • New Zealand
      • Nigeria
      • Politics
      • Scholarships
      • Science
      • South Africa
      • South America
      • Sports
      • Tech
      • Travel
      • Travel-Africa
      • UK
      • USA
      • Weather
      • World
      No Result
      View All Result

      Recent News

      Unwrap Joy: Over 89 Thoughtful Christmas Gift Ideas for Her in 2026

      Unwrap Joy: Over 89 Thoughtful Christmas Gift Ideas for Her in 2026

      November 19, 2026

      Uganda’s Central Bank Intervenes in Forex Market Following Ineffective Rate Hike to Support Shilling

      November 19, 2026
      Kubayi Issues Urgent Warning to Building Hijackers: “Time to Move Out”

      Kubayi Issues Urgent Warning to Building Hijackers: “Time to Move Out”

      November 19, 2026
      Two African Nations Shine in List of Top 20 Must-Visit Tourist Destinations for 2024, Reports Business Insider Africa

      Two African Nations Shine in List of Top 20 Must-Visit Tourist Destinations for 2024, Reports Business Insider Africa

      November 19, 2026
      • Home
      • Advertise With Us
      • About Us
      • Corporate
      • Consumer Rewards
      • Forum
      • Privacy Policy
      • Social Trends

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      Welcome Back!

      Login to your account below

      Forgotten Password?

      Retrieve your password

      Please enter your username or email address to reset your password.

      Log In

      Add New Playlist

      We are using cookies to give you the best experience on our website.

      You can find out more about which cookies we are using or switch them off in .

      No Result
      View All Result
      • Home
      • Insight
      • Blog
      • Business
      • Entertainment
      • Health
      • Politics
      • Shop
        • Gift Shop
        • Value Shop
        • Store
        • Bargain Shop
        • Discount
      • Sports
      • Tech
      • Travel
      • USA
      • Video
      • World
        • Asia
        • Africa
        • South America
        • North America
        • Europe
        • Oceania

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      The Insight Post
      Powered by  GDPR Cookie Compliance
      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      Cookie Policy

      More information about our Cookie Policy