Small fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user