Greasy Fork is available in English.

TMDB search IDs

Show TMDB IDs in TMDB search

  1. // ==UserScript==
  2. // @name TMDB search IDs
  3. // @description Show TMDB IDs in TMDB search
  4. // @namespace Violentmonkey Scripts
  5. // @match https://www.themoviedb.org/search
  6. // @grant none
  7. // @version 1.0
  8. // @author SH3LL
  9. // ==/UserScript==
  10.  
  11.  
  12. let myblocks=document.getElementsByClassName("card v4 tight");
  13. for(let currblock of myblocks){
  14. // get ID
  15. let content_id=currblock.children[0].children[0].children[0].children[0].href.replace("https://www.themoviedb.org/tv/","").replace("https://www.themoviedb.org/movie/","")
  16.  
  17. // craft label
  18. let mylabel=document.createElement("label");
  19. mylabel.style.color="red";
  20. mylabel.style.fontWeight="bold";
  21. mylabel.style.fontSize="20px";
  22. mylabel.innerText=content_id;
  23.  
  24. // append label
  25. currblock.children[0].children[1].children[0].children[0].append(mylabel);
  26. }