Différences entre les versions de « MediaWiki:Common.js »

(16 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
 
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
 
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
mw.loader.load( "/chatTest/assets/modules/channel-web/inject.js");
+
/*
 +
mw.loader.load( "/chatTest2/assets/modules/channel-web/inject.js");
  
 
$( function () {
 
$( function () {
setTimeout(function() {
+
setTimeout(function() {
 
window.botpressWebChat.init({  
 
window.botpressWebChat.init({  
        host: '/chatTest',  
+
host: '/chatTest2',  
        botId: 'production',  
+
backgroundColor: '#ffff00',
        locale: 'fr',  
+
        botId: 'myfirst',  
        botConvoDescription: 'nous sommes en test',  
+
        locale: 'fr',  
        enableReset: true,  
+
        botConvoDescription: 'nous sommes en test',  
        showConversationsButton: false,  
+
        enableReset: true,  
        enableTranscriptDownload: false,  
+
        showConversationsButton: false,  
        showUserName: false,  
+
        enableTranscriptDownload: false,  
        showPoweredBy: false,  
+
        showUserName: false,  
        botName: 'Test',  
+
        showPoweredBy: false,  
        extraStylesheet: '/default-emulator.css',
+
        botName: 'Test',  
        botConvoTitle: 'Tech',
+
        extraStylesheet: '/default-emulator.css',
        enableArrowNavigation: true,
+
        botConvoTitle: 'Tech',
        exposeStore: true
+
        enableArrowNavigation: true,
        });
+
        exposeStore: true
 +
});
 +
},900);
 +
 
 +
 
 +
// window.addEventListener("message", function(event)  {
 +
// if (event.data && event.data.name === "webchatLoaded") {
 +
// window.botpressWebChat.mergeConfig({
 +
// layoutWidth: "100%",
 +
// });
 +
// }
 +
// });
 
          
 
          
+
// window.addEventListener('message', function(event) {
   
+
// if (event.data.name === 'webchatReady') {
},1000);
+
// window.botpressWebChat.sendEvent({
 +
// type: 'proactive-trigger',
 +
// channel: 'web',
 +
// payload: { text: 'Salut' }
 +
// })
 +
// }
 +
// });
 +
 
});
 
});
 +
*/

Version du 16 mai 2022 à 10:10

/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
/*
mw.loader.load( "/chatTest2/assets/modules/channel-web/inject.js");

$( function () {
	setTimeout(function() {
		window.botpressWebChat.init({ 
			host: '/chatTest2', 
			backgroundColor: '#ffff00',
        	botId: 'myfirst', 
        	locale: 'fr', 
        	botConvoDescription: 'nous sommes en test', 
        	enableReset: true, 
        	showConversationsButton: false, 
        	enableTranscriptDownload: false, 
        	showUserName: false, 
        	showPoweredBy: false, 
        	botName: 'Test', 
        	extraStylesheet: '/default-emulator.css',
        	botConvoTitle: 'Tech',
        	enableArrowNavigation: true,
        	exposeStore: true
		});
	},900);


//	window.addEventListener("message", function(event)  {
//			if (event.data && event.data.name === "webchatLoaded") {
//				window.botpressWebChat.mergeConfig({
//					layoutWidth: "100%",
//				});
//			}
//	});
        
//	window.addEventListener('message', function(event) {
//		if (event.data.name === 'webchatReady') {
//			window.botpressWebChat.sendEvent({
//				type: 'proactive-trigger',
//				channel: 'web',
//				payload: { text: 'Salut' }
//			})
//		}
//	});
	
});
*/

La dernière modification de cette page a été faite le 16 mai 2022 à 10:10.