def bookmarklet_wrapper(request, endpoint):
""" Return text of the SciBot bookmarklet """
code = bookmarklet_base % (request.application_url.replace('http:', 'https:'), endpoint)
bookmarklet = code.replace('"', '"').replace('\n','')
html = html_base % (bookmarklet, request.host.split('.', 1)[-1], code)
r = Response(html)
r.content_type = 'text/html'
return r
评论列表
文章目录