Extension -> Userscript

This commit is contained in:
Ruud
2011-09-27 07:51:06 +02:00
parent ff9a5971c4
commit d79a25bb5b
22 changed files with 38 additions and 38 deletions
@@ -0,0 +1,6 @@
from .main import AlloCine
def start():
return AlloCine()
config = []
@@ -0,0 +1,34 @@
from couchpotato.core.providers.userscript.base import UserscriptBase
class AlloCine(UserscriptBase):
includes = ['http://www.allocine.fr/film/*']
#CouchPotato['allocine.fr'] = (function(){
#
# function isMovie(){
# var pattern = /fichefilm_gen_cfilm=\d+?\.html$/;
# matched = location.href.match(pattern);
# return null != matched;
# }
#
# function getId() {
# var name = document.title.substr(0, document.title.indexOf(" -")).replace(/ /g, "+");
# lib.search(name, getYear())
# }
#
# function getYear(){
# var year = new RegExp("\\d{4}", document.title)
# return year;
# }
#
# function constructor(){
# if(isMovie()){
# lib.osd(getId(), getYear());
# }
# }
#
# return constructor;
#
#})();