Small fixes

This commit is contained in:
Ruud
2012-01-06 17:08:45 +01:00
parent 1c75bfb9b0
commit 168a9a2f95
6 changed files with 15 additions and 10 deletions
@@ -99,8 +99,8 @@ window.addEvent('domready', function(){
});
window.addEvent('load', function(){
var your_version = $(document.body).get('data-userscript_version')
latest_version = App.getOption('userscript_version')
var your_version = $(document.body).get('data-userscript_version'),
latest_version = App.getOption('userscript_version') || '',
key = 'cp_version_check',
checked_already = Cookie.read(key);
+2 -2
View File
@@ -54,11 +54,11 @@ class Settings():
def set(self, section, option, value):
return self.p.set(section, option, value)
def get(self, option = '', section = 'core', default = ''):
def get(self, option = '', section = 'core', default = '', type = None):
try:
try: type = self.types[section][option]
except: type = 'unicode'
except: type = 'unicode' if not type else type
if hasattr(self, 'get%s' % type.capitalize()):
return getattr(self, 'get%s' % type.capitalize())(section, option)