From 79a938f3b98eaea257a249f23e8a913bee617156 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 23 Jul 2012 01:54:23 -0400 Subject: [PATCH] Cookies to store state of collapsable box. --- pages/copyvios.mako | 15 ++++++++++++--- pages/extensions.mako | 2 -- pages/index.mako | 1 - static/js/copyvios.js | 39 ++++++++++++++++++++++++++++++++++++++- toolserver/misc.py | 7 +++++++ 5 files changed, 57 insertions(+), 7 deletions(-) delete mode 100644 pages/extensions.mako diff --git a/pages/copyvios.mako b/pages/copyvios.mako index 12ac0c6..dad6636 100644 --- a/pages/copyvios.mako +++ b/pages/copyvios.mako @@ -1,7 +1,8 @@ <%include file="/support/header.mako" args="environ=environ, title='Copyvio Detector', add_css=('copyvios.css',), add_js=('copyvios.js',)"/>\ <%namespace module="toolserver.copyvios" import="main, highlight_delta"/>\ -<%namespace module="toolserver.misc" import="urlstrip"/>\ +<%namespace module="toolserver.misc" import="parse_cookies, urlstrip"/>\ <% query, bot, all_langs, all_projects, page, result = main(environ) %> +<% cookies = parse_cookies(environ) %>

Copyvio Detector

This tool attempts to detect copyright violations in articles. Simply give the title of the page you want to check and hit Submit. The tool will then search for its content elsewhere on the web and display a report if a similar webpage is found. If you also provide a URL, it will not query any search engines and instead display a report comparing the article to that particular webpage, like the Duplication Detector. Check out the FAQ for more information and technical details.

@@ -94,9 +95,17 @@ % else:
  • Results generated in ${round(result.tdiff, 3)} seconds using ${result.queries} queries.
  • % endif -
  • Show details:
  • + % if "EarwigCVShowDetails" cookies and cookies["EarwigCVShowDetails"] == "True": +
  • Hide details:
  • + % else: +
  • Show details:
  • + % endif -