wiki redirect to the english version

Redirect articles to the english Wikipedia (if exist)

// ==UserScript==
// @name           wiki redirect to the english version
// @author         jaccob
// @version        1.1
// @namespace      userscripts
// @description    Redirect articles to the english Wikipedia (if exist)
// @license        GPLv3
// @include        https://*.wikipedia.org/wiki/*
// @exclude        https://en.wikipedia.org/wiki/*
// ==/UserScript==

var ref = document.querySelector('.interlanguage-link.interwiki-en.mw-list-item > a');

if (ref != null) {
    window.location.replace(ref);
}