document.onmouseover = function(event){ var elem = event.target; if (elem.id !== 'menu4IMDBlink' && elem.parentNode.id !== "menu4IMDBlink" && document.getElementById("menu4IMDBlink")) { document.getElementById("menu4IMDBlink").remove(); } if ((elem.tagName == 'A' || elem.parentNode.tagName == 'A') && elem.className !== "menu_link") { var elemHref = elem.tagName == 'A' ? elem.href : elem.parentNode.href; var matchArr = elemHref.match(/\/tt(\d+)[\/\?]/); if (matchArr && matchArr[1] && !document.getElementById("menu4IMDBlink")) { var menuDiv = document.createElement("div"); menuDiv.id = "menu4IMDBlink"; menuDiv.style.zIndex = 6999; menuDiv.style.position = "fixed"; menuDiv.style.backgroundColor = "#EEE"; var rect = elem.getBoundingClientRect(); var menuTop = rect.top + rect.height; menuDiv.style.top = menuTop + "px" menuDiv.style.left = rect.left + "px"; var a = document.createElement("a"); a.href = "https://www.imdb.com/title/tt" + matchArr[1] + "/episodes?season=-1" a.target = "_blank"; a.innerText = "episodes"; a.className = "menu_link"; menuDiv.appendChild(a); menuDiv.innerHTML += " "; a = document.createElement("a"); a.href = "https://opensubtitles.org/uk/search2?IMDBID=" + matchArr[1]; a.target = "_blank"; a.innerText = "subs"; a.className = "menu_link"; menuDiv.appendChild(a); menuDiv.innerHTML += " "; a = document.createElement("a"); a.href = "https://rarbgmirror.org/torrents.php?imdb=tt" + matchArr[1]; a.target = "_blank"; a.innerText = "rarbg"; a.className = "menu_link"; menuDiv.appendChild(a); document.body.appendChild(menuDiv); } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter