Saver search for imdb id in userscript
This commit is contained in:
@@ -16,7 +16,7 @@ log = CPLog(__name__)
|
||||
|
||||
class Userscript(Plugin):
|
||||
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
def __init__(self):
|
||||
addApiView('userscript.get/<path:filename>', self.getUserScript, static = True)
|
||||
|
||||
@@ -90,7 +90,7 @@ var osd = function(){
|
||||
|
||||
// Try and get imdb url
|
||||
try {
|
||||
var regex = new RegExp(/tt(\d+)/);
|
||||
var regex = new RegExp(/tt(\d{7})/);
|
||||
var imdb_id = document.body.innerHTML.match(regex)[0];
|
||||
if (imdb_id)
|
||||
iframe.setAttribute('src', createApiUrl('http://imdb.com/title/'+imdb_id+'/'))
|
||||
|
||||
Reference in New Issue
Block a user