// ==UserScript== // @name Netflix Video ID Display // @description netflix video ID in title details // @namespace Violentmonkey Scripts // @match https://www.netflix.com/* // @grant none // @version 1.0 // @author SH3LL // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js // @downloadURL none // ==/UserScript== function main(){ let wait = false; let refreshId = setInterval(function() { if($('div.previewModal--detailsMetadata-right').length && !wait){ //-> title details is open let link_code = document.getElementsByClassName("primary-button playLink isToolkit"); let id_box= document.createElement("div"); let label_id = document.createElement("label"); let id = document.createElement("label"); label_id.style.color="red"; id.style.color="red"; label_id.innerText="ID: "; id.style.fontWeight = 'bold'; id.innerText = link_code[0].getAttribute("href").split("?")[0].split("/")[2]; id_box.append(label_id); id_box.append(id); let hook = document.getElementsByClassName("previewModal--detailsMetadata detail-modal has-info-density has-smaller-buttons"); hook[0].after(id_box); wait = true; }else if($('div.previewModal--detailsMetadata-right').length == 0) //-> title details is closed wait = false; }, 3000); } main();