add set_user_data to fakemobileclient.js
This commit is contained in:
parent
d4f8675668
commit
5bb4560c82
3 changed files with 7 additions and 2 deletions
|
@ -29,6 +29,7 @@
|
|||
{% block subcontent %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
{% include 'site/fragment_fakemobileclient.html' %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static 'jquery/jquery.js' %}"></script>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -6,5 +6,5 @@ class MobileclientMiddleware:
|
|||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
request.mobileclient = 'c3navclient' in request.META['HTTP_USER_AGENT']
|
||||
request.mobileclient = 'c3navclient' in request.META['HTTP_USER_AGENT'] or 'fakemobileclient' in request.GET
|
||||
return self.get_response(request)
|
||||
|
|
|
@ -24,5 +24,9 @@ mobileclient = {
|
|||
},
|
||||
createShortcut: function(url, title) {
|
||||
console.log('mobileclient: shortcut url: '+url+' title: '+title);
|
||||
}
|
||||
},
|
||||
set_user_data: function(user_data) {
|
||||
console.log('set_user_data');
|
||||
console.log(user_data);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue