Browse Source

expo changed window title

Bachir Soussi Chiadmi 4 years ago
parent
commit
8ea7ffeea2

+ 3 - 1
web/modules/custom/edlp_ajax/edlp_ajax.module

@@ -61,7 +61,8 @@ function edlp_ajax_page_attachments(array &$attachments) {
       $redirect = true;
     }
 
-  // $redirect = false;
+  $site_name = \Drupal::config('system.site')->get('name');
+
   $js_str = "var edlp = {\n
     sys_path:'".$current_path."',\n
     is_front:".($is_front ? 'true':'false').",\n
@@ -71,6 +72,7 @@ function edlp_ajax_page_attachments(array &$attachments) {
     entity_bundle:'".$entity_bundle."',\n
     entity_id:'".$entity_id."',\n
     audio_url:'".$audio_url."',\n
+    site_name:'".$site_name."',\n
   };";
 
   $attachments['#attached']['html_head'][] = [

File diff suppressed because it is too large
+ 0 - 1
web/themes/custom/edlptheme/assets/dist/scripts/main.min.js


+ 1 - 0
web/themes/custom/edlptheme/assets/scripts/main.js

@@ -1963,6 +1963,7 @@
     //         |_|
     function initExpo(){
       console.log('initExpo', window.location.hash);
+      document.title = edlp.site_name;
       if(window.location.hash == '#black'){
         $('body').addClass('expo-black');
       }

Some files were not shown because too many files changed in this diff