您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Añade botones de gameplay en YouTube y duración en HowLongToBeat en el sidebar de Backloggd
// ==UserScript== // @name Backloggd ➜ Botones: Gameplay YouTube + HowLongToBeat // @namespace http://tampermonkey.net/ // @version 1.1 // @description Añade botones de gameplay en YouTube y duración en HowLongToBeat en el sidebar de Backloggd // @match https://backloggd.com/* // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; const insertButtons = () => { const titleEl = document.querySelector('h1'); const sidebar = document.querySelector('.side-section'); if (!titleEl || !sidebar) return; const gameTitle = titleEl.textContent.trim(); const ytId = 'yt-gameplay-button'; const hltbId = 'hltb-button'; // Evitar insertar duplicados if (!document.getElementById(ytId)) { const ytButton = document.createElement('a'); ytButton.id = ytId; ytButton.href = `https://www.youtube.com/results?search_query=gameplay+${encodeURIComponent(gameTitle)}`; ytButton.textContent = 'Gameplay'; ytButton.target = '_self'; ytButton.className = 'btn btn-main mx-auto mt-2'; ytButton.style.display = 'block'; ytButton.style.width = '100%'; sidebar.appendChild(ytButton); } if (!document.getElementById(hltbId)) { const hltbButton = document.createElement('a'); hltbButton.id = hltbId; hltbButton.href = `https://howlongtobeat.com/?q=${encodeURIComponent(gameTitle)}`; hltbButton.textContent = 'Duración'; hltbButton.target = '_self'; hltbButton.className = 'btn btn-main mx-auto mt-2'; hltbButton.style.display = 'block'; hltbButton.style.width = '100%'; sidebar.appendChild(hltbButton); } }; // Insertar botones cada medio segundo (solo si no existen aún) setInterval(insertButtons, 500); })();