by yosito · 3y ago · 0 comments
You could probably get ChatGPT to do that.
here's the script from ChatGPTs response:
// ==UserScript==
// @name Replace Word1 with Word2
// @namespace your-namespace
// @version 1.0
// @description Replaces every occurrence of word1 with word2
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const word1 = "Open AI";
const word2 = '"Open" AI';
const regex = new RegExp(word1, "g");
document.body.innerHTML = document.body.innerHTML.replace(regex, word2);
})();
Need help installing a chrome userscript? Check the multiple answers at
https://stackoverflow.com/questions/5258989/manually-adding-...PS I don't use Chrome myself.
Also, someone correct me if I'm wrong, but I think even Safari uses "Web Extensions" at this point too, so write once, have extensions ready for three platforms. Obviously packaging is different, and they have some idiosyncrasies. But it mostly works alright.