Skip to content

Instantly share code, notes, and snippets.

@PatrickJnr
Last active November 1, 2025 13:50
Show Gist options
  • Select an option

  • Save PatrickJnr/1480f03f716e98d6a6d45e5a940b1d67 to your computer and use it in GitHub Desktop.

Select an option

Save PatrickJnr/1480f03f716e98d6a6d45e5a940b1d67 to your computer and use it in GitHub Desktop.
Wikipedia to Grokipedia Redirector
// ==UserScript==
// @name Wikipedia to Grokipedia Redirector
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Automatically redirect Wikipedia to Grokipedia
// @author PatrickJr
// @match *://*.wikipedia.org/wiki/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
const currentUrl = window.location.href;
const wikiMatch = currentUrl.match(/wikipedia\.org\/wiki\/(.+)/);
if (wikiMatch && wikiMatch[1]) {
const pageTitle = wikiMatch[1];
const grokipediaUrl = `https://grokipedia.com/page/${pageTitle}`;
window.location.replace(grokipediaUrl);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment