Best JavaScript code snippet using appium
google-maps.js
Source:google-maps.js
1'use strict';2function initMap() {3 //Map location4 var MapLocation = {5 lat: 40.6971494,6 lng: -74.25987197 };8 // Map Zooming9 var MapZoom = 14;10 // Basic Map11 var MapWithMarker = new google.maps.Map(document.getElementById('map-with-marker'), {12 zoom: MapZoom,13 center: MapLocation14 });15 var marker_1 = new google.maps.Marker({16 position: MapLocation,17 map: MapWithMarker18 });19 // Basic map with cutom marker20 var CutomMarker = new google.maps.Map(document.getElementById('cutom-marker'), {21 zoom: MapZoom,22 center: MapLocation23 });24 var iconBase = '../../images/file-icons/';25 var marker_2 = new google.maps.Marker({26 position: MapLocation,27 map: CutomMarker,28 icon: iconBase + 'flag.png'29 });30 // Map without controls31 var MinimalMap = new google.maps.Map(document.getElementById('map-minimal'), {32 zoom: MapZoom,33 center: MapLocation,34 disableDefaultUI: true35 });36 var marker_3 = new google.maps.Marker({37 position: MapLocation,38 map: MinimalMap39 });40 // Night Mode41 var NightModeMap = new google.maps.Map(document.getElementById('night-mode-map'), {42 zoom: MapZoom,43 center: MapLocation,44 styles: [{45 "featureType": "all",46 "elementType": "all",47 "stylers": [{48 "saturation": -10049 },50 {51 "gamma": 0.552 }53 ]54 }]55 });56 // Apple Theme57 var AppletThemeMap = new google.maps.Map(document.getElementById('apple-map-theme'), {58 zoom: MapZoom,59 center: MapLocation,60 styles: [{61 "featureType": "landscape.man_made",62 "elementType": "geometry",63 "stylers": [{64 "color": "#f7f1df"65 }]66 },67 {68 "featureType": "landscape.natural",69 "elementType": "geometry",70 "stylers": [{71 "color": "#d0e3b4"72 }]73 },74 {75 "featureType": "landscape.natural.terrain",76 "elementType": "geometry",77 "stylers": [{78 "visibility": "off"79 }]80 },81 {82 "featureType": "poi",83 "elementType": "labels",84 "stylers": [{85 "visibility": "off"86 }]87 },88 {89 "featureType": "poi.business",90 "elementType": "all",91 "stylers": [{92 "visibility": "off"93 }]94 },95 {96 "featureType": "poi.medical",97 "elementType": "geometry",98 "stylers": [{99 "color": "#fbd3da"100 }]101 },102 {103 "featureType": "poi.park",104 "elementType": "geometry",105 "stylers": [{106 "color": "#bde6ab"107 }]108 },109 {110 "featureType": "road",111 "elementType": "geometry.stroke",112 "stylers": [{113 "visibility": "off"114 }]115 },116 {117 "featureType": "road",118 "elementType": "labels",119 "stylers": [{120 "visibility": "off"121 }]122 },123 {124 "featureType": "road.highway",125 "elementType": "geometry.fill",126 "stylers": [{127 "color": "#ffe15f"128 }]129 },130 {131 "featureType": "road.highway",132 "elementType": "geometry.stroke",133 "stylers": [{134 "color": "#efd151"135 }]136 },137 {138 "featureType": "road.arterial",139 "elementType": "geometry.fill",140 "stylers": [{141 "color": "#ffffff"142 }]143 },144 {145 "featureType": "road.local",146 "elementType": "geometry.fill",147 "stylers": [{148 "color": "black"149 }]150 },151 {152 "featureType": "transit.station.airport",153 "elementType": "geometry.fill",154 "stylers": [{155 "color": "#cfb2db"156 }]157 },158 {159 "featureType": "water",160 "elementType": "geometry",161 "stylers": [{162 "color": "#a2daf2"163 }]164 }165 ]166 });167 // Nature Theme168 var NatureThemeMap = new google.maps.Map(document.getElementById('nature-map-theme'), {169 zoom: MapZoom,170 center: MapLocation,171 styles: [{172 "featureType": "landscape",173 "stylers": [{174 "hue": "#FFA800"175 },176 {177 "saturation": 0178 },179 {180 "lightness": 0181 },182 {183 "gamma": 1184 }185 ]186 },187 {188 "featureType": "road.highway",189 "stylers": [{190 "hue": "#53FF00"191 },192 {193 "saturation": -73194 },195 {196 "lightness": 40197 },198 {199 "gamma": 1200 }201 ]202 },203 {204 "featureType": "road.arterial",205 "stylers": [{206 "hue": "#FBFF00"207 },208 {209 "saturation": 0210 },211 {212 "lightness": 0213 },214 {215 "gamma": 1216 }217 ]218 },219 {220 "featureType": "road.local",221 "stylers": [{222 "hue": "#00FFFD"223 },224 {225 "saturation": 0226 },227 {228 "lightness": 30229 },230 {231 "gamma": 1232 }233 ]234 },235 {236 "featureType": "water",237 "stylers": [{238 "hue": "#00BFFF"239 },240 {241 "saturation": 6242 },243 {244 "lightness": 8245 },246 {247 "gamma": 1248 }249 ]250 },251 {252 "featureType": "poi",253 "stylers": [{254 "hue": "#679714"255 },256 {257 "saturation": 33.4258 },259 {260 "lightness": -25.4261 },262 {263 "gamma": 1264 }265 ]266 }267 ]268 });269 // Captor Theme270 var CaptorThemeMap = new google.maps.Map(document.getElementById('captor-map-theme'), {271 zoom: MapZoom,272 center: MapLocation,273 styles: [{274 "featureType": "water",275 "stylers": [{276 "color": "#0e171d"277 }]278 },279 {280 "featureType": "landscape",281 "stylers": [{282 "color": "#1e303d"283 }]284 },285 {286 "featureType": "road",287 "stylers": [{288 "color": "#1e303d"289 }]290 },291 {292 "featureType": "poi.park",293 "stylers": [{294 "color": "#1e303d"295 }]296 },297 {298 "featureType": "transit",299 "stylers": [{300 "color": "#182731"301 },302 {303 "visibility": "simplified"304 }305 ]306 },307 {308 "featureType": "poi",309 "elementType": "labels.icon",310 "stylers": [{311 "color": "#f0c514"312 },313 {314 "visibility": "off"315 }316 ]317 },318 {319 "featureType": "poi",320 "elementType": "labels.text.stroke",321 "stylers": [{322 "color": "#1e303d"323 },324 {325 "visibility": "off"326 }327 ]328 },329 {330 "featureType": "transit",331 "elementType": "labels.text.fill",332 "stylers": [{333 "color": "#e77e24"334 },335 {336 "visibility": "off"337 }338 ]339 },340 {341 "featureType": "road",342 "elementType": "labels.text.fill",343 "stylers": [{344 "color": "#94a5a6"345 }]346 },347 {348 "featureType": "administrative",349 "elementType": "labels",350 "stylers": [{351 "visibility": "simplified"352 },353 {354 "color": "#e84c3c"355 }356 ]357 },358 {359 "featureType": "poi",360 "stylers": [{361 "color": "#e84c3c"362 },363 {364 "visibility": "off"365 }366 ]367 }368 ]369 });370 // Avagardo Theme371 var AvagardoThemeMap = new google.maps.Map(document.getElementById('avocado-map-theme'), {372 zoom: MapZoom,373 center: MapLocation,374 styles: [{375 "featureType": "water",376 "elementType": "geometry",377 "stylers": [{378 "visibility": "on"379 },380 {381 "color": "#aee2e0"382 }383 ]384 },385 {386 "featureType": "landscape",387 "elementType": "geometry.fill",388 "stylers": [{389 "color": "#abce83"390 }]391 },392 {393 "featureType": "poi",394 "elementType": "geometry.fill",395 "stylers": [{396 "color": "#769E72"397 }]398 },399 {400 "featureType": "poi",401 "elementType": "labels.text.fill",402 "stylers": [{403 "color": "#7B8758"404 }]405 },406 {407 "featureType": "poi",408 "elementType": "labels.text.stroke",409 "stylers": [{410 "color": "#EBF4A4"411 }]412 },413 {414 "featureType": "poi.park",415 "elementType": "geometry",416 "stylers": [{417 "visibility": "simplified"418 },419 {420 "color": "#8dab68"421 }422 ]423 },424 {425 "featureType": "road",426 "elementType": "geometry.fill",427 "stylers": [{428 "visibility": "simplified"429 }]430 },431 {432 "featureType": "road",433 "elementType": "labels.text.fill",434 "stylers": [{435 "color": "#5B5B3F"436 }]437 },438 {439 "featureType": "road",440 "elementType": "labels.text.stroke",441 "stylers": [{442 "color": "#ABCE83"443 }]444 },445 {446 "featureType": "road",447 "elementType": "labels.icon",448 "stylers": [{449 "visibility": "off"450 }]451 },452 {453 "featureType": "road.local",454 "elementType": "geometry",455 "stylers": [{456 "color": "#A4C67D"457 }]458 },459 {460 "featureType": "road.arterial",461 "elementType": "geometry",462 "stylers": [{463 "color": "#9BBF72"464 }]465 },466 {467 "featureType": "road.highway",468 "elementType": "geometry",469 "stylers": [{470 "color": "#EBF4A4"471 }]472 },473 {474 "featureType": "transit",475 "stylers": [{476 "visibility": "off"477 }]478 },479 {480 "featureType": "administrative",481 "elementType": "geometry.stroke",482 "stylers": [{483 "visibility": "on"484 },485 {486 "color": "#87ae79"487 }488 ]489 },490 {491 "featureType": "administrative",492 "elementType": "geometry.fill",493 "stylers": [{494 "color": "#7f2200"495 },496 {497 "visibility": "off"498 }499 ]500 },501 {502 "featureType": "administrative",503 "elementType": "labels.text.stroke",504 "stylers": [{505 "color": "#ffffff"506 },507 {508 "visibility": "on"509 },510 {511 "weight": 4.1512 }513 ]514 },515 {516 "featureType": "administrative",517 "elementType": "labels.text.fill",518 "stylers": [{519 "color": "#495421"520 }]521 },522 {523 "featureType": "administrative.neighborhood",524 "elementType": "labels",525 "stylers": [{526 "visibility": "off"527 }]528 }529 ]530 });531 // Propia Theme532 var PropiaThemeMap = new google.maps.Map(document.getElementById('propia-map-theme'), {533 zoom: MapZoom,534 center: MapLocation,535 styles: [{536 "featureType": "landscape",537 "stylers": [{538 "visibility": "simplified"539 },540 {541 "color": "#2b3f57"542 },543 {544 "weight": 0.1545 }546 ]547 },548 {549 "featureType": "administrative",550 "stylers": [{551 "visibility": "on"552 },553 {554 "hue": "#ff0000"555 },556 {557 "weight": 0.4558 },559 {560 "color": "#ffffff"561 }562 ]563 },564 {565 "featureType": "road.highway",566 "elementType": "labels.text",567 "stylers": [{568 "weight": 1.3569 },570 {571 "color": "#FFFFFF"572 }573 ]574 },575 {576 "featureType": "road.highway",577 "elementType": "geometry",578 "stylers": [{579 "color": "#f55f77"580 },581 {582 "weight": 3583 }584 ]585 },586 {587 "featureType": "road.arterial",588 "elementType": "geometry",589 "stylers": [{590 "color": "#f55f77"591 },592 {593 "weight": 1.1594 }595 ]596 },597 {598 "featureType": "road.local",599 "elementType": "geometry",600 "stylers": [{601 "color": "#f55f77"602 },603 {604 "weight": 0.4605 }606 ]607 },608 {},609 {610 "featureType": "road.highway",611 "elementType": "labels",612 "stylers": [{613 "weight": 0.8614 },615 {616 "color": "#ffffff"617 },618 {619 "visibility": "on"620 }621 ]622 },623 {624 "featureType": "road.local",625 "elementType": "labels",626 "stylers": [{627 "visibility": "off"628 }]629 },630 {631 "featureType": "road.arterial",632 "elementType": "labels",633 "stylers": [{634 "color": "#ffffff"635 },636 {637 "weight": 0.7638 }639 ]640 },641 {642 "featureType": "poi",643 "elementType": "labels",644 "stylers": [{645 "visibility": "off"646 }]647 },648 {649 "featureType": "poi",650 "stylers": [{651 "color": "#6c5b7b"652 }]653 },654 {655 "featureType": "water",656 "stylers": [{657 "color": "#f3b191"658 }]659 },660 {661 "featureType": "transit.line",662 "stylers": [{663 "visibility": "on"664 }]665 }666 ]667 });...
_mapStyles.js
Source:_mapStyles.js
1window.hacktjMapStyles = [2 {3 "featureType": "all",4 "elementType": "geometry",5 "stylers": [6 {7 "color": "#080938"8 },9 {10 "lightness": "42"11 }12 ]13 },14 {15 "featureType": "all",16 "elementType": "labels.text.fill",17 "stylers": [18 {19 "gamma": 0.0120 },21 {22 "lightness": 2023 }24 ]25 },26 {27 "featureType": "all",28 "elementType": "labels.text.stroke",29 "stylers": [30 {31 "saturation": -3132 },33 {34 "lightness": -3335 },36 {37 "weight": 238 },39 {40 "gamma": 0.841 }42 ]43 },44 {45 "featureType": "all",46 "elementType": "labels.icon",47 "stylers": [48 {49 "visibility": "off"50 }51 ]52 },53 {54 "featureType": "administrative.locality",55 "elementType": "labels.text",56 "stylers": [57 {58 "visibility": "on"59 },60 {61 "hue": "#ff0000"62 },63 {64 "saturation": "-11"65 },66 {67 "lightness": "4"68 },69 {70 "gamma": "1.01"71 },72 {73 "weight": "0.01"74 }75 ]76 },77 {78 "featureType": "administrative.neighborhood",79 "elementType": "labels.text",80 "stylers": [81 {82 "visibility": "off"83 }84 ]85 },86 {87 "featureType": "landscape",88 "elementType": "geometry",89 "stylers": [90 {91 "lightness": 3092 },93 {94 "saturation": 3095 }96 ]97 },98 {99 "featureType": "poi",100 "elementType": "all",101 "stylers": [102 {103 "visibility": "off"104 }105 ]106 },107 {108 "featureType": "poi",109 "elementType": "geometry",110 "stylers": [111 {112 "saturation": 20113 }114 ]115 },116 {117 "featureType": "poi.park",118 "elementType": "all",119 "stylers": [120 {121 "visibility": "off"122 }123 ]124 },125 {126 "featureType": "poi.park",127 "elementType": "geometry",128 "stylers": [129 {130 "lightness": 20131 },132 {133 "saturation": -20134 }135 ]136 },137 {138 "featureType": "road",139 "elementType": "geometry",140 "stylers": [141 {142 "lightness": "27"143 },144 {145 "saturation": "0"146 },147 {148 "hue": "#0067ff"149 },150 {151 "gamma": "4.62"152 },153 {154 "weight": "1.02"155 }156 ]157 },158 {159 "featureType": "road",160 "elementType": "geometry.stroke",161 "stylers": [162 {163 "saturation": 25164 },165 {166 "lightness": 25167 },168 {169 "color": "#ffffff"170 }171 ]172 },173 {174 "featureType": "road",175 "elementType": "labels",176 "stylers": [177 {178 "weight": "3.28"179 },180 {181 "visibility": "simplified"182 }183 ]184 },185 {186 "featureType": "road.highway",187 "elementType": "all",188 "stylers": [189 {190 "weight": "1.02"191 },192 {193 "saturation": "1"194 },195 {196 "hue": "#0067ff"197 },198 {199 "gamma": "0.41"200 }201 ]202 },203 {204 "featureType": "road.highway",205 "elementType": "labels.icon",206 "stylers": [207 {208 "visibility": "off"209 },210 {211 "hue": "#ff0000"212 }213 ]214 },215 {216 "featureType": "road.arterial",217 "elementType": "all",218 "stylers": [219 {220 "lightness": "0"221 },222 {223 "gamma": "1.77"224 },225 {226 "visibility": "simplified"227 }228 ]229 },230 {231 "featureType": "road.arterial",232 "elementType": "labels",233 "stylers": [234 {235 "visibility": "on"236 },237 {238 "hue": "#ff0000"239 },240 {241 "weight": "0.01"242 },243 {244 "lightness": "0"245 }246 ]247 },248 {249 "featureType": "road.local",250 "elementType": "all",251 "stylers": [252 {253 "visibility": "off"254 },255 {256 "saturation": "0"257 },258 {259 "lightness": "76"260 }261 ]262 },263 {264 "featureType": "water",265 "elementType": "all",266 "stylers": [267 {268 "lightness": "48"269 },270 {271 "visibility": "simplified"272 }273 ]274 },275 {276 "featureType": "water",277 "elementType": "labels",278 "stylers": [279 {280 "visibility": "off"281 }282 ]283 }...
map-script.js
Source:map-script.js
1"use strict";2$(function() {3 var mapStyle = 4 [5 {6 "featureType": "water",7 "elementType": "geometry",8 "stylers": [9 {10 "color": "#e9e9e9"11 },12 {13 "lightness": 1714 }15 ]16 },17 {18 "featureType": "landscape",19 "elementType": "geometry",20 "stylers": [21 {22 "color": "#f5f5f5"23 },24 {25 "lightness": 2026 }27 ]28 },29 {30 "featureType": "road.highway",31 "elementType": "geometry.fill",32 "stylers": [33 {34 "color": "#ffffff"35 },36 {37 "lightness": 1738 }39 ]40 },41 {42 "featureType": "road.highway",43 "elementType": "geometry.stroke",44 "stylers": [45 {46 "color": "#ffffff"47 },48 {49 "lightness": 2950 },51 {52 "weight": 0.253 }54 ]55 },56 {57 "featureType": "road.arterial",58 "elementType": "geometry",59 "stylers": [60 {61 "color": "#ffffff"62 },63 {64 "lightness": 1865 }66 ]67 },68 {69 "featureType": "road.local",70 "elementType": "geometry",71 "stylers": [72 {73 "color": "#ffffff"74 },75 {76 "lightness": 1677 }78 ]79 },80 {81 "featureType": "poi",82 "elementType": "geometry",83 "stylers": [84 {85 "color": "#f5f5f5"86 },87 {88 "lightness": 2189 }90 ]91 },92 {93 "featureType": "poi.park",94 "elementType": "geometry",95 "stylers": [96 {97 "color": "#dedede"98 },99 {100 "lightness": 21101 }102 ]103 },104 {105 "elementType": "labels.text.stroke",106 "stylers": [107 {108 "visibility": "on"109 },110 {111 "color": "#ffffff"112 },113 {114 "lightness": 16115 }116 ]117 },118 {119 "elementType": "labels.text.fill",120 "stylers": [121 {122 "saturation": 36123 },124 {125 "color": "#333333"126 },127 {128 "lightness": 40129 }130 ]131 },132 {133 "elementType": "labels.icon",134 "stylers": [135 {136 "visibility": "off"137 }138 ]139 },140 {141 "featureType": "transit",142 "elementType": "geometry",143 "stylers": [144 {145 "color": "#f2f2f2"146 },147 {148 "lightness": 19149 }150 ]151 },152 {153 "featureType": "administrative",154 "elementType": "geometry.fill",155 "stylers": [156 {157 "color": "#fefefe"158 },159 {160 "lightness": 20161 }162 ]163 },164 {165 "featureType": "administrative",166 "elementType": "geometry.stroke",167 "stylers": [168 {169 "color": "#fefefe"170 },171 {172 "lightness": 17173 },174 {175 "weight": 1.2176 }177 ]178 }179 ]180 // Create the map181 var map = new google.maps.Map($('.map-canvas')[0], {182 zoom: 14,183 styles: mapStyle,184 scrollwheel: false,185 center: new google.maps.LatLng(40.72, -74)186 });187 // Add a marker188 var marker = new google.maps.Marker({189 map: map,190 position: new google.maps.LatLng(40.72, -74)191 });192 // Add a Snazzy Info Window to the marker193 var info = new SnazzyInfoWindow({194 marker: marker,195 content: '<img src="images/logo/logo.png" alt="Logo">' +196 '<p>San Francisco, CA 560 Bush St & 20th Ave, Apt 5 San Francisco, 230909</p>',197 closeOnMapClick: false198 });199 info.open();...
gmaps.js
Source:gmaps.js
1/*!2 * remark v1.0.7 (http://getbootstrapadmin.com/remark)3 * Copyright 2015 amazingsurge4 * Licensed under the Themeforest Standard Licenses5 */6$.components.register("gmaps", {7 styles: [{8 "featureType": "landscape",9 "elementType": "all",10 "stylers": [{11 "color": "#ffffff"12 }]13 }, {14 "featureType": "poi",15 "elementType": "all",16 "stylers": [{17 "color": "#ffffff"18 }]19 }, {20 "featureType": "road",21 "elementType": "labels.text.fill",22 "stylers": [{23 "color": $.colors("blue-grey", "700")24 }]25 }, {26 "featureType": "administrative",27 "elementType": "labels.text.fill",28 "stylers": [{29 "color": $.colors("blue-grey", "500")30 }]31 }, {32 "featureType": "road.highway",33 "elementType": "geometry.fill",34 "stylers": [{35 "color": $.colors("blue-grey", "300")36 }]37 }, {38 "featureType": "road.arterial",39 "elementType": "geometry.fill",40 "stylers": [{41 "color": "#e0e0e0"42 }]43 }, {44 "featureType": "water",45 "elementType": "geometry.fill",46 "stylers": [{47 "color": $.colors("blue-grey", "200")48 }]49 }, {50 "featureType": "water",51 "elementType": "labels.text.fill",52 "stylers": [{53 "color": "#000000"54 }]55 }, {56 "featureType": "poi",57 "elementType": "labels.text.fill",58 "stylers": [{59 "color": $.colors("blue-grey", "500")60 }]61 }, {62 "featureType": "road",63 "elementType": "labels.text.stroke",64 "stylers": [{65 "visibility": "off"66 }]67 }, {68 "featureType": "poi.attraction",69 "elementType": "labels.text.stroke",70 "stylers": [{71 "visibility": "off"72 }]73 }, {74 "featureType": "poi",75 "elementType": "labels.text.stroke",76 "stylers": [{77 "visibility": "off"78 }]79 }, {80 "featureType": "road.local",81 "elementType": "all",82 "stylers": [{83 "color": $.colors("blue-grey", "200")84 }, {85 "weight": 0.586 }]87 }, {88 "featureType": "road.arterial",89 "elementType": "geometry",90 "stylers": [{91 "color": $.colors("blue-grey", "300")92 }]93 }, {94 "featureType": "road.arterial",95 "elementType": "geometry.stroke",96 "stylers": [{97 "visibility": "off"98 }]99 }, {100 "featureType": "road.highway",101 "elementType": "geometry.stroke",102 "stylers": [{103 "visibility": "off"104 }, {105 "color": "#000000"106 }]107 }, {108 "featureType": "poi",109 "elementType": "all",110 "stylers": [{111 "visibility": "off"112 }, {113 "color": "#000000"114 }]115 }, {116 "featureType": "poi",117 "elementType": "labels.text",118 "stylers": [{119 "visibility": "on"120 }, {121 "color": $.colors("blue-grey", "700")122 }]123 }, {124 "featureType": "road.local",125 "elementType": "labels.text",126 "stylers": [{127 "color": $.colors("blue-grey", "700")128 }]129 }, {130 "featureType": "transit",131 "elementType": "all",132 "stylers": [{133 "color": $.colors("blue-grey", "100")134 }]135 }, {136 "featureType": "transit.station",137 "elementType": "labels.text.fill",138 "stylers": [{139 "color": $.colors("blue-grey", "500")140 }]141 }, {142 "featureType": "road",143 "elementType": "labels.text.stroke",144 "stylers": [{145 "visibility": "off"146 }]147 }, {148 "featureType": "road",149 "elementType": "labels.text.fill",150 "stylers": [{151 "color": $.colors("blue-grey", "600")152 }]153 }, {154 "featureType": "administrative.neighborhood",155 "elementType": "labels.text",156 "stylers": [{157 "color": $.colors("blue-grey", "700")158 }]159 }, {160 "featureType": "poi",161 "elementType": "labels.text.stroke",162 "stylers": [{163 "color": "#ffffff"164 }]165 }, {166 "featureType": "road.highway",167 "elementType": "labels.icon",168 "stylers": [{169 "visibility": "on"170 }, {171 "hue": "#ffffff"172 }, {173 "saturation": -100174 }, {175 "lightness": 50176 }]177 }, {178 "featureType": "water",179 "elementType": "labels.text.stroke",180 "stylers": [{181 "visibility": "on"182 }, {183 "color": "#ffffff"184 }]185 }, {186 "featureType": "administrative.neighborhood",187 "elementType": "labels.text.stroke",188 "stylers": [{189 "color": "#ffffff"190 }]191 }, {192 "featureType": "administrative",193 "elementType": "labels.text.stroke",194 "stylers": [{195 "color": "#ffffff"196 }]197 }, {198 "featureType": "water",199 "elementType": "labels.text.fill",200 "stylers": [{201 "color": $.colors("blue-grey", "600")202 }]203 }]...
google-map.js
Source:google-map.js
1var position = { lat: 40.730610 , lng: -73.935242 } 2// Map style3var style = [4 {5 "featureType": "administrative",6 "elementType": "labels.text.fill",7 "stylers": [8 {9 "color": "#374050"10 }11 ]12 },13 {14 "featureType": "landscape",15 "elementType": "all",16 "stylers": [17 {18 "color": "#ebebeb"19 }20 ]21 },22 {23 "featureType": "landscape.natural",24 "elementType": "all",25 "stylers": [26 {27 "visibility": "on"28 },29 {30 "color": "#e6e6e6"31 }32 ]33 },34 {35 "featureType": "poi",36 "elementType": "all",37 "stylers": [38 {39 "visibility": "off"40 }41 ]42 },43 {44 "featureType": "road",45 "elementType": "all",46 "stylers": [47 {48 "saturation": -10049 },50 {51 "lightness": 4552 }53 ]54 },55 {56 "featureType": "road",57 "elementType": "geometry.fill",58 "stylers": [59 {60 "visibility": "on"61 },62 {63 "hue": "#ff0000"64 }65 ]66 },67 {68 "featureType": "road.highway",69 "elementType": "all",70 "stylers": [71 {72 "visibility": "simplified"73 }74 ]75 },76 {77 "featureType": "road.highway",78 "elementType": "geometry.fill",79 "stylers": [80 {81 "color": "#fd9836"82 },83 {84 "saturation": "85"85 },86 {87 "lightness": "31"88 },89 {90 "gamma": "1.24"91 }92 ]93 },94 {95 "featureType": "road.highway",96 "elementType": "labels.text",97 "stylers": [98 {99 "visibility": "simplified"100 }101 ]102 },103 {104 "featureType": "road.arterial",105 "elementType": "geometry.fill",106 "stylers": [107 {108 "hue": "#ff0000"109 },110 {111 "saturation": "1"112 }113 ]114 },115 {116 "featureType": "road.arterial",117 "elementType": "labels.icon",118 "stylers": [119 {120 "visibility": "off"121 }122 ]123 },124 {125 "featureType": "transit",126 "elementType": "all",127 "stylers": [128 {129 "visibility": "off"130 }131 ]132 },133 {134 "featureType": "transit.station",135 "elementType": "all",136 "stylers": [137 {138 "visibility": "simplified"139 },140 {141 "hue": "#ff0000"142 },143 {144 "saturation": "-100"145 }146 ]147 },148 {149 "featureType": "transit.station.airport",150 "elementType": "all",151 "stylers": [152 {153 "visibility": "on"154 }155 ]156 },157 {158 "featureType": "transit.station.bus",159 "elementType": "all",160 "stylers": [161 {162 "visibility": "simplified"163 }164 ]165 },166 {167 "featureType": "transit.station.rail",168 "elementType": "all",169 "stylers": [170 {171 "visibility": "simplified"172 },173 {174 "hue": "#ff7e00"175 },176 {177 "saturation": "-100"178 },179 {180 "lightness": "19"181 }182 ]183 },184 {185 "featureType": "water",186 "elementType": "all",187 "stylers": [188 {189 "color": "#f5f5f5"190 },191 {192 "visibility": "on"193 }194 ]195 }196]197// Set google map options198var options = {199 center: position,200 zoom: 14,201 mapTypeControl: false,202 streetViewControl: false,203 scrollwheel: false,204 styles: style205}206// Init Map207var map = new google.maps.Map( document.getElementById('contact-map') , options);208// Set map marker209var marker = new google.maps.Marker({210 position: position,211 map: map,...
react-dom_v16.x.x.js
Source:react-dom_v16.x.x.js
1// flow-typed signature: a333d1cdbb5a4103d0be63a412070e222// flow-typed version: b2693c1879/react-dom_v16.x.x/flow_>=v0.117.x3declare module 'react-dom' {4 declare function findDOMNode(5 componentOrElement: Element | ?React$Component<any, any>,6 ): null | Element | Text;7 declare function render<ElementType: React$ElementType>(8 element: React$Element<ElementType>,9 container: Element,10 callback?: () => void,11 ): React$ElementRef<ElementType>;12 declare function hydrate<ElementType: React$ElementType>(13 element: React$Element<ElementType>,14 container: Element,15 callback?: () => void,16 ): React$ElementRef<ElementType>;17 declare function createPortal(18 node: React$Node,19 container: Element,20 ): React$Portal;21 declare function unmountComponentAtNode(container: any): boolean;22 declare var version: string;23 declare function unstable_batchedUpdates<A, B, C, D, E>(24 callback: (a: A, b: B, c: C, d: D, e: E) => mixed,25 a: A,26 b: B,27 c: C,28 d: D,29 e: E,30 ): void;31 declare function unstable_renderSubtreeIntoContainer<32 ElementType: React$ElementType,33 >(34 parentComponent: React$Component<any, any>,35 nextElement: React$Element<ElementType>,36 container: any,37 callback?: () => void,38 ): React$ElementRef<ElementType>;39}40declare module 'react-dom/server' {41 declare function renderToString(element: React$Node): string;42 declare function renderToStaticMarkup(element: React$Node): string;43 declare function renderToNodeStream(element: React$Node): stream$Readable;44 declare function renderToStaticNodeStream(45 element: React$Node,46 ): stream$Readable;47 declare var version: string;48}49type Thenable = { then(resolve: () => mixed, reject?: () => mixed): mixed, ... };50declare module 'react-dom/test-utils' {51 declare var Simulate: { [eventName: string]: (element: Element, eventData?: Object) => void, ... };52 declare function renderIntoDocument(53 instance: React$Element<any>,54 ): React$Component<any, any>;55 declare function mockComponent(56 componentClass: React$ElementType,57 mockTagName?: string,58 ): Object;59 declare function isElement(element: React$Element<any>): boolean;60 declare function isElementOfType(61 element: React$Element<any>,62 componentClass: React$ElementType,63 ): boolean;64 declare function isDOMComponent(instance: any): boolean;65 declare function isCompositeComponent(66 instance: React$Component<any, any>,67 ): boolean;68 declare function isCompositeComponentWithType(69 instance: React$Component<any, any>,70 componentClass: React$ElementType,71 ): boolean;72 declare function findAllInRenderedTree(73 tree: React$Component<any, any>,74 test: (child: React$Component<any, any>) => boolean,75 ): Array<React$Component<any, any>>;76 declare function scryRenderedDOMComponentsWithClass(77 tree: React$Component<any, any>,78 className: string,79 ): Array<Element>;80 declare function findRenderedDOMComponentWithClass(81 tree: React$Component<any, any>,82 className: string,83 ): ?Element;84 declare function scryRenderedDOMComponentsWithTag(85 tree: React$Component<any, any>,86 tagName: string,87 ): Array<Element>;88 declare function findRenderedDOMComponentWithTag(89 tree: React$Component<any, any>,90 tagName: string,91 ): ?Element;92 declare function scryRenderedComponentsWithType(93 tree: React$Component<any, any>,94 componentClass: React$ElementType,95 ): Array<React$Component<any, any>>;96 declare function findRenderedComponentWithType(97 tree: React$Component<any, any>,98 componentClass: React$ElementType,99 ): ?React$Component<any, any>;100 declare function act(callback: () => void | Thenable): Thenable;...
SVGAnimatedEnumeration-SVGFEColorMatrixElement.js
Source:SVGAnimatedEnumeration-SVGFEColorMatrixElement.js
1description("This test checks the use of SVGAnimatedEnumeration within SVGFEColorMatrixElement");2var feColorMatrixElement = document.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix");3feColorMatrixElement.setAttribute("type", "matrix");4debug("");5debug("Check initial 'type; value");6shouldBeEqualToString("feColorMatrixElement.type.toString()", "[object SVGAnimatedEnumeration]");7shouldBeEqualToString("typeof(feColorMatrixElement.type.baseVal)", "number");8shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX");9debug("");10debug("Switch to 'saturate'");11shouldBe("feColorMatrixElement.type.baseVal = SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE");12shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE");13shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "saturate");14debug("");15debug("Switch to 'hueRotate'");16shouldBe("feColorMatrixElement.type.baseVal = SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE");17shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE");18shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "hueRotate");19debug("");20debug("Switch to 'luminanceToAlpha'");21shouldBe("feColorMatrixElement.type.baseVal = SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA");22shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA");23shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "luminanceToAlpha");24debug("");25debug("Try setting invalid values");26shouldThrow("feColorMatrixElement.type.baseVal = 5");27shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA");28shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "luminanceToAlpha");29shouldThrow("feColorMatrixElement.type.baseVal = -1");30shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA");31shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "luminanceToAlpha");32shouldThrow("feColorMatrixElement.type.baseVal = 0");33shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA");34shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "luminanceToAlpha");35debug("");36debug("Switch to 'matrix'");37shouldBe("feColorMatrixElement.type.baseVal = SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX");38shouldBe("feColorMatrixElement.type.baseVal", "SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX");39shouldBeEqualToString("feColorMatrixElement.getAttribute('type')", "matrix");...
template_preparser.js
Source:template_preparser.js
1import { isBlank } from 'angular2/src/facade/lang';2import { splitNsName } from './html_tags';3const NG_CONTENT_SELECT_ATTR = 'select';4const NG_CONTENT_ELEMENT = 'ng-content';5const LINK_ELEMENT = 'link';6const LINK_STYLE_REL_ATTR = 'rel';7const LINK_STYLE_HREF_ATTR = 'href';8const LINK_STYLE_REL_VALUE = 'stylesheet';9const STYLE_ELEMENT = 'style';10const SCRIPT_ELEMENT = 'script';11const NG_NON_BINDABLE_ATTR = 'ngNonBindable';12export function preparseElement(ast) {13 var selectAttr = null;14 var hrefAttr = null;15 var relAttr = null;16 var nonBindable = false;17 ast.attrs.forEach(attr => {18 let lcAttrName = attr.name.toLowerCase();19 if (lcAttrName == NG_CONTENT_SELECT_ATTR) {20 selectAttr = attr.value;21 }22 else if (lcAttrName == LINK_STYLE_HREF_ATTR) {23 hrefAttr = attr.value;24 }25 else if (lcAttrName == LINK_STYLE_REL_ATTR) {26 relAttr = attr.value;27 }28 else if (attr.name == NG_NON_BINDABLE_ATTR) {29 nonBindable = true;30 }31 });32 selectAttr = normalizeNgContentSelect(selectAttr);33 var nodeName = ast.name.toLowerCase();34 var type = PreparsedElementType.OTHER;35 if (splitNsName(nodeName)[1] == NG_CONTENT_ELEMENT) {36 type = PreparsedElementType.NG_CONTENT;37 }38 else if (nodeName == STYLE_ELEMENT) {39 type = PreparsedElementType.STYLE;40 }41 else if (nodeName == SCRIPT_ELEMENT) {42 type = PreparsedElementType.SCRIPT;43 }44 else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {45 type = PreparsedElementType.STYLESHEET;46 }47 return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable);48}49export var PreparsedElementType;50(function (PreparsedElementType) {51 PreparsedElementType[PreparsedElementType["NG_CONTENT"] = 0] = "NG_CONTENT";52 PreparsedElementType[PreparsedElementType["STYLE"] = 1] = "STYLE";53 PreparsedElementType[PreparsedElementType["STYLESHEET"] = 2] = "STYLESHEET";54 PreparsedElementType[PreparsedElementType["SCRIPT"] = 3] = "SCRIPT";55 PreparsedElementType[PreparsedElementType["OTHER"] = 4] = "OTHER";56})(PreparsedElementType || (PreparsedElementType = {}));57export class PreparsedElement {58 constructor(type, selectAttr, hrefAttr, nonBindable) {59 this.type = type;60 this.selectAttr = selectAttr;61 this.hrefAttr = hrefAttr;62 this.nonBindable = nonBindable;63 }64}65function normalizeNgContentSelect(selectAttr) {66 if (isBlank(selectAttr) || selectAttr.length === 0) {67 return '*';68 }69 return selectAttr;...
Using AI Code Generation
1var webdriver = require('selenium-webdriver');2var driver = new webdriver.Builder().forBrowser('chrome').build();3driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');4driver.findElement(webdriver.By.name('btnG')).click();5driver.wait(function() {6 return driver.getTitle().then(function(title) {7 return title === 'webdriver - Google Search';8 });9}, 1000);10driver.quit();
Using AI Code Generation
1var webdriver = require('selenium-webdriver');2}).build();3var searchBox = driver.findElement(webdriver.By.name('q'));4searchBox.sendKeys('webdriver');5searchBox.getAttribute('value').then(function(value) {6 console.log(value);7});8driver.quit();
Using AI Code Generation
1var webdriver = require('selenium-webdriver');2var driver = new webdriver.Builder().forBrowser('chrome').build();3var searchBox = driver.findElement(webdriver.By.name('q'));4searchBox.sendKeys('webdriver');5searchBox.getAttribute('type').then(function(type){6 console.log("The type of searchBox is: " + type);7});8driver.quit();
Using AI Code Generation
1var wd = require('wd');2var assert = require('assert');3var desired = {4};5var driver = wd.promiseChainRemote('localhost', 4723);6driver.init(desired).then(function () {7}).then(function () {8 return driver.elementById('lst-ib').type('Hello World!');9}).then(function () {10 return driver.elementById('lst-ib').type(wd.SPECIAL_KEYS['Enter']);11}).then(function () {12 return driver.title();13}).then(function (title) {14 assert.ok(title === 'Hello World! - Google Search');15}).fin(function () {16 return driver.quit();17}).done();
Using AI Code Generation
1var element = driver.findElement(webdriver.By.id('someId'));2element.type('some text');3driver.quit();4var element = driver.findElement(webdriver.By.id('someId'));5element.clear();6driver.quit();7var element = driver.findElement(webdriver.By.id('someId'));8element.clear();9driver.quit();10var element = driver.findElement(webdriver.By.id('someId'));11element.clear();12driver.quit();13var element = driver.findElement(webdriver.By.id('someId'));14element.clear();15driver.quit();16var element = driver.findElement(webdriver.By.id('someId'));17element.clear();18driver.quit();19var element = driver.findElement(webdriver.By.id('someId'));20element.clear();21driver.quit();22var element = driver.findElement(webdriver.By.id('someId'));23element.clear();24driver.quit();25var element = driver.findElement(webdriver.By.id('someId'));26element.clear();27driver.quit();28var element = driver.findElement(webdriver.By.id('someId'));29element.clear();30driver.quit();31var element = driver.findElement(webdriver.By.id('someId'));32element.clear();33driver.quit();34var element = driver.findElement(webdriver.By.id('someId'));35element.clear();36driver.quit();37var element = driver.findElement(webdriver.By.id('someId'));38element.clear();39driver.quit();40var element = driver.findElement(webdriver.By.id('someId'));41element.clear();42driver.quit();
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!