From 81d00657ae1b07fa41fc4a6a8b21c8a301639972 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 22 Sep 2014 16:57:00 +0200 Subject: [PATCH] New option: prevent the panel to open auto --- tarteaucitron.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 3a0df98..de012b0 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -6,6 +6,7 @@ var scripts = document.getElementsByTagName('script'), cdn = path.split('/').slice(0, -1).join('/') + '/'; var tarteaucitron = { + "autoOpen": false, // auto open the panel with #tarteaucitron hash ? "cdn": cdn, "user": {}, "lang": {}, @@ -200,7 +201,7 @@ var tarteaucitron = { } else { tarteaucitron.userInterface.closeAlert(); } - if (document.location.hash === '#tarteaucitron') { + if (document.location.hash === '#tarteaucitron' && tarteaucitron.autoOpen === true) { tarteaucitron.userInterface.openPanel(); } });