Browse Source

Make it suck less on chrome

Remove time-consuming dead code.
It's even faster NOW :)
master
The Dod 11 years ago
parent
commit
36a736134c
  1. 1
      swizzler.py
  2. 2
      templates/message.html
  3. 2
      twister.py

1
swizzler.py

@ -104,7 +104,6 @@ class SwizzlerApp(object):
if username=='nobody': username='' # to enable /nobody/large if username=='nobody': username='' # to enable /nobody/large
conf = cherrypy.request.app.config['swizzler'] conf = cherrypy.request.app.config['swizzler']
twister = Twister(conf['rpc_url'],format_twist) twister = Twister(conf['rpc_url'],format_twist)
user = twister.get_user_info(username)
result = { result = {
'title':'@{0} - Swizzler'.format(username), 'title':'@{0} - Swizzler'.format(username),
'site_root':cherrypy.request.base+cherrypy.request.script_name, 'site_root':cherrypy.request.base+cherrypy.request.script_name,

2
templates/message.html

@ -1,7 +1,7 @@
<li class="list-group-item media"> <li class="list-group-item media">
<iframe class="thumbnail media-object {{#fromMe}}pull-right{{/fromMe}}{{^fromMe}}pull-left{{/fromMe}}" <iframe class="thumbnail media-object {{#fromMe}}pull-right{{/fromMe}}{{^fromMe}}pull-left{{/fromMe}}"
style="border:none; padding:0; background:none; overflow:hidden" style="border:none; padding:0; background:none; overflow:hidden"
width=33% height={{#style_large}}96{{/style_large}}{{^style_large}}72{{/style_large}} seamless=seamless width=33% height=105 seamless=seamless
src="{{site_root}}/user_embed/{{username}}{{^username}}nobody{{/username}}{{#style_large}}/large{{/style_large}}{{#fromMe}}/from_me{{/fromMe}}"></iframe> src="{{site_root}}/user_embed/{{username}}{{^username}}nobody{{/username}}{{#style_large}}/large{{/style_large}}{{#fromMe}}/from_me{{/fromMe}}"></iframe>
<div class="media-body"> <div class="media-body">
{{#username}} {{#username}}

2
twister.py

@ -51,7 +51,7 @@ class Twister:
return self._format_post_info(p[0]['p']['v']) return self._format_post_info(p[0]['p']['v'])
raise SkipCache("Twist not found @{0}/{1}".format(username,k),{ raise SkipCache("Twist not found @{0}/{1}".format(username,k),{
"username":"", "username":"",
"user":self.get_user_info('nobody'), #"user":self.get_user_info('nobody'),
"k":0, # maybe something needs this "k":0, # maybe something needs this
"lastk":0, # or this "lastk":0, # or this
"message":"Twist not found (maybe it's private?) &#128557;", "message":"Twist not found (maybe it's private?) &#128557;",

Loading…
Cancel
Save