NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name HKGolden redirect to forum15 // @namespace Saren // @description Let's redirect non-forum15 url to forum15 // @include *.hkgolden.com/* // @version 1 // @grant none // @run-at document-start // ==/UserScript== var handleForum = function () { for (var i = 1; i <= 14; i++) { if (window.location.host.indexOf('forum' + i + '.') !== - 1) { window.location = window.location.href.replace('forum' + i + '.', 'forum15.'); return true; } } return false; } var handleM = function () { for (var i = 1; i <= 5; i++) { if (window.location.host.indexOf('m' + i + '.') !== - 1) { window.location = window.location.href.replace('m' + i + '.', 'forum15.'); return true; } } return false; } handleForum() || handleM();