Extension -> Userscript

This commit is contained in:
Ruud committed 2011-09-27 07:51:06 +02:00
1 parent ff9a5971c4
commit d79a25bb5b
22 files changed
+38 -38

No files matched your search

@@ -0,0 +1,6 @@
from .main import WHiWA
def start():
return WHiWA()
config = []
@@ -0,0 +1,41 @@
from couchpotato.core.providers.userscript.base import UserscriptBase
class WHiWA(UserscriptBase):
includes = ['http://whiwa.net/stats/movie/*']
#CouchPotato['whiwa.net'] = (function(){
#
# function isMovie(){
# var pattern = /[^/]+\/?$/;
# var html = document.getElementsByTagName('h3')[0].innerHTML
# var matched = location.href.match(pattern);
# return null != matched;
# }
#
# function getId(){
# var pattern = /imdb\.com\/title\/tt(\d+)/;
# var html = document.getElementsByTagName('html')[0].innerHTML;
# var imdb_id = html.match(pattern)[1];
# return imdb_id;
#
# }
#
# function getYear(){
# var pattern = /(\d+)[^\d]*$/;
# var html = document.getElementsByTagName('h3')[0].innerHTML;
# var year = html.match(pattern)[1];
# return year;
#
# }
#
# function constructor(){
# if(isMovie()){
# lib.osd(getId(), getYear());
# }
# }
#
# return constructor;
#
#})();