From 91ab66453b0becaea8871406108a2250d6644820 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 23 Nov 2020 09:56:08 +0100 Subject: [PATCH] Remove jQuery Migrate "traces" logs, keeping only "warnings" --- js/jquery-migrate.dev-params.js | 10 ++++++++++ sources/application/WebPage/NiceWebPage.php | 1 + 2 files changed, 11 insertions(+) create mode 100644 js/jquery-migrate.dev-params.js diff --git a/js/jquery-migrate.dev-params.js b/js/jquery-migrate.dev-params.js new file mode 100644 index 000000000..96c10d605 --- /dev/null +++ b/js/jquery-migrate.dev-params.js @@ -0,0 +1,10 @@ +/* + * @copyright Copyright (C) 2010-2020 Combodo SARL + * @license http://opensource.org/licenses/AGPL-3.0 + */ + +/** + * jQuery Migrate parameters to use in development environment + */ + +jQuery.migrateTrace = false; \ No newline at end of file diff --git a/sources/application/WebPage/NiceWebPage.php b/sources/application/WebPage/NiceWebPage.php index a3c9931c7..799140c7e 100644 --- a/sources/application/WebPage/NiceWebPage.php +++ b/sources/application/WebPage/NiceWebPage.php @@ -33,6 +33,7 @@ class NiceWebPage extends WebPage $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.min.js'); if (utils::IsDevelopmentEnvironment()) // Needed since many other plugins still rely on oldies like $.browser { + $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.dev-params.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.dev.js'); } else { $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.prod.min.js');