Greasy Fork

slashdot de-hostname

Redirect *.slashdot.org to slashdot.org

目前为 2019-05-27 提交的版本。查看 最新版本

// ==UserScript==
// @name        slashdot de-hostname
// @description Redirect *.slashdot.org to slashdot.org
// @namespace   slashdot
// @include     https://*.slashdot.org/*
// @exclude     https://slashdot.org/*
// @version     1
// @grant       none
// ==/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);