redirect gawker/go media sites to latest

redirects avclub.com to avclub.com/latest

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        redirect gawker/go media sites to latest
// @namespace   Violentmonkey Scripts
// @match       *://*.gizmodo.com/*
// @match       *://*.jalopnik.com/*
// @match       *://*.jezebel.com/*
// @match       *://*.kotaku.com/*
// @match       *://*.lifehacker.com/*
// @match       *://*.deadspin.com/*
// @match       *://*.theroot.com/*
// @match       *://*.thetakeout.com/*
// @match       *://*.theonion.com/*
// @match       *://*.theinventory.com/*
// @match       *://*.kinja.com/*
// @match       *://*.avclub.com/*
// @grant       none
// @version     2020-01-01
// @author      jccalhoun
// @description redirects avclub.com to avclub.com/latest
// ==/UserScript==

for (var i = 0; i < 11; i++) {
        document.getElementsByClassName("js_topbar")[0].getElementsByTagName('a')[i].href += "latest";
    };
//the writing of this was aided by using the answers here: https://stackoverflow.com/questions/39899504/how-to-replace-a-link-text-using-javascript/39899712 and https://www.w3schools.com/jsref/prop_html_innerhtml.asp