Fjords begone

Redirects fjorded e-hentai galleries to their sadpanda version.

// ==UserScript==
// @name           Fjords begone
// @namespace      Mexiguy
// @author         Mexiguy
// @version        1.1
// @description    Redirects fjorded e-hentai galleries to their sadpanda version.
// @include        http://g.e-hentai.org/*
// @grant          none
// @run-at         document-start
// ==/UserScript==

//Get the page title and URL of the gallery
var title = document.title;
var url = document.location.toString().toLowerCase();

//Check if it's fjorded
if (title.search("Gallery Not Available") != -1)
{
    document.title = "Redirecting..."
    
    //Change the URL to the sadpanda one and redirect.
    url = url.replace("http://g.e-", "https://ex");
    document.location = url;
}