IMDB to Simkl Redirection

// ==UserScript==
// @name Simkl Search Click
// @namespace https://www.imdb.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://simkl.com/search/*
// @grant none
// ==/UserScript==

(function () {
‘use strict’;
var refreshIntervalId = setInterval(function(){
if(window.history.length <= 2)
if(document.getElementsByClassName(“tr”)[1]) {
document.getElementsByClassName(“tr”)[1].click()
}
if(document.getElementsByClassName(‘simkltvsearchnoresults’)[0].textContent === “No results”) {
window.history.back();
clearInterval(refreshIntervalId);
}
clearInterval(refreshIntervalId);
}, 1000);
})();

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s