navigate-canonical

Go to the canonical page

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name         navigate-canonical
// @namespace    https://ciffelia.com/
// @version      1.0.0
// @description  Go to the canonical page
// @author       Ciffelia <[email protected]> (https://ciffelia.com/)
// @license      MIT
// @homepage     https://github.com/ciffelia/navigate-canonical#readme
// @supportURL   https://github.com/ciffelia/navigate-canonical/issues
// @include      *
// @grant        GM_registerMenuCommand
// @run-at       document-idle
// ==/UserScript==

(function () {
  'use strict';

  const navigate = () => {
    location.href = document.querySelector('link[rel=canonical]').href;
  };

  GM_registerMenuCommand('Go to the canonical page', navigate, 'g');

}());