Loading js/conditional_message.js +9 −4 Original line number Diff line number Diff line Loading @@ -4,14 +4,19 @@ Drupal.behaviors.conditional_message = { attach: function (context, settings) { if (context !== document || settings.conditional_message === undefined) { return; } // Shorthand for the configurations. var config = Drupal.settings.conditional_message; var config = settings.conditional_message; // Build AJAX URL. var endpoint; if (config.server) { endpoint = location.protocol + '//' + config.server + '/conditional_message_data_output'; } else { endpoint = Drupal.settings.basePath + 'conditional_message_data_output'; endpoint = settings.basePath + 'conditional_message_data_output'; } // AJAX loads $.ajax({ Loading Loading @@ -61,9 +66,9 @@ check.path = true; var treatedPaths = response.paths.map(function (p) { if(p !== '<front>') { return Drupal.settings.basePath + p; return settings.basePath + p; } else { return Drupal.settings.basePath; return settings.basePath; } }); if (treatedPaths.indexOf(window.location.pathname) < 0) { Loading Loading
js/conditional_message.js +9 −4 Original line number Diff line number Diff line Loading @@ -4,14 +4,19 @@ Drupal.behaviors.conditional_message = { attach: function (context, settings) { if (context !== document || settings.conditional_message === undefined) { return; } // Shorthand for the configurations. var config = Drupal.settings.conditional_message; var config = settings.conditional_message; // Build AJAX URL. var endpoint; if (config.server) { endpoint = location.protocol + '//' + config.server + '/conditional_message_data_output'; } else { endpoint = Drupal.settings.basePath + 'conditional_message_data_output'; endpoint = settings.basePath + 'conditional_message_data_output'; } // AJAX loads $.ajax({ Loading Loading @@ -61,9 +66,9 @@ check.path = true; var treatedPaths = response.paths.map(function (p) { if(p !== '<front>') { return Drupal.settings.basePath + p; return settings.basePath + p; } else { return Drupal.settings.basePath; return settings.basePath; } }); if (treatedPaths.indexOf(window.location.pathname) < 0) { Loading