Greasy Fork

slashdot de-hostname

redirect from hostname.slashdot.org to slashdot.org

目前为 2019-06-23 提交的版本。查看 最新版本

// ==UserScript==
// @name        slashdot de-hostname
// @namespace   slashdot
// @description redirect from hostname.slashdot.org to slashdot.org
// @include     https://*.slashdot.org/*
// @exclude     https://slashdot.org/*
// @version     0.1a
// @grant       none
// @run-at      document-start
// ==/UserScript==

var loc = window.location.href;
loc = loc.substring(loc.indexOf('//') + 1, loc.length);
window.location.href = "https://" + loc.substring(loc.indexOf('.') + 1, loc.length);