Commit 5b3c9ddb by tarokkk

laborgui: Fixed user-agent for charts

parent a7dbda8c
......@@ -86,7 +86,7 @@ class Browser:
self.webview.open("https://cloud.ik.bme.hu/store/gui/")
self.webview.connect("navigation-requested", self.on_navigation_requested)
settings = webkit.WebSettings()
settings.set_property('user-agent', 'cloud-gui '+self.version)
settings.set_property('user-agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22 '+'cloud-gui '+self.version)
settings.set_property('enable-accelerated-compositing', True)
settings.set_property("enable-default-context-menu", False)
self.webview.set_settings(settings)
......@@ -183,7 +183,7 @@ class Browser:
def load_committed_cb(self,web_view, frame):
uri = frame.get_uri()
print uri
#print uri
try:
self.webview.execute_script('document.getElementsByTagName("a")[0].target="";')
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment