Banderi / Godot Forums temp redirect fix

// ==UserScript==
// @name         Godot Forums temp redirect fix
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Banderi
// @match        *://godotengine.org/qa/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=godotengine.org
// @grant        none
// @license MIT
// ==/UserScript==
var oldHref = document.location.href;

function redirect() {
  if (window.location.href.indexOf('godotengine.org/qa') > -1) {
    window.location.replace(window.location.toString().replace('godotengine.org/qa', 'ask.godotengine.org'));
  }
}
redirect();

window.onload = function () {
  var bodyList = document.querySelector("body")
  var observer = new MutationObserver(function (mutations) {
    mutations.forEach(function (mutation) {
      if (oldHref != document.location.href) {
        oldHref = document.location.href;
        console.log('location changed!');
        redirect();
      }
    });
  });
  var config = {
    childList: true,
    subtree: true
  };
  observer.observe(bodyList, config);
};