GameFAQs - Print Version FAQ links

Adds the string '?print=1' to all of the FAQ links on a game's FAQ page, making them point to the lightweight print version.

目前为 2018-04-08 提交的版本。查看 最新版本

// ==UserScript==
// @name        GameFAQs - Print Version FAQ links
// @namespace   rudicron
// @description Adds the string '?print=1' to all of the FAQ links on a game's FAQ page, making them point to the lightweight print version.
// @include     http://www.gamefaqs.com/*/*/faqs
// @include     https://www.gamefaqs.com/*/*/faqs
// @include     http://gamefaqs.gamespot.com/*/*/faqs
// @include     https://gamefaqs.gamespot.com/*/*/faqs
// @version     1.1
// @grant       none
// ==/UserScript==

var aList = document.body.querySelectorAll("td.ctitle > a");

for (var a of aList) {
  var link = a.getAttribute("href");
  if (link.includes("?")) {
    if (! link.toLowerCase().includes("print=1") ) {
      a.setAttribute("href", link.concat("&print=1"));
    }
  } else {
    a.setAttribute("href", link.concat("?print=1"));
  }
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址