Advertisement
borlabs

Web 2.0 Directory plugin for WordPress

Sep 6th, 2022
1,314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.w2dc_load_init = function () {
  2.     if ((typeof google == 'undefined' || typeof google.maps == 'undefined') && !w2dc_maps_objects.notinclude_maps_api) {
  3.         var script = document.createElement("script");
  4.         script.type = "text/javascript";
  5.         var key = '';
  6.         var language = '';
  7.         if (w2dc_maps_objects.google_api_key)
  8.             key = "&key="+w2dc_maps_objects.google_api_key;
  9.         if (w2dc_js_objects.lang)
  10.             language = "&language="+w2dc_js_objects.lang;
  11.         script.src = "//maps.google.com/maps/api/js?libraries=places"+key+"&callback="+w2dc_maps_callback.callback+language;
  12.         document.body.appendChild(script);
  13.     } else {
  14.         w2dc_3rd_party_maps_plugin = true;
  15.         window[w2dc_maps_callback.callback]();
  16.     }
  17. };
  18.  
  19. document.addEventListener("DOMContentLoaded", function() {
  20.     window.w2dc_load_init();
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement