Best JavaScript code snippet using wpt
data.js
Source:data.js
1var objJson = [2 //{ title: "", version: "", link: "", img: "", fecha: "", sizecomp: "", sizedesc: ""},3 {4 title: "Terraria",5 version: "1.4.3.6",6 desc: "Terraria es un videojuego de mundo abierto en 2D. Contiene elementos de construcción, exploración, aventura y combate, muy similar a juegos clásicos de la consola Super NES, como por ejemplo la serie Metroid, y a otras entregas más recientes como Minecraft.<br><br>El juego comienza en un mundo creado de forma aleatoria. El usuario puede personalizar a su personaje; cambiando el estilo de su pelo, camisa, pantalones, asà como el color de los mismos, su género, entre otras personalizaciones que permite el juego. El jugador tiene a su disposición herramientas de distintos tipos, las cuales sirven para moldear el mundo y trabajar los recursos que el jugador encuentre (tales como minerales). Asà mismo, el jugador inicia con una cantidad limitada de vida y puntos de magia, los cuales puede incrementar. También es posible mejorar al personaje incrementando su ataque, defensa, velocidad, entre otros, usando distintos objetos obtenibles en el transcurso de la partida. El jugador puede utilizar los materiales y recursos que va encontrando para crear nuevos objetos, tales como armas, armaduras, pociones, etc, siendo los objetos más avanzados los más difÃciles de crear.",7 linkmediafire: "https://www.mediafire.com/file/uzrutrwgvurh6zk/Terraria_v1.4.3.6-Di_potato_pelator.zip/file",8 linkdrive: "https://drive.google.com/file/d/1PpdOETUCiaAZfLW8jKiJXDhghZKKClvC/view",9 link3: "",10 img: "./imgs/terraria.png",11 fecha: "2022/07/24",12 sizecomp: "380,91 MB",13 sizedesc: "462,64 MB",14 notas: ""15 },16 {17 title: "Tlauncher",18 version: "1.0.1.0",19 desc: "Tlauncher es una aplicación que permite que los usuarios puedan jugar a Minecraft sin necesidad de la versión original del juego. ",20 linkmediafire: "https://www.mediafire.com/file/ok8aifwec5p8hk2/MC_TLauncher_Di_potato_pelator.zip/file",21 linkdrive: "https://drive.google.com/file/d/1VF91HGXgavLxWsW48l5QjQO1symA21b6/view?usp=sharing",22 link3: "",23 img: "./imgs/tlauncher.png",24 fecha: "2022/07/24",25 sizecomp: "15,40 MB",26 sizedesc: "16,9 MB",27 notas: ""28 },29 {30 title: "Counter Strike GT",31 version: "1.6",32 desc: "Counter Strike Global Offensive es un juego de disparos en primera persona que se desarrolló en el año 2000 y se publicó en el año 2004.",33 linkmediafire: "https://www.mediafire.com/file/hzffbfjsy08jbnf/Counter+Strike+1.6+GT+Di_potato_pelator.7z/file",34 linkdrive: "https://drive.google.com/file/d/1766NqTOb4F3r5T61VC_mVJlw1BePgMGI/view?usp=sharing",35 link3: "",36 img: "./imgs/csgt.png",37 fecha: "2022/07/25",38 sizecomp: "152 MB",39 sizedesc: "347 MB",40 notas: ""41 },42 {43 title: "title",44 version: "3",45 desc: "",46 linkmediafire: "",47 linkdrive: "",48 link3: "",49 img: "",50 fecha: "",51 sizecomp: "",52 sizedesc: "",53 notas: ""54 },55 {56 title: "title",57 version: "4",58 desc: "",59 linkmediafire: "",60 linkdrive: "",61 link3: "",62 img: "",63 fecha: "",64 sizecomp: "",65 sizedesc: "",66 notas: ""67 },68 {69 title: "title",70 version: "5",71 desc: "",72 linkmediafire: "",73 linkdrive: "",74 link3: "",75 img: "",76 fecha: "",77 sizecomp: "",78 sizedesc: "",79 notas: ""80 },81 {82 title: "title",83 version: "6",84 desc: "",85 linkmediafire: "",86 linkdrive: "",87 link3: "",88 img: "",89 fecha: "",90 sizecomp: "",91 sizedesc: "",92 notas: ""93 },94 {95 title: "title",96 version: "7",97 desc: "",98 linkmediafire: "",99 linkdrive: "",100 link3: "",101 img: "",102 fecha: "",103 sizecomp: "",104 sizedesc: "",105 notas: ""106 },107 {108 title: "title",109 version: "8",110 desc: "",111 linkmediafire: "",112 linkdrive: "",113 link3: "",114 img: "",115 fecha: "",116 sizecomp: "",117 sizedesc: "",118 notas: ""119 },120 {121 title: "title",122 version: "9",123 desc: "",124 linkmediafire: "",125 linkdrive: "",126 link3: "",127 img: "",128 fecha: "",129 sizecomp: "",130 sizedesc: "",131 notas: ""132 },133 {134 title: "title",135 version: "10",136 desc: "",137 linkmediafire: "",138 linkdrive: "",139 link3: "",140 img: "",141 fecha: "",142 sizecomp: "",143 sizedesc: "",144 notas: ""145 },146 {147 title: "title",148 version: "11",149 desc: "",150 linkmediafire: "",151 linkdrive: "",152 link3: "",153 img: "",154 fecha: "",155 sizecomp: "",156 sizedesc: "",157 notas: ""158 },159 {160 title: "title",161 version: "12",162 desc: "",163 linkmediafire: "",164 linkdrive: "",165 link3: "",166 img: "",167 fecha: "",168 sizecomp: "",169 sizedesc: "",170 notas: ""171 },172 {173 title: "title",174 version: "13",175 desc: "",176 linkmediafire: "",177 linkdrive: "",178 link3: "",179 img: "",180 fecha: "",181 sizecomp: "",182 sizedesc: "",183 notas: ""184 },185 {186 title: "title",187 version: "14",188 desc: "",189 linkmediafire: "",190 linkdrive: "",191 link3: "",192 img: "",193 fecha: "",194 sizecomp: "",195 sizedesc: "",196 notas: ""197 },198 {199 title: "title",200 version: "15",201 desc: "",202 linkmediafire: "",203 linkdrive: "",204 link3: "",205 img: "",206 fecha: "",207 sizecomp: "",208 sizedesc: "",209 notas: ""210 },211 {212 title: "title",213 version: "16",214 desc: "",215 linkmediafire: "",216 linkdrive: "",217 link3: "",218 img: "",219 fecha: "",220 sizecomp: "",221 sizedesc: "",222 notas: ""223 },224 {225 title: "title",226 version: "17",227 desc: "",228 linkmediafire: "",229 linkdrive: "",230 link3: "",231 img: "",232 fecha: "",233 sizecomp: "",234 sizedesc: "",235 notas: ""236 },237 {238 title: "title",239 version: "18",240 desc: "",241 linkmediafire: "",242 linkdrive: "",243 link3: "",244 img: "",245 fecha: "",246 sizecomp: "",247 sizedesc: "",248 notas: ""249 }, {250 title: "title",251 version: "8",252 desc: "",253 linkmediafire: "",254 linkdrive: "",255 link3: "",256 img: "",257 fecha: "",258 sizecomp: "",259 sizedesc: "",260 notas: ""261 },262 {263 title: "title",264 version: "9",265 desc: "",266 linkmediafire: "",267 linkdrive: "",268 link3: "",269 img: "",270 fecha: "",271 sizecomp: "",272 sizedesc: "",273 notas: ""274 },275 {276 title: "title",277 version: "10",278 desc: "",279 linkmediafire: "",280 linkdrive: "",281 link3: "",282 img: "",283 fecha: "",284 sizecomp: "",285 sizedesc: "",286 notas: ""287 },288 {289 title: "title",290 version: "11",291 desc: "",292 linkmediafire: "",293 linkdrive: "",294 link3: "",295 img: "",296 fecha: "",297 sizecomp: "",298 sizedesc: "",299 notas: ""300 },301 {302 title: "title",303 version: "12",304 desc: "",305 linkmediafire: "",306 linkdrive: "",307 link3: "",308 img: "",309 fecha: "",310 sizecomp: "",311 sizedesc: "",312 notas: ""313 },314 {315 title: "title",316 version: "13",317 desc: "",318 linkmediafire: "",319 linkdrive: "",320 link3: "",321 img: "",322 fecha: "",323 sizecomp: "",324 sizedesc: "",325 notas: ""326 },327 {328 title: "title",329 version: "14",330 desc: "",331 linkmediafire: "",332 linkdrive: "",333 link3: "",334 img: "",335 fecha: "",336 sizecomp: "",337 sizedesc: "",338 notas: ""339 },340 {341 title: "title",342 version: "15",343 desc: "",344 linkmediafire: "",345 linkdrive: "",346 link3: "",347 img: "",348 fecha: "",349 sizecomp: "",350 sizedesc: "",351 notas: ""352 },353 {354 title: "title",355 version: "16",356 desc: "",357 linkmediafire: "",358 linkdrive: "",359 link3: "",360 img: "",361 fecha: "",362 sizecomp: "",363 sizedesc: "",364 notas: ""365 },366 {367 title: "title",368 version: "17",369 desc: "",370 linkmediafire: "",371 linkdrive: "",372 link3: "",373 img: "",374 fecha: "",375 sizecomp: "",376 sizedesc: "",377 notas: ""378 },379 {380 title: "title",381 version: "18",382 desc: "",383 linkmediafire: "",384 linkdrive: "",385 link3: "",386 img: "",387 fecha: "",388 sizecomp: "",389 sizedesc: "",390 notas: ""391 }, {392 title: "title",393 version: "8",394 desc: "",395 linkmediafire: "",396 linkdrive: "",397 link3: "",398 img: "",399 fecha: "",400 sizecomp: "",401 sizedesc: "",402 notas: ""403 },404 {405 title: "title",406 version: "9",407 desc: "",408 linkmediafire: "",409 linkdrive: "",410 link3: "",411 img: "",412 fecha: "",413 sizecomp: "",414 sizedesc: "",415 notas: ""416 },417 {418 title: "title",419 version: "10",420 desc: "",421 linkmediafire: "",422 linkdrive: "",423 link3: "",424 img: "",425 fecha: "",426 sizecomp: "",427 sizedesc: "",428 notas: ""429 },430 {431 title: "title",432 version: "11",433 desc: "",434 linkmediafire: "",435 linkdrive: "",436 link3: "",437 img: "",438 fecha: "",439 sizecomp: "",440 sizedesc: "",441 notas: ""442 },443 {444 title: "title",445 version: "12",446 desc: "",447 linkmediafire: "",448 linkdrive: "",449 link3: "",450 img: "",451 fecha: "",452 sizecomp: "",453 sizedesc: "",454 notas: ""455 },456 {457 title: "title",458 version: "13",459 desc: "",460 linkmediafire: "",461 linkdrive: "",462 link3: "",463 img: "",464 fecha: "",465 sizecomp: "",466 sizedesc: "",467 notas: ""468 },469 {470 title: "title",471 version: "14",472 desc: "",473 linkmediafire: "",474 linkdrive: "",475 link3: "",476 img: "",477 fecha: "",478 sizecomp: "",479 sizedesc: "",480 notas: ""481 },482 {483 title: "title",484 version: "15",485 desc: "",486 linkmediafire: "",487 linkdrive: "",488 link3: "",489 img: "",490 fecha: "",491 sizecomp: "",492 sizedesc: "",493 notas: ""494 },495 {496 title: "title",497 version: "16",498 desc: "",499 linkmediafire: "",500 linkdrive: "",501 link3: "",502 img: "",503 fecha: "",504 sizecomp: "",505 sizedesc: "",506 notas: ""507 },508 {509 title: "title",510 version: "17",511 desc: "",512 linkmediafire: "",513 linkdrive: "",514 link3: "",515 img: "",516 fecha: "",517 sizecomp: "",518 sizedesc: "",519 notas: ""520 },521 {522 title: "title",523 version: "18",524 desc: "",525 linkmediafire: "",526 linkdrive: "",527 link3: "",528 img: "",529 fecha: "",530 sizecomp: "",531 sizedesc: "",532 notas: ""533 },534 {535 title: "title",536 version: "8",537 desc: "",538 linkmediafire: "",539 linkdrive: "",540 link3: "",541 img: "",542 fecha: "",543 sizecomp: "",544 sizedesc: "",545 notas: ""546 },547 {548 title: "title",549 version: "9",550 desc: "",551 linkmediafire: "",552 linkdrive: "",553 link3: "",554 img: "",555 fecha: "",556 sizecomp: "",557 sizedesc: "",558 notas: ""559 },560 {561 title: "title",562 version: "10",563 desc: "",564 linkmediafire: "",565 linkdrive: "",566 link3: "",567 img: "",568 fecha: "",569 sizecomp: "",570 sizedesc: "",571 notas: ""572 },573 {574 title: "title",575 version: "11",576 desc: "",577 linkmediafire: "",578 linkdrive: "",579 link3: "",580 img: "",581 fecha: "",582 sizecomp: "",583 sizedesc: "",584 notas: ""585 },586 {587 title: "title",588 version: "12",589 desc: "",590 linkmediafire: "",591 linkdrive: "",592 link3: "",593 img: "",594 fecha: "",595 sizecomp: "",596 sizedesc: "",597 notas: ""598 },599 {600 title: "title",601 version: "13",602 desc: "",603 linkmediafire: "",604 linkdrive: "",605 link3: "",606 img: "",607 fecha: "",608 sizecomp: "",609 sizedesc: "",610 notas: ""611 },612 {613 title: "title",614 version: "14",615 desc: "",616 linkmediafire: "",617 linkdrive: "",618 link3: "",619 img: "",620 fecha: "",621 sizecomp: "",622 sizedesc: "",623 notas: ""624 },625 {626 title: "title",627 version: "15",628 desc: "",629 linkmediafire: "",630 linkdrive: "",631 link3: "",632 img: "",633 fecha: "",634 sizecomp: "",635 sizedesc: "",636 notas: ""637 },638 {639 title: "title",640 version: "16",641 desc: "",642 linkmediafire: "",643 linkdrive: "",644 link3: "",645 img: "",646 fecha: "",647 sizecomp: "",648 sizedesc: "",649 notas: ""650 },651 {652 title: "title",653 version: "17",654 desc: "",655 linkmediafire: "",656 linkdrive: "",657 link3: "",658 img: "",659 fecha: "",660 sizecomp: "",661 sizedesc: "",662 notas: ""663 },664 {665 title: "title",666 version: "18",667 desc: "",668 linkmediafire: "",669 linkdrive: "",670 link3: "",671 img: "",672 fecha: "",673 sizecomp: "",674 sizedesc: "",675 notas: ""676 }, {677 title: "title",678 version: "8",679 desc: "",680 linkmediafire: "",681 linkdrive: "",682 link3: "",683 img: "",684 fecha: "",685 sizecomp: "",686 sizedesc: "",687 notas: ""688 },689 {690 title: "title",691 version: "9",692 desc: "",693 linkmediafire: "",694 linkdrive: "",695 link3: "",696 img: "",697 fecha: "",698 sizecomp: "",699 sizedesc: "",700 notas: ""701 },702 {703 title: "title",704 version: "10",705 desc: "",706 linkmediafire: "",707 linkdrive: "",708 link3: "",709 img: "",710 fecha: "",711 sizecomp: "",712 sizedesc: "",713 notas: ""714 },715 {716 title: "title",717 version: "11",718 desc: "",719 linkmediafire: "",720 linkdrive: "",721 link3: "",722 img: "",723 fecha: "",724 sizecomp: "",725 sizedesc: "",726 notas: ""727 },728 {729 title: "title",730 version: "12",731 desc: "",732 linkmediafire: "",733 linkdrive: "",734 link3: "",735 img: "",736 fecha: "",737 sizecomp: "",738 sizedesc: "",739 notas: ""740 },741 {742 title: "title",743 version: "13",744 desc: "",745 linkmediafire: "",746 linkdrive: "",747 link3: "",748 img: "",749 fecha: "",750 sizecomp: "",751 sizedesc: "",752 notas: ""753 },754 {755 title: "title",756 version: "14",757 desc: "",758 linkmediafire: "",759 linkdrive: "",760 link3: "",761 img: "",762 fecha: "",763 sizecomp: "",764 sizedesc: "",765 notas: ""766 },767 {768 title: "title",769 version: "15",770 desc: "",771 linkmediafire: "",772 linkdrive: "",773 link3: "",774 img: "",775 fecha: "",776 sizecomp: "",777 sizedesc: "",778 notas: ""779 },780 {781 title: "title",782 version: "16",783 desc: "",784 linkmediafire: "",785 linkdrive: "",786 link3: "",787 img: "",788 fecha: "",789 sizecomp: "",790 sizedesc: "",791 notas: ""792 },793 {794 title: "title",795 version: "17",796 desc: "",797 linkmediafire: "",798 linkdrive: "",799 link3: "",800 img: "",801 fecha: "",802 sizecomp: "",803 sizedesc: "",804 notas: ""805 },806 {807 title: "title",808 version: "18",809 desc: "",810 linkmediafire: "",811 linkdrive: "",812 link3: "",813 img: "",814 fecha: "",815 sizecomp: "",816 sizedesc: "",817 notas: ""818 }, {819 title: "title",820 version: "13",821 desc: "",822 linkmediafire: "",823 linkdrive: "",824 link3: "",825 img: "",826 fecha: "",827 sizecomp: "",828 sizedesc: "",829 notas: ""830 },831 {832 title: "title",833 version: "14",834 desc: "",835 linkmediafire: "",836 linkdrive: "",837 link3: "",838 img: "",839 fecha: "",840 sizecomp: "",841 sizedesc: "",842 notas: ""843 },844 {845 title: "title",846 version: "15",847 desc: "",848 linkmediafire: "",849 linkdrive: "",850 link3: "",851 img: "",852 fecha: "",853 sizecomp: "",854 sizedesc: "",855 notas: ""856 },857 {858 title: "title",859 version: "16",860 desc: "",861 linkmediafire: "",862 linkdrive: "",863 link3: "",864 img: "",865 fecha: "",866 sizecomp: "",867 sizedesc: "",868 notas: ""869 },870 {871 title: "title",872 version: "17",873 desc: "",874 linkmediafire: "",875 linkdrive: "",876 link3: "",877 img: "",878 fecha: "",879 sizecomp: "",880 sizedesc: "",881 notas: ""882 },883 {884 title: "title",885 version: "18",886 desc: "",887 linkmediafire: "",888 linkdrive: "",889 link3: "",890 img: "",891 fecha: "",892 sizecomp: "",893 sizedesc: "",894 notas: ""895 }, {896 title: "title",897 version: "13",898 desc: "",899 linkmediafire: "",900 linkdrive: "",901 link3: "",902 img: "",903 fecha: "",904 sizecomp: "",905 sizedesc: "",906 notas: ""907 },908 {909 title: "title",910 version: "14",911 desc: "",912 linkmediafire: "",913 linkdrive: "",914 link3: "",915 img: "",916 fecha: "",917 sizecomp: "",918 sizedesc: "",919 notas: ""920 },921 {922 title: "title",923 version: "15",924 desc: "",925 linkmediafire: "",926 linkdrive: "",927 link3: "",928 img: "",929 fecha: "",930 sizecomp: "",931 sizedesc: "",932 notas: ""933 },934 {935 title: "title",936 version: "16",937 desc: "",938 linkmediafire: "",939 linkdrive: "",940 link3: "",941 img: "",942 fecha: "",943 sizecomp: "",944 sizedesc: "",945 notas: ""946 },947 {948 title: "title",949 version: "17",950 desc: "",951 linkmediafire: "",952 linkdrive: "",953 link3: "",954 img: "",955 fecha: "",956 sizecomp: "",957 sizedesc: "",958 notas: ""959 },960 {961 title: "title",962 version: "18",963 desc: "",964 linkmediafire: "",965 linkdrive: "",966 link3: "",967 img: "",968 fecha: "",969 sizecomp: "",970 sizedesc: "",971 notas: ""972 }, {973 title: "title",974 version: "13",975 desc: "",976 linkmediafire: "",977 linkdrive: "",978 link3: "",979 img: "",980 fecha: "",981 sizecomp: "",982 sizedesc: "",983 notas: ""984 },985 {986 title: "title",987 version: "14",988 desc: "",989 linkmediafire: "",990 linkdrive: "",991 link3: "",992 img: "",993 fecha: "",994 sizecomp: "",995 sizedesc: "",996 notas: ""997 },998 {999 title: "title",1000 version: "15",1001 desc: "",1002 linkmediafire: "",1003 linkdrive: "",1004 link3: "",1005 img: "",1006 fecha: "",1007 sizecomp: "",1008 sizedesc: "",1009 notas: ""1010 },1011 {1012 title: "title",1013 version: "16",1014 desc: "",1015 linkmediafire: "",1016 linkdrive: "",1017 link3: "",1018 img: "",1019 fecha: "",1020 sizecomp: "",1021 sizedesc: "",1022 notas: ""1023 },1024 {1025 title: "title",1026 version: "17",1027 desc: "",1028 linkmediafire: "",1029 linkdrive: "",1030 link3: "",1031 img: "",1032 fecha: "",1033 sizecomp: "",1034 sizedesc: "",1035 notas: ""1036 },1037 {1038 title: "title",1039 version: "18",1040 desc: "",1041 linkmediafire: "",1042 linkdrive: "",1043 link3: "",1044 img: "",1045 fecha: "",1046 sizecomp: "",1047 sizedesc: "",1048 notas: ""1049 }, {1050 title: "title",1051 version: "13",1052 desc: "",1053 linkmediafire: "",1054 linkdrive: "",1055 link3: "",1056 img: "",1057 fecha: "",1058 sizecomp: "",1059 sizedesc: "",1060 notas: ""1061 },1062 {1063 title: "title",1064 version: "14",1065 desc: "",1066 linkmediafire: "",1067 linkdrive: "",1068 link3: "",1069 img: "",1070 fecha: "",1071 sizecomp: "",1072 sizedesc: "",1073 notas: ""1074 },1075 {1076 title: "title",1077 version: "15",1078 desc: "",1079 linkmediafire: "",1080 linkdrive: "",1081 link3: "",1082 img: "",1083 fecha: "",1084 sizecomp: "",1085 sizedesc: "",1086 notas: ""1087 },1088 {1089 title: "title",1090 version: "16",1091 desc: "",1092 linkmediafire: "",1093 linkdrive: "",1094 link3: "",1095 img: "",1096 fecha: "",1097 sizecomp: "",1098 sizedesc: "",1099 notas: ""1100 },1101 {1102 title: "title",1103 version: "17",1104 desc: "",1105 linkmediafire: "",1106 linkdrive: "",1107 link3: "",1108 img: "",1109 fecha: "",1110 sizecomp: "",1111 sizedesc: "",1112 notas: ""1113 },1114 {1115 title: "title",1116 version: "18",1117 desc: "",1118 linkmediafire: "",1119 linkdrive: "",1120 link3: "",1121 img: "",1122 fecha: "",1123 sizecomp: "",1124 sizedesc: "",1125 notas: ""1126 }, {1127 title: "title",1128 version: "13",1129 desc: "",1130 linkmediafire: "",1131 linkdrive: "",1132 link3: "",1133 img: "",1134 fecha: "",1135 sizecomp: "",1136 sizedesc: "",1137 notas: ""1138 },1139 {1140 title: "title",1141 version: "14",1142 desc: "",1143 linkmediafire: "",1144 linkdrive: "",1145 link3: "",1146 img: "",1147 fecha: "",1148 sizecomp: "",1149 sizedesc: "",1150 notas: ""1151 },1152 {1153 title: "title",1154 version: "15",1155 desc: "",1156 linkmediafire: "",1157 linkdrive: "",1158 link3: "",1159 img: "",1160 fecha: "",1161 sizecomp: "",1162 sizedesc: "",1163 notas: ""1164 },1165 {1166 title: "title",1167 version: "16",1168 desc: "",1169 linkmediafire: "",1170 linkdrive: "",1171 link3: "",1172 img: "",1173 fecha: "",1174 sizecomp: "",1175 sizedesc: "",1176 notas: ""1177 },1178 {1179 title: "title",1180 version: "17",1181 desc: "",1182 linkmediafire: "",1183 linkdrive: "",1184 link3: "",1185 img: "",1186 fecha: "",1187 sizecomp: "",1188 sizedesc: "",1189 notas: ""1190 },1191 {1192 title: "title",1193 version: "18",1194 desc: "",1195 linkmediafire: "",1196 linkdrive: "",1197 link3: "",1198 img: "",1199 fecha: "",1200 sizecomp: "",1201 sizedesc: "",1202 notas: ""1203 }, {1204 title: "title",1205 version: "13",1206 desc: "",1207 linkmediafire: "",1208 linkdrive: "",1209 link3: "",1210 img: "",1211 fecha: "",1212 sizecomp: "",1213 sizedesc: "",1214 notas: ""1215 },1216 {1217 title: "title",1218 version: "14",1219 desc: "",1220 linkmediafire: "",1221 linkdrive: "",1222 link3: "",1223 img: "",1224 fecha: "",1225 sizecomp: "",1226 sizedesc: "",1227 notas: ""1228 },1229 {1230 title: "title",1231 version: "15",1232 desc: "",1233 linkmediafire: "",1234 linkdrive: "",1235 link3: "",1236 img: "",1237 fecha: "",1238 sizecomp: "",1239 sizedesc: "",1240 notas: ""1241 },1242 {1243 title: "title",1244 version: "16",1245 desc: "",1246 linkmediafire: "",1247 linkdrive: "",1248 link3: "",1249 img: "",1250 fecha: "",1251 sizecomp: "",1252 sizedesc: "",1253 notas: ""1254 },1255 {1256 title: "title",1257 version: "17",1258 desc: "",1259 linkmediafire: "",1260 linkdrive: "",1261 link3: "",1262 img: "",1263 fecha: "",1264 sizecomp: "",1265 sizedesc: "",1266 notas: ""1267 },1268 {1269 title: "title",1270 version: "18",1271 desc: "",1272 linkmediafire: "",1273 linkdrive: "",1274 link3: "",1275 img: "",1276 fecha: "",1277 sizecomp: "",1278 sizedesc: "",1279 notas: ""1280 }, {1281 title: "title",1282 version: "13",1283 desc: "",1284 linkmediafire: "",1285 linkdrive: "",1286 link3: "",1287 img: "",1288 fecha: "",1289 sizecomp: "",1290 sizedesc: "",1291 notas: ""1292 },1293 {1294 title: "title",1295 version: "14",1296 desc: "",1297 linkmediafire: "",1298 linkdrive: "",1299 link3: "",1300 img: "",1301 fecha: "",1302 sizecomp: "",1303 sizedesc: "",1304 notas: ""1305 },1306 {1307 title: "title",1308 version: "15",1309 desc: "",1310 linkmediafire: "",1311 linkdrive: "",1312 link3: "",1313 img: "",1314 fecha: "",1315 sizecomp: "",1316 sizedesc: "",1317 notas: ""1318 },1319 {1320 title: "title",1321 version: "16",1322 desc: "",1323 linkmediafire: "",1324 linkdrive: "",1325 link3: "",1326 img: "",1327 fecha: "",1328 sizecomp: "",1329 sizedesc: "",1330 notas: ""1331 },1332 {1333 title: "title",1334 version: "17",1335 desc: "",1336 linkmediafire: "",1337 linkdrive: "",1338 link3: "",1339 img: "",1340 fecha: "",1341 sizecomp: "",1342 sizedesc: "",1343 notas: ""1344 },1345 {1346 title: "title",1347 version: "18",1348 desc: "",1349 linkmediafire: "",1350 linkdrive: "",1351 link3: "",1352 img: "",1353 fecha: "",1354 sizecomp: "",1355 sizedesc: "",1356 notas: ""1357 }, {1358 title: "title",1359 version: "13",1360 desc: "",1361 linkmediafire: "",1362 linkdrive: "",1363 link3: "",1364 img: "",1365 fecha: "",1366 sizecomp: "",1367 sizedesc: "",1368 notas: ""1369 },1370 {1371 title: "title",1372 version: "14",1373 desc: "",1374 linkmediafire: "",1375 linkdrive: "",1376 link3: "",1377 img: "",1378 fecha: "",1379 sizecomp: "",1380 sizedesc: "",1381 notas: ""1382 },1383 {1384 title: "title",1385 version: "15",1386 desc: "",1387 linkmediafire: "",1388 linkdrive: "",1389 link3: "",1390 img: "",1391 fecha: "",1392 sizecomp: "",1393 sizedesc: "",1394 notas: ""1395 },1396 {1397 title: "title",1398 version: "16",1399 desc: "",1400 linkmediafire: "",1401 linkdrive: "",1402 link3: "",1403 img: "",1404 fecha: "",1405 sizecomp: "",1406 sizedesc: "",1407 notas: ""1408 },1409 {1410 title: "title",1411 version: "17",1412 desc: "",1413 linkmediafire: "",1414 linkdrive: "",1415 link3: "",1416 img: "",1417 fecha: "",1418 sizecomp: "",1419 sizedesc: "",1420 notas: ""1421 },1422 {1423 title: "title",1424 version: "18",1425 desc: "",1426 linkmediafire: "",1427 linkdrive: "",1428 link3: "",1429 img: "",1430 fecha: "",1431 sizecomp: "",1432 sizedesc: "",1433 notas: ""1434 }, {1435 title: "title",1436 version: "13",1437 desc: "",1438 linkmediafire: "",1439 linkdrive: "",1440 link3: "",1441 img: "",1442 fecha: "",1443 sizecomp: "",1444 sizedesc: "",1445 notas: ""1446 },1447 {1448 title: "title",1449 version: "14",1450 desc: "",1451 linkmediafire: "",1452 linkdrive: "",1453 link3: "",1454 img: "",1455 fecha: "",1456 sizecomp: "",1457 sizedesc: "",1458 notas: ""1459 },1460 {1461 title: "title",1462 version: "15",1463 desc: "",1464 linkmediafire: "",1465 linkdrive: "",1466 link3: "",1467 img: "",1468 fecha: "",1469 sizecomp: "",1470 sizedesc: "",1471 notas: ""1472 },1473 {1474 title: "title",1475 version: "16",1476 desc: "",1477 linkmediafire: "",1478 linkdrive: "",1479 link3: "",1480 img: "",1481 fecha: "",1482 sizecomp: "",1483 sizedesc: "",1484 notas: ""1485 },1486 {1487 title: "title",1488 version: "17",1489 desc: "",1490 linkmediafire: "",1491 linkdrive: "",1492 link3: "",1493 img: "",1494 fecha: "",1495 sizecomp: "",1496 sizedesc: "",1497 notas: ""1498 },1499 {1500 title: "title",1501 version: "18",1502 desc: "",1503 linkmediafire: "",1504 linkdrive: "",1505 link3: "",1506 img: "",1507 fecha: "",1508 sizecomp: "",1509 sizedesc: "",1510 notas: ""1511 }, {1512 title: "title",1513 version: "13",1514 desc: "",1515 linkmediafire: "",1516 linkdrive: "",1517 link3: "",1518 img: "",1519 fecha: "",1520 sizecomp: "",1521 sizedesc: "",1522 notas: ""1523 },1524 {1525 title: "title",1526 version: "14",1527 desc: "",1528 linkmediafire: "",1529 linkdrive: "",1530 link3: "",1531 img: "",1532 fecha: "",1533 sizecomp: "",1534 sizedesc: "",1535 notas: ""1536 },1537 {1538 title: "title",1539 version: "15",1540 desc: "",1541 linkmediafire: "",1542 linkdrive: "",1543 link3: "",1544 img: "",1545 fecha: "",1546 sizecomp: "",1547 sizedesc: "",1548 notas: ""1549 },1550 {1551 title: "title",1552 version: "16",1553 desc: "",1554 linkmediafire: "",1555 linkdrive: "",1556 link3: "",1557 img: "",1558 fecha: "",1559 sizecomp: "",1560 sizedesc: "",1561 notas: ""1562 },1563 {1564 title: "title",1565 version: "17",1566 desc: "",1567 linkmediafire: "",1568 linkdrive: "",1569 link3: "",1570 img: "",1571 fecha: "",1572 sizecomp: "",1573 sizedesc: "",1574 notas: ""1575 },1576 {1577 title: "title",1578 version: "18",1579 desc: "",1580 linkmediafire: "",1581 linkdrive: "",1582 link3: "",1583 img: "",1584 fecha: "",1585 sizecomp: "",1586 sizedesc: "",1587 notas: ""1588 }, {1589 title: "title",1590 version: "13",1591 desc: "",1592 linkmediafire: "",1593 linkdrive: "",1594 link3: "",1595 img: "",1596 fecha: "",1597 sizecomp: "",1598 sizedesc: "",1599 notas: ""1600 },1601 {1602 title: "title",1603 version: "14",1604 desc: "",1605 linkmediafire: "",1606 linkdrive: "",1607 link3: "",1608 img: "",1609 fecha: "",1610 sizecomp: "",1611 sizedesc: "",1612 notas: ""1613 },1614 {1615 title: "title",1616 version: "15",1617 desc: "",1618 linkmediafire: "",1619 linkdrive: "",1620 link3: "",1621 img: "",1622 fecha: "",1623 sizecomp: "",1624 sizedesc: "",1625 notas: ""1626 },1627 {1628 title: "title",1629 version: "16",1630 desc: "",1631 linkmediafire: "",1632 linkdrive: "",1633 link3: "",1634 img: "",1635 fecha: "",1636 sizecomp: "",1637 sizedesc: "",1638 notas: ""1639 },1640 {1641 title: "title",1642 version: "17",1643 desc: "",1644 linkmediafire: "",1645 linkdrive: "",1646 link3: "",1647 img: "",1648 fecha: "",1649 sizecomp: "",1650 sizedesc: "",1651 notas: ""1652 },1653 {1654 title: "title",1655 version: "18",1656 desc: "",1657 linkmediafire: "",1658 linkdrive: "",1659 link3: "",1660 img: "",1661 fecha: "",1662 sizecomp: "",1663 sizedesc: "",1664 notas: ""1665 }, {1666 title: "title",1667 version: "13",1668 desc: "",1669 linkmediafire: "",1670 linkdrive: "",1671 link3: "",1672 img: "",1673 fecha: "",1674 sizecomp: "",1675 sizedesc: "",1676 notas: ""1677 },1678 {1679 title: "title",1680 version: "14",1681 desc: "",1682 linkmediafire: "",1683 linkdrive: "",1684 link3: "",1685 img: "",1686 fecha: "",1687 sizecomp: "",1688 sizedesc: "",1689 notas: ""1690 },1691 {1692 title: "title",1693 version: "15",1694 desc: "",1695 linkmediafire: "",1696 linkdrive: "",1697 link3: "",1698 img: "",1699 fecha: "",1700 sizecomp: "",1701 sizedesc: "",1702 notas: ""1703 },1704 {1705 title: "title",1706 version: "16",1707 desc: "",1708 linkmediafire: "",1709 linkdrive: "",1710 link3: "",1711 img: "",1712 fecha: "",1713 sizecomp: "",1714 sizedesc: "",1715 notas: ""1716 },1717 {1718 title: "title",1719 version: "17",1720 desc: "",1721 linkmediafire: "",1722 linkdrive: "",1723 link3: "",1724 img: "",1725 fecha: "",1726 sizecomp: "",1727 sizedesc: "",1728 notas: ""1729 },1730 {1731 title: "title",1732 version: "18",1733 desc: "",1734 linkmediafire: "",1735 linkdrive: "",1736 link3: "",1737 img: "",1738 fecha: "",1739 sizecomp: "",1740 sizedesc: "",1741 notas: ""1742 }, {1743 title: "title",1744 version: "13",1745 desc: "",1746 linkmediafire: "",1747 linkdrive: "",1748 link3: "",1749 img: "",1750 fecha: "",1751 sizecomp: "",1752 sizedesc: "",1753 notas: ""1754 },1755 {1756 title: "title",1757 version: "14",1758 desc: "",1759 linkmediafire: "",1760 linkdrive: "",1761 link3: "",1762 img: "",1763 fecha: "",1764 sizecomp: "",1765 sizedesc: "",1766 notas: ""1767 },1768 {1769 title: "title",1770 version: "15",1771 desc: "",1772 linkmediafire: "",1773 linkdrive: "",1774 link3: "",1775 img: "",1776 fecha: "",1777 sizecomp: "",1778 sizedesc: "",1779 notas: ""1780 },1781 {1782 title: "title",1783 version: "16",1784 desc: "",1785 linkmediafire: "",1786 linkdrive: "",1787 link3: "",1788 img: "",1789 fecha: "",1790 sizecomp: "",1791 sizedesc: "",1792 notas: ""1793 },1794 {1795 title: "title",1796 version: "17",1797 desc: "",1798 linkmediafire: "",1799 linkdrive: "",1800 link3: "",1801 img: "",1802 fecha: "",1803 sizecomp: "",1804 sizedesc: "",1805 notas: ""1806 },1807 {1808 title: "title",1809 version: "18",1810 desc: "",1811 linkmediafire: "",1812 linkdrive: "",1813 link3: "",1814 img: "",1815 fecha: "",1816 sizecomp: "",1817 sizedesc: "",1818 notas: ""1819 }, {1820 title: "title",1821 version: "13",1822 desc: "",1823 linkmediafire: "",1824 linkdrive: "",1825 link3: "",1826 img: "",1827 fecha: "",1828 sizecomp: "",1829 sizedesc: "",1830 notas: ""1831 },1832 {1833 title: "title",1834 version: "14",1835 desc: "",1836 linkmediafire: "",1837 linkdrive: "",1838 link3: "",1839 img: "",1840 fecha: "",1841 sizecomp: "",1842 sizedesc: "",1843 notas: ""1844 },1845 {1846 title: "title",1847 version: "15",1848 desc: "",1849 linkmediafire: "",1850 linkdrive: "",1851 link3: "",1852 img: "",1853 fecha: "",1854 sizecomp: "",1855 sizedesc: "",1856 notas: ""1857 },1858 {1859 title: "title",1860 version: "16",1861 desc: "",1862 linkmediafire: "",1863 linkdrive: "",1864 link3: "",1865 img: "",1866 fecha: "",1867 sizecomp: "",1868 sizedesc: "",1869 notas: ""1870 },1871 {1872 title: "title",1873 version: "17",1874 desc: "",1875 linkmediafire: "",1876 linkdrive: "",1877 link3: "",1878 img: "",1879 fecha: "",1880 sizecomp: "",1881 sizedesc: "",1882 notas: ""1883 },1884 {1885 title: "title",1886 version: "18",1887 desc: "",1888 linkmediafire: "",1889 linkdrive: "",1890 link3: "",1891 img: "",1892 fecha: "",1893 sizecomp: "",1894 sizedesc: "",1895 notas: ""1896 }, {1897 title: "title",1898 version: "13",1899 desc: "",1900 linkmediafire: "",1901 linkdrive: "",1902 link3: "",1903 img: "",1904 fecha: "",1905 sizecomp: "",1906 sizedesc: "",1907 notas: ""1908 },1909 {1910 title: "title",1911 version: "14",1912 desc: "",1913 linkmediafire: "",1914 linkdrive: "",1915 link3: "",1916 img: "",1917 fecha: "",1918 sizecomp: "",1919 sizedesc: "",1920 notas: ""1921 },1922 {1923 title: "title",1924 version: "15",1925 desc: "",1926 linkmediafire: "",1927 linkdrive: "",1928 link3: "",1929 img: "",1930 fecha: "",1931 sizecomp: "",1932 sizedesc: "",1933 notas: ""1934 },1935 {1936 title: "title",1937 version: "16",1938 desc: "",1939 linkmediafire: "",1940 linkdrive: "",1941 link3: "",1942 img: "",1943 fecha: "",1944 sizecomp: "",1945 sizedesc: "",1946 notas: ""1947 },1948 {1949 title: "title",1950 version: "17",1951 desc: "",1952 linkmediafire: "",1953 linkdrive: "",1954 link3: "",1955 img: "",1956 fecha: "",1957 sizecomp: "",1958 sizedesc: "",1959 notas: ""1960 },1961 {1962 title: "title",1963 version: "18",1964 desc: "",1965 linkmediafire: "",1966 linkdrive: "",1967 link3: "",1968 img: "",1969 fecha: "",1970 sizecomp: "",1971 sizedesc: "",1972 notas: ""1973 }, {1974 title: "title",1975 version: "13",1976 desc: "",1977 linkmediafire: "",1978 linkdrive: "",1979 link3: "",1980 img: "",1981 fecha: "",1982 sizecomp: "",1983 sizedesc: "",1984 notas: ""1985 },1986 {1987 title: "title",1988 version: "14",1989 desc: "",1990 linkmediafire: "",1991 linkdrive: "",1992 link3: "",1993 img: "",1994 fecha: "",1995 sizecomp: "",1996 sizedesc: "",1997 notas: ""1998 },1999 {2000 title: "title",2001 version: "15",2002 desc: "",2003 linkmediafire: "",2004 linkdrive: "",2005 link3: "",2006 img: "",2007 fecha: "",2008 sizecomp: "",2009 sizedesc: "",2010 notas: ""2011 },2012 {2013 title: "title",2014 version: "16",2015 desc: "",2016 linkmediafire: "",2017 linkdrive: "",2018 link3: "",2019 img: "",2020 fecha: "",2021 sizecomp: "",2022 sizedesc: "",2023 notas: ""2024 },2025 {2026 title: "title",2027 version: "17",2028 desc: "",2029 linkmediafire: "",2030 linkdrive: "",2031 link3: "",2032 img: "",2033 fecha: "",2034 sizecomp: "",2035 sizedesc: "",2036 notas: ""2037 },2038 {2039 title: "title",2040 version: "18",2041 desc: "",2042 linkmediafire: "",2043 linkdrive: "",2044 link3: "",2045 img: "",2046 fecha: "",2047 sizecomp: "",2048 sizedesc: "",2049 notas: ""2050 },...
1030.user.js
Source:1030.user.js
1// ==UserScript==2// @name Flickr Photo Page Enhancer3// @description Generates html to easily copy'n paste thumbnail & description.4// @namespace http://www.rhyley.org/gm/5// @include http://flickr.com/photos/*6// @include http://www.flickr.com/photos/*78// Based upon the original by Fabricio Zuardi (http://www.mamata.com.br/greasemonkey/)9// By Jason Rhyley (jason AT rhyley DOT org)10// ==/UserScript==1112(function() {1314 //if a photo page15 if (document.getElementById("button-bar")) { 1617/* function sizeExists(url) {18 return GM_xmlhttpRequest({19 url: url,20 method: "HEAD",21 onload: function(response) {22 if (response.statusText.indexOf('502') < 0 && response.responseHeaders.indexOf('Content-Length: 0') < 0 && response.responseHeaders.indexOf('Content-Length: 3386') < 0) {23 alert (response.responseHeaders +"\n"+url); return true; }24 else return false;25 }26 });27 }28*/29 function genUrl(sz,url){30 return url.replace("_m.",""+sz+".");31 }32 33 function doPPEsetup() {34 pid = location.pathname.split('/')[3];35 uURI = document.evaluate("//link[contains(@rel,'image_src')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).href;3637 sizeurls = new Array('s','t','m','r','z','b','o'); 38 sizedesc = new Array('s','t','m','r','z','b','o'); 39 sizeurls['s'] = genUrl('_s',uURI); sizedesc['s'] = "Square";40 sizeurls['t'] = genUrl('_t',uURI); sizedesc['t'] = "Thumb";41 sizeurls['m'] = uURI; sizedesc['m'] = "Small";42 sizeurls['r'] = genUrl('',uURI); sizedesc['r'] = "Med 500";43 sizeurls['z'] = genUrl('_z',uURI); sizedesc['z'] = "Med 640";44 sizeurls['b'] = genUrl('_b',uURI); sizedesc['b'] = "Large";45 sizeurls['o'] = genUrl('_o',uURI); sizedesc['o'] = "Original";46 4748 var containerA = document.createElement("div");49 containerA.setAttribute("class","photo-sidebar-additional-info");50 containerA.innerHTML += '<h4>Sizes</h4> ';51 var containerA1 = document.createElement("div");52 containerA1.innerHTML += 'Links: <a href="' + sizeurls['s'] + '">' + sizedesc['s'] + '</a>, ';53 containerA1.innerHTML += '<a href="' + sizeurls['t'] + '">' + sizedesc['t'] + '</a>, ';54 containerA1.innerHTML += '<a href="' + sizeurls['m'] + '">' + sizedesc['m'] + '</a>, ';55 containerA1.innerHTML += '<a href="' + sizeurls['r'] + '">' + sizedesc['r'] + '</a>, ';56 containerA1.innerHTML += '<a href="' + sizeurls['z'] + '">' + sizedesc['z'] + '</a>, ';57 containerA1.innerHTML += '<a href="' + sizeurls['b'] + '">' + sizedesc['b'] + '</a>, ';58 containerA1.innerHTML += '<a href="' + sizeurls['o'] + '">' + sizedesc['o'] + '</a>, ';596061 //This next bit inserts a 'Copy HTML' link which shows a textarea62 //with the thumbnail & description suitble for copy & paste.63 var containerA2 = document.createElement("div");64 containerA.innerHTML += '<span id="showHide">Show Quicklink</span>: '+65 '<a id="thLink" href="javascript:showQuick(0)" style="text-decoration:none">Thumbnail</a>, ' +66 '<a id="smLink" href="javascript:showQuick(1)" style="text-decoration:none">Small</a>, ' +67 '<a id="sqLink" href="javascript:showQuick(2)" style="text-decoration:none">Square</a>';6869 containerA.innerHTML += '<textarea rows="6" cols="26" id="texty" style="display:none">';7071 //get various attributes of the image for use in the generated HTML 72 if (document.getElementById("title_div" + pid)) 73 ptitle = document.getElementById("title_div" + pid).innerHTML;74 else ptitle = 'Flickr - photo sharing!';7576 if (document.getElementById("description_div" + pid) && document.getElementById("description_div" + pid).innerHTML != " ")77 pdescription = ' ' + document.getElementById("description_div" + pid).innerHTML;78 else pdescription = '';7980 pOwnerName = location.pathname.split('/')[2];81 (pOwnerName.indexOf('@') != -1) ? pOwnerName = '' : pOwnerName = ', by ' + pOwnerName;8283 imglink = '<a title="' + ptitle + pOwnerName + '" href="' + document.location + '">'84 unsafeWindow.thumb_html = imglink + '<img src="' + sizeurls['t'] + '"></a> ' + pdescription;85 unsafeWindow.small_html = imglink + '<img src="' + sizeurls['m'] + '"></a> ' + pdescription;86 unsafeWindow.squar_html = imglink + '<img src="' + sizeurls['s'] + '"></a> ' + pdescription;8788 containerA.appendChild(containerA1);89 containerA.appendChild(containerA2);90 var sc = document.getElementById("sidecar");91 sc.appendChild(containerA);92 sc.appendChild(containerA);93 sc.appendChild(containerA);9495 } // end PPEsetup()96 97 unsafeWindow.showQuick = function (size){ // By request from striatic 98 texty = document.getElementById("texty");99 texty.style['display'] = 'block';100 if (size == 0) {101 texty.value = unsafeWindow.thumb_html;102 unsafeWindow.setWeight("thLink",'bold');103 unsafeWindow.setWeight("smLink",'normal');104 unsafeWindow.setWeight("sqLink",'normal');105 } else if (size == 1) {106 texty.value = unsafeWindow.small_html;107 unsafeWindow.setWeight("thLink",'normal');108 unsafeWindow.setWeight("smLink",'bold');109 unsafeWindow.setWeight("sqLink",'normal');110 } else if (size == 2) {111 texty.value = unsafeWindow.squar_html;112 unsafeWindow.setWeight("thLink",'normal');113 unsafeWindow.setWeight("smLink",'normal');114 unsafeWindow.setWeight("sqLink",'bold');115 }116 texty.select();117 document.getElementById("showHide").innerHTML = '<a href="javascript:hideQuick()" style="text-decoration:none">[Hide Quicklink]</a>'118 }119120 unsafeWindow.hideQuick = function (){121 texty = document.getElementById("texty");122 texty.style['display'] = 'none';123 unsafeWindow.setWeight("thLink",'normal');124 unsafeWindow.setWeight("smLink",'normal');125 unsafeWindow.setWeight("sqLink",'normal');126 document.getElementById("showHide").innerHTML = 'Show Quickink';127 }128 129 unsafeWindow.setWeight = function (what,weight) {130 document.getElementById(what).setAttribute('style','text-decoration:none;font-weight:' + weight );131 }132133 doPPEsetup()134}135//close if a photo page136
...
mutations.js
Source:mutations.js
1import {2 INIT_BUYCART,3 ADD_CART,4 GET_USERINFO,5 RECORD_USERINFO,6 ADD_ANIMATION,7 SHOW_CART,8 REDUCE_CART,9 EDIT_CART10} from './mutation-types'11import { setStore, getStore } from '../utils/storage'12export default {13 // ç½é¡µåå§åæ¶ä»æ¬å°ç¼åè·åè´ç©è½¦æ°æ®14 [INIT_BUYCART] (state) {15 let initCart = getStore('buyCart')16 if (initCart) {17 state.cartList = JSON.parse(initCart)18 }19 },20 // å å
¥è´ç©è½¦21 [ADD_CART] (state, {productId, salePrice, productName, productImg, productNum = 1, color, availableSizeItem}) {22 let cart = state.cartList // è´ç©è½¦23 let flag = true24 let goods = {25 productId,26 salePrice,27 productName,28 productImg,29 color30 }31 if (cart.length) { // æå
容32 cart.forEach(item => {33 color = (color === null || color === 'null') ? '' : color34 if (item.productId === productId && color === item.color) {35 // ååå·²ç»å¨è´ç©è½¦36 flag = false37 availableSizeItem.forEach(sizeItem => {38 let sizeDesc = (sizeItem.sizeDesc === null || sizeItem.sizeDesc === 'null') ? '' : sizeItem.sizeDesc39 if (sizeDesc === item.sizeDesc) {40 // ç¸å尺寸çååå·²ç»å¨è´ç©è½¦41 if (sizeItem.buyNum >= 0) {42 item.productNum += sizeItem.buyNum43 }44 } else {45 // å½å尺寸çååä¸å¨è´ç©è½¦46 goods.productNum = sizeItem.buyNum47 goods.sizeDesc = sizeDesc48 goods.salePrice = sizeItem.finalPrice49 goods.checked = '1'50 cart.push(goods)51 }52 })53 }54 })55 }56 if (!cart.length || flag) {57 // æ·»å æ°åå58 availableSizeItem.forEach(sizeItem => {59 let sizeDesc = (sizeItem.sizeDesc === null || sizeItem.sizeDesc === 'null') ? '' : sizeItem.sizeDesc60 goods = {61 productId,62 salePrice,63 productName,64 productImg,65 color66 }67 goods.productNum = sizeItem.buyNum68 goods.sizeDesc = sizeDesc69 goods.salePrice = sizeItem.finalPrice70 goods.checked = '1'71 cart.push(goods)72 })73 }74 state.cartList = cart75 // åå
¥localStorage76 setStore('buyCart', cart)77 },78 // å å
¥è´ç©è½¦å¨ç»79 [ADD_ANIMATION] (state, {moveShow, elLeft, elTop, img, cartPositionT, cartPositionL, receiveInCart}) {80 state.showMoveImg = moveShow81 if (elLeft) {82 state.elLeft = elLeft83 state.elTop = elTop84 }85 state.moveImgUrl = img86 state.receiveInCart = receiveInCart87 if (cartPositionT) {88 state.cartPositionT = cartPositionT89 state.cartPositionL = cartPositionL90 }91 },92 // æ¯å¦æ¾ç¤ºè´ç©è½¦93 [SHOW_CART] (state, {showCart}) {94 // let timer = null95 state.showCart = showCart96 // clearTimeout(timer)97 // if (showCart) {98 // timer = setTimeout(() => {99 // state.showCart = false100 // }, 5000)101 // }102 },103 // 移é¤åå104 [REDUCE_CART] (state, {productId}) {105 let cart = state.cartList106 cart.forEach((item, i) => {107 if (item.productId === productId) {108 if (item.productNum > 1) {109 item.productNum--110 } else {111 cart.splice(i, 1)112 }113 }114 })115 state.cartList = cart116 // åå
¥localStorage117 setStore('buyCart', state.cartList)118 },119 // ä¿®æ¹è´ç©è½¦120 [EDIT_CART] (state, {productId, productNum, checked, index, availableSizeItem, numEdit, deleteItem}) {121 let cart = state.cartList122 if (numEdit) {123 cart.forEach((item, i) => {124 if (i === index) {125 item.buyNum = availableSizeItem[0].buyNum126 item.checked = checked127 item.productNum = availableSizeItem[0].buyNum128 }129 })130 } else if (deleteItem) {131 cart.splice(index, 1)132 } else {133 cart.forEach((item) => {134 item.checked = checked ? '1' : '0'135 })136 }137 state.cartList = cart138 // åå
¥localStorage139 setStore('buyCart', state.cartList)140 },141 // è®°å½ç¨æ·ä¿¡æ¯142 [RECORD_USERINFO] (state, info) {143 state.userInfo = info144 state.login = true145 setStore('userInfo', info)146 },147 // è·åç¨æ·ä¿¡æ¯148 [GET_USERINFO] (state, info) {149 if (state.userInfo && (state.userInfo.username !== info.username)) {150 return151 }152 if (!state.login) {153 return154 }155 if (!info.message) {156 state.userInfo = {...info}157 } else {158 state.userInfo = null159 }160 }...
Using AI Code Generation
1var wpt = require('./wpt.js');2var wpt = new wpt();3console.log(wpt.sizeDesc(1024));4console.log(wpt.sizeDesc(1024*1024));5console.log(wpt.sizeDesc(1024*1024*1024));6console.log(wpt.sizeDesc(1024*1024*1024*1024));7function wpt() {8 this.sizeDesc = function (size) {9 var desc = ['B', 'KB', 'MB', 'GB', 'TB'];10 var i = 0;11 while (size >= 1024) {12 size /= 1024;13 i++;14 }15 return size.toFixed(1) + ' ' + desc[i];16 };17}18module.exports = wpt;
Using AI Code Generation
1var wpt = require('./wpt');2var wpt = new wpt();3console.log(wpt.sizeDesc(1000));4console.log(wpt.sizeDesc(1000000));5console.log(wpt.sizeDesc(1000000000));6console.log(wpt.sizeDesc(1000000000000));7console.log(wpt.sizeDesc(1000000000000000));8console.log(wpt.sizeDesc(1000000000000000000));9console.log(wpt.sizeDesc(1000000000000000000000));10console.log(wpt.sizeDesc(1000000000000000000000000));11console.log(wpt.sizeDesc(1000000000000000000000000000));12console.log(wpt.sizeDesc(1000000000000000000000000000000));
Using AI Code Generation
1var wpt = require('wpt');2var wpt = new WebPageTest('www.webpagetest.org');3wpt.sizeDesc(1920, 1080, function(err, data) {4 console.log(data);5});6var wpt = require('wpt');7var wpt = new WebPageTest('www.webpagetest.org');8wpt.sizeDesc(1920, 1080, function(err, data) {9 console.log(data);10});11var wpt = require('wpt');12var wpt = new WebPageTest('www.webpagetest.org');13wpt.sizeDesc(1920, 1080, function(err, data) {14 console.log(data);15});16var wpt = require('wpt');17var wpt = new WebPageTest('www.webpagetest.org');18wpt.sizeDesc(1920, 1080, function(err, data) {19 console.log(data);20});21var wpt = require('wpt');22var wpt = new WebPageTest('www.webpagetest.org');23wpt.sizeDesc(1920, 1080, function(err, data) {24 console.log(data);25});26var wpt = require('wpt');27var wpt = new WebPageTest('www.webpagetest.org');28wpt.sizeDesc(1920, 1080, function(err, data) {29 console.log(data);30});31var wpt = require('wpt');32var wpt = new WebPageTest('www.webpagetest.org');33wpt.sizeDesc(1920, 1080, function(err, data) {34 console.log(data);35});36var wpt = require('wpt');37var wpt = new WebPageTest('www.webpagetest.org');38wpt.sizeDesc(1920, 1080
Using AI Code Generation
1var wpt = require('./wpt.js');2var wptObj = new wpt();3var size = wptObj.sizeDesc(1024);4var wpt = function () {5 this.sizeDesc = function (size) {6 var desc = "";7 var units = ["B", "KB", "MB", "GB", "TB"];8 var i = 0;9 while (size > 1024) {10 size = size / 1024;11 i++;12 }13 desc = size.toFixed(2) + " " + units[i];14 return desc;15 }16}17module.exports = wpt;
Using AI Code Generation
1var wpt = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org', 'A.6d9d6f7c6a1a6a7d6f7a6d7f6a7d6f7a');3 if (err) return console.error(err);4 console.log('Test submitted to WebPagetest for %s', data.data.url);5 console.log('Test ID: %s', data.data.testId);6 wpt.getTestStatus(data.data.testId, function(err, data) {7 if (err) return console.error(err);8 console.log('Test status: %s', data.data.statusText);9 });10});
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!!