Only load css and js in header
This commit is contained in:
1 parent
17149a58f1
commit
bc4a965528
1 file changed
+3
-1
@@ -61,7 +61,9 @@ class Plugin(object):
|
|||||||
|
|
||||||
if add_to_head:
|
if add_to_head:
|
||||||
for f in glob.glob(os.path.join(self.plugin_path, 'static', '*')):
|
for f in glob.glob(os.path.join(self.plugin_path, 'static', '*')):
|
||||||
fireEvent('register_%s' % ('script' if getExt(f) in 'js' else 'style'), path + os.path.basename(f))
|
ext = getExt(f)
|
||||||
|
if ext in ['js', 'css']:
|
||||||
|
fireEvent('register_%s' % ('script' if ext in 'js' else 'style'), path + os.path.basename(f))
|
||||||
|
|
||||||
def showStatic(self, filename):
|
def showStatic(self, filename):
|
||||||
d = os.path.join(self.plugin_path, 'static')
|
d = os.path.join(self.plugin_path, 'static')
|
||||||
|
|||||||
Reference in new issue
Block a user