etf.com view full article

Redirects to full article view for articles at etf.com.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        etf.com view full article
// @namespace   https://github.com/jmegner
// @version     0.4
// @description Redirects to full article view for articles at etf.com.
// @license     Unlicense
// @homepageURL https://github.com/jmegner/greasemonkey_etf_dot_com_view_full_article
// @supportURL  https://github.com/jmegner/greasemonkey_etf_dot_com_view_full_article/issues
// @match       https://www.etf.com/sections/*
// @run-at      document-start
// ==/UserScript==

// Only redirect if we're the top window.
// This condition prevents iframes embedded within etf.com pages from
// triggering redirects themselves: we only want the outer window to do that.
// It has the side-effect that if etf.com is embedded
// in a frame on some other website, we'll skip doing the redirect

var noPagingSuffix = "?nopaging=1";

if (window.self === window.top && window.location.href.indexOf(noPagingSuffix) == -1)
{
  window.location.replace(window.location.href + noPagingSuffix);
}