From ff95194da55ff91f97d470233062bbfaf30442c5 Mon Sep 17 00:00:00 2001 From: RayBB Date: Thu, 21 Mar 2024 18:15:51 +0100 Subject: [PATCH] remove setup_jquery_urls --- conf/openlibrary.yml | 1 - openlibrary/plugins/upstream/code.py | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/conf/openlibrary.yml b/conf/openlibrary.yml index 90cecb9cc45..80ec9a05c99 100644 --- a/conf/openlibrary.yml +++ b/conf/openlibrary.yml @@ -78,7 +78,6 @@ upstream_to_www_migration: true default_template_root: /upstream css_root: /upstream/css js_root: /upstream/js -use_google_cdn: false logging_config_file: conf/logging.ini email_config_file: conf/email.ini diff --git a/openlibrary/plugins/upstream/code.py b/openlibrary/plugins/upstream/code.py index e27df14c6cf..64a5199f188 100644 --- a/openlibrary/plugins/upstream/code.py +++ b/openlibrary/plugins/upstream/code.py @@ -277,21 +277,6 @@ def reload(): all_js().reload() -def setup_jquery_urls(): - if config.get('use_google_cdn', True): - jquery_url = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" - jqueryui_url = ( - "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" - ) - else: - jquery_url = "/static/upstream/js/jquery-1.3.2.min.js" - jqueryui_url = "/static/upstream/js/jquery-ui-1.7.2.min.js" - - web.template.Template.globals['jquery_url'] = jquery_url - web.template.Template.globals['jqueryui_url'] = jqueryui_url - web.template.Template.globals['use_google_cdn'] = config.get('use_google_cdn', True) - - def user_can_revert_records(): user = web.ctx.site.get_user() return user and ( @@ -418,7 +403,5 @@ def setup(): web.template.STATEMENT_NODES["jsdef"] = jsdef.JSDefNode - setup_jquery_urls() - setup()