Skip to content

Instantly share code, notes, and snippets.

@TheEpicFace007
Created October 12, 2020 02:42
Show Gist options
  • Save TheEpicFace007/3e5fee4479cddfe1ee95a0a666250a96 to your computer and use it in GitHub Desktop.
Save TheEpicFace007/3e5fee4479cddfe1ee95a0a666250a96 to your computer and use it in GitHub Desktop.
Redirige le docs de microsoft en francais canadiens
// ==UserScript==
// @name Automatique CA-FR website
// @namespace http://tampermonkey.net/
// @version 9000
// @description met automaitquement les docs de microsoft en francais canadien
// @author ViniDalvino
// @match http*://docs.microsoft.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const search_result = location.pathname.search("fr-ca");
const url = location.href;
if (search_result != 1)
{
location.href = url.replace(/docs\.microsoft\.com\/\w?\w?\-\w?\w?\//gm, "docs.microsoft.com/fr-ca/")
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment