소스 검색

New option: prevent the panel to open auto

Amauri CHAMPEAUX 10 년 전
부모
커밋
81d00657ae
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tarteaucitron.js

+ 2 - 1
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();
                 }
             });