Skip to content

Instantly share code, notes, and snippets.

@xPaw
Created May 14, 2021 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xPaw/607e1a4816f4a3be53da0b13a1555a40 to your computer and use it in GitHub Desktop.
Save xPaw/607e1a4816f4a3be53da0b13a1555a40 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Display game id on IGDB
// @namespace https://www.igdb.com/games/
// @version 1.0
// @author xPaw
// @match https://www.igdb.com/games/*
// @icon https://www.igdb.com/favicon.ico
// @grant none
// ==/UserScript==
(function() {
'use strict';
const id = document.querySelector( 'meta[id=pageid]' );
if( !id ) return;
const el = document.createElement( 'span' );
el.textContent = `ID: ${id.dataset.gameId}`;
el.style.position = 'absolute';
el.style.top = '10px';
el.style.left = '10px';
el.style.zIndex = 10000;
el.classList.add( 'text-muted' );
document.body.appendChild( el );
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment