When on IMDB, click the small buttons to search for the movie/series on TorrentGalaxy, 1337x or RARBG Dump.
< 腳本IMDB to RARBG Torrent Search的回應
Unfortunately that change breaks functionality in movie pages but I'll look what can be done to make it work with trailer pages (never watch trailer/videos so wasn't on the radar).
As for styling, I chose plain, unopinionated buttons so they go largely unnoticed.
New version released, should now work on video pages.
Opinion about this little change I made in the script?
in line 57 changed the movieId with this function so it can now work in video and trailer pages:
function getMovieId() {
return document.querySelectorAll('a[href*="title/tt"]')[0].pathname.split('/')[2];
}
and in line 61 changed button style to a fancier one:)
function createServiceButton(serviceName, searchUrl, urlParams, identifier, container) {
let a = document.createElement('a');
a.href = `${searchUrl}${identifier}${urlParams}`;
a.target = '_blank';
a.style.backgroundImage = "linear-gradient(45deg, #ffa63d, #ff3d77, #ffa63d, #ff3d77)";
a.style.backgroundSize = "400%";
a.style.animation = "gradientRotate 2s infinite";
a.style.color = 'white';
a.style.padding = '5px';
a.style.display = 'block';
a.style.margin = '8px';
a.style.borderRadius = '7px';
a.style.textDecoration = 'none';
a.style.fontSize = '0.8em';
a.style.fontFamily = "Lucida Grande, Helvetica, sans-serif";
a.style.fontWeight = 'bold';
a.style.textAlign = 'center';
a.style.boxShadow = '0 0 15px 0 rgba(242, 97, 103, 1)';
a.innerText = serviceName;
a.onmouseover = function() {
this.style.backgroundImage = "linear-gradient(45deg, #02aabd, #00cdac, #02aabd, #00cdac)";
this.style.boxShadow = '0 0 15px 0 rgba(48, 213, 199, 1)';
};
a.onmouseout = function() {
this.style.backgroundImage = "linear-gradient(45deg, #ffa63d, #ff3d77, #ffa63d, #ff3d77)";
this.style.boxShadow = '0 0 15px 0 rgba(242, 97, 103, 1)';
};
container.appendChild(a);
}