Steam Game Page - Add Links To Game Trailer & Gameplay (Search On Piped and without commentaries)

This script is a fork of CoopCoding's script. It has custom features like searching on piped instead of youtube, searching on Searx, and tries to bring gameplay videos without youtuber's commentaries. It also adds two links for piracy. Fuck Steam and corpos making money with our personal data.

当前为 2023-02-27 提交的版本,查看 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Steam Game Page - Add Links To Game Trailer & Gameplay (Search On Piped and without commentaries)
// @namespace    coop
// @version      1.0
// @description  This script is a fork of CoopCoding's script. It has custom features like searching on piped instead of youtube, searching on Searx, and tries to bring gameplay videos without youtuber's commentaries. It also adds two links for piracy. Fuck Steam and corpos making money with our personal data.
// @author       You
// @match        http://store.steampowered.com/app/*
// @match        https://store.steampowered.com/app/*
// @grant        none
// @license MIT
// ==/UserScript==

const gameName = document.querySelector('.apphub_AppName').textContent.trim()

const breadcrumbsContainer = document.querySelector('.breadcrumbs')

breadcrumbsContainer.setAttribute('style', `
display: flex;
justify-content: space-around;
`)

const metaLinksContainer = document.createElement('div')
metaLinksContainer.setAttribute('style', `
display: flex;
justify-content: space-around;
width: 420px;
`)

const gogSearchLink = document.createElement('a')
gogSearchLink.href = 'https://searx.tiekoetter.com/search?q=site%3Agog-games.com+' + gameName
gogSearchLink.textContent = 'Pirate on GoG-games.com'
gogSearchLink.setAttribute('target', '_blank')

const steamripSearchLink = document.createElement('a')
steamripSearchLink.href = 'https://searx.tiekoetter.com/search?q=site%3Asteamrip.com+' + gameName
steamripSearchLink.textContent = 'Pirate on SteamRip.com'
steamripSearchLink.setAttribute('target', '_blank')

const ytTrailerSearchLink = document.createElement('a')
ytTrailerSearchLink.href = 'https://piped.video/results?search_query=' + encodeURIComponent(gameName) + ' trailer'
ytTrailerSearchLink.textContent = 'Trailers'
ytTrailerSearchLink.setAttribute('target', '_blank')


const ytGameplaySearchLink = document.createElement('a')
ytGameplaySearchLink.href = 'https://piped.video/results?search_query=' + encodeURIComponent(gameName) + ' gameplay no commentary'
ytGameplaySearchLink.textContent = 'Gameplay'
ytGameplaySearchLink.setAttribute('target', '_blank')

metaLinksContainer.appendChild(gogSearchLink)
metaLinksContainer.appendChild(steamripSearchLink)
metaLinksContainer.appendChild(ytTrailerSearchLink)
metaLinksContainer.appendChild(ytGameplaySearchLink)

breadcrumbsContainer.appendChild(metaLinksContainer)