Christian Matos 4 роки тому
джерело
коміт
3a57b77628

+ 12
- 12
platforms/browser/www/index.html Переглянути файл

@@ -654,24 +654,24 @@
654 654
                         //If it's none of them then it will not display anything
655 655
                         //First Social Media
656 656
                         if(red1.includes("facebook")){
657
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
657
+                            data+='<br><a href="'+ red1 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
658 658
                         }
659 659
                         else if(red1.includes("instagram")){
660
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
660
+                            data+='<br><a href="'+ red1 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
661 661
                         }
662 662
                         else if(red1.includes("myspace")){
663
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
663
+                            data+='<br><a href="'+ red1 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
664 664
                         }
665 665
 
666 666
                         //Second Social Media
667 667
                         if(red2.includes("facebook")){
668
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
668
+                            data+='<br><a href="'+ red2 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
669 669
                         }
670 670
                         else if(red2.includes("instagram")){
671
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
671
+                            data+='<br><a href="'+ red2 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
672 672
                         }
673 673
                         else if(red2.includes("myspace")){
674
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
674
+                            data+='<br><a href="'+ red2 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
675 675
                         }
676 676
                         
677 677
                         //E-commerce 
@@ -769,26 +769,26 @@
769 769
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
770 770
                         //If it's none of them then it will not display anything
771 771
                         if(red1.includes("facebook")) {
772
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
772
+                            data+='<br><a href="'+ red1 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
773 773
                         }
774 774
                         else if(red1.includes("instagram")){
775 775
                             
776
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
776
+                            data+='<br><a href="'+ red1 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
777 777
                         }
778 778
                         else if(red1.includes("myspace")){
779 779
                             
780
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
780
+                            data+='<br><a href="'+ red1 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
781 781
                         }
782 782
 
783 783
 
784 784
                         if(red2.includes("facebook")){
785
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
785
+                            data+='<br><a href="'+ red2 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
786 786
                         }
787 787
                         else if(red2.includes("instagram")){
788
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
788
+                            data+='<br><a href="'+ red2 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
789 789
                         }
790 790
                         else if(red2.includes("myspace")){
791
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
791
+                            data+='<br><a href="'+ red2 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
792 792
                         }
793 793
 
794 794
 

BIN
platforms/ios/ArtesaníasICP.xcworkspace/xcuserdata/christian.xcuserdatad/UserInterfaceState.xcuserstate Переглянути файл


+ 2
- 2
platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/christian.xcuserdatad/xcschemes/xcschememanagement.plist Переглянути файл

@@ -7,12 +7,12 @@
7 7
 		<key>Cordova.xcscheme_^#shared#^_</key>
8 8
 		<dict>
9 9
 			<key>orderHint</key>
10
-			<integer>1</integer>
10
+			<integer>2</integer>
11 11
 		</dict>
12 12
 		<key>CordovaLib.xcscheme_^#shared#^_</key>
13 13
 		<dict>
14 14
 			<key>orderHint</key>
15
-			<integer>2</integer>
15
+			<integer>1</integer>
16 16
 		</dict>
17 17
 	</dict>
18 18
 </dict>

+ 75
- 53
platforms/ios/www/index.html Переглянути файл

@@ -259,7 +259,7 @@
259 259
                             //'title':'${Artesano.Nombre}','esp': '${info}'
260 260
                             //Tries to pass all the info of each artesano into a new page, the page that display this information is 'artesano.html', not to be confused with 'artesanias.html' or 'artesanos.html'(current page)
261 261
                             //And puts this into the 'item' variable
262
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre.replace(/"/g, " ")}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["Email"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
262
+                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre.replace(/"/g, " ")}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["Email"]}', esp: '${Artesano.Especificacion}', red1: '${Artesano["Red Social 1"]}', red2: '${Artesano["Red Social 2"]}', ecom: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
263 263
                         <div class="title">${Artesano.Nombre}</div>
264 264
                     </ons-list-item>`);
265 265
 
@@ -364,14 +364,14 @@
364 364
                              });*/
365 365
 
366 366
                              for(var i=0; i<results.length; i++) {
367
-
367
+                                
368 368
                                  //if(Esp[num] in artesanos_json.) {}
369 369
                                  //results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
370 370
                                  ANombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
371 371
                                  Artesanos+=`${ANombre}|`
372
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["Tecnica"]}&&`
372
+                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["E-Commerce 1"]}|${results[i]["Red Social 1"]}|${results[i]["Red Social 2"]}|${results[i]["Tecnica"]}&&`
373 373
                                  //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
374
-                             }
374
+                                }
375 375
 
376 376
                              return {
377 377
                                  name: Esp[num],
@@ -400,17 +400,20 @@
400 400
                                      tel = lot[1],
401 401
                                      email = lot[2],
402 402
                                      esp = lot[3],
403
-                                     redes = lot[4],
404
-                                     tecnicas = lot[5];
403
+                                     ecom = lot[4],
404
+                                     red1 = lot[5];
405
+                                     red2 = lot[6];
406
+                                     tecnicas = lot[7]
407
+                                     console.log(lot)
405 408
 
406
-                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
409
+                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i].replace(/"/g, " ")}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', red1: '${red1}', red2: '${red2}', ecom: '${ecom}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
407 410
                              }
408 411
 
409 412
                              if (Artesania.name == "Figuras y simbolos indigenas") {
410 413
                                  Artesania.name = "Figuras y símbolos indígenas";
411 414
                              } 
412 415
 
413
-                             console.log(Artesania.name);
416
+        
414 417
 
415 418
                              return ons.createElement(`
416 419
               <ons-list-item expandable tappable>
@@ -551,7 +554,7 @@
551 554
                     for (i = 0; i < all_artesanos.length;i++){
552 555
                         all_artesanos[i].Nombre = all_artesanos[i].Nombre +  " " + all_artesanos[i]["Apellido Paterno"] + " " + all_artesanos[i]["Apellido Materno"];
553 556
                         var artesano = ons.createElement(`<ons-list-item class = "artists"
554
-                        onclick="SNavigator.pushPage('artesano_s.html', { data: {title: '${all_artesanos[i].Nombre.replace(/"/g, " ")}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["Email"]}', esp: '${all_artesanos[i].Especificacion}', redes: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
557
+                        onclick="SNavigator.pushPage('artesano_s.html', { data: {title: '${all_artesanos[i].Nombre.replace(/"/g, " ")}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["Email"]}', esp: '${all_artesanos[i].Especificacion}', red1: '${all_artesanos[i]["Red Social 1"]}', red2: '${all_artesanos[i]["Red Social 2"]}', ecom: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
555 558
                         <div>${all_artesanos[i].Nombre}</div>
556 559
                     </ons-list-item>`);
557 560
                         document.getElementById('results').appendChild(artesano);
@@ -587,9 +590,13 @@
587 590
                             tel = this.data.tel,
588 591
                             em = this.data.email,
589 592
                             esp = this.data.esp,
590
-                            redes = this.data.redes,
593
+                            red1 = this.data.red1,
594
+                            red2 = this.data.red2,
595
+                            ecom = this.data.ecom,
591 596
                             tecnicas = this.data.tecnicas;
592 597
 
598
+                            
599
+
593 600
                         //here the email is the string made from the start to where the '#' is.
594 601
                         
595 602
 
@@ -638,37 +645,43 @@
638 645
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
639 646
                         }
640 647
 
641
-                        console.log("Redes: "+redes);
648
+                        
642 649
 
643 650
                         //Here it has to decide what to do depending on the links they give to their social media pages
644 651
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
645
-                        //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
646
-                        //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
652
+                        
653
+                        
647 654
                         //If it's none of them then it will not display anything
648
-                        if(redes.includes("facebook")){
649
-
650
-                            console.log(redes.substring(1,redes.length-2));
651
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
655
+                        //First Social Media
656
+                        if(red1.includes("facebook")){
657
+                            data+='<br><a href="'+ red1 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
652 658
                         }
653
-                        else if(redes.includes("instagram")){
654
-                            console.log(redes.substring(1,redes.length-2));
655
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
659
+                        else if(red1.includes("instagram")){
660
+                            data+='<br><a href="'+ red1 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
656 661
                         }
657
-                        else if(redes.includes("myspace")){
658
-                            console.log(redes.substring(1,redes.length-2));
659
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
662
+                        else if(red1.includes("myspace")){
663
+                            data+='<br><a href="'+ red1 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
660 664
                         }
661
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
662
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
663
-                            redes = redes.substr(0, redes.length-1);
664
-                            console.log(redes);
665
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
665
+
666
+                        //Second Social Media
667
+                        if(red2.includes("facebook")){
668
+                            data+='<br><a href="'+ red2 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
669
+                        }
670
+                        else if(red2.includes("instagram")){
671
+                            data+='<br><a href="'+ red2 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
666 672
                         }
667
-                        else if(redes.includes("#") || redes.includes("mailto")){
668
-                            console.log("tiene un disparate");
669
-                        } else {
670
-                            console.log("no tiene nada");
673
+                        else if(red2.includes("myspace")){
674
+                            data+='<br><a href="'+ red2 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
671 675
                         }
676
+                        
677
+                        //E-commerce 
678
+                        if ((ecom.includes(".org") || ecom.includes(".com")) && !ecom.includes("mailto")){
679
+                            ecom = ecom.substr(ecom.indexOf("#")+1,ecom.length);
680
+                            ecom = ecom.substr(0, ecom.length-1);
681
+                            console.log(ecom);
682
+                            data+='<br><a href="'+ ecom + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
683
+                        }
684
+                        
672 685
 
673 686
                         //This is the part that allows eveything (data) to be displayed
674 687
                         document.getElementById("all").innerHTML = `${data}`;
@@ -701,7 +714,9 @@
701 714
                             tel = this.data.tel,
702 715
                             em = this.data.email,
703 716
                             esp = this.data.esp,
704
-                            redes = this.data.redes,
717
+                            red1 = this.data.red1,
718
+                            red2 = this.data.red2,
719
+                            ecom = this.data.ecom,
705 720
                             tecnicas = this.data.tecnicas;
706 721
 
707 722
                         //here the email is the string made from the start to where the '#' is.
@@ -746,37 +761,44 @@
746 761
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
747 762
                         }
748 763
 
749
-                        console.log("Redes: "+redes);
764
+                        
750 765
 
751 766
                         //Here it has to decide what to do depending on the links they give to their social media pages
752 767
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
753 768
                         //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
754 769
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
755 770
                         //If it's none of them then it will not display anything
756
-                        if(redes.includes("facebook")){
757
-
758
-                            console.log(redes.substring(1,redes.length-2));
759
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
771
+                        if(red1.includes("facebook")) {
772
+                            data+='<br><a href="'+ red1 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
773
+                        }
774
+                        else if(red1.includes("instagram")){
775
+                            
776
+                            data+='<br><a href="'+ red1 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
777
+                        }
778
+                        else if(red1.includes("myspace")){
779
+                            
780
+                            data+='<br><a href="'+ red1 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
760 781
                         }
761
-                        else if(redes.includes("instagram")){
762
-                            console.log(redes.substring(1,redes.length-2));
763
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
782
+
783
+
784
+                        if(red2.includes("facebook")){
785
+                            data+='<br><a href="'+ red2 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
764 786
                         }
765
-                        else if(redes.includes("myspace")){
766
-                            console.log(redes.substring(1,redes.length-2));
767
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
787
+                        else if(red2.includes("instagram")){
788
+                            data+='<br><a href="'+ red2 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
768 789
                         }
769
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
770
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
771
-                            redes = redes.substr(0, redes.length-1);
772
-                            console.log(redes);
773
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
790
+                        else if(red2.includes("myspace")){
791
+                            data+='<br><a href="'+ red2 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
774 792
                         }
775
-                        else if(redes.includes("#") || redes.includes("mailto")){
776
-                            console.log("tiene un disparate");
777
-                        } else {
778
-                            console.log("no tiene nada");
793
+
794
+
795
+                        if((ecom.includes(".org") || ecom.includes(".com")) && !ecom.includes("mailto")){
796
+                            ecom = ecom.substr(ecom.indexOf("#")+1,ecom.length);
797
+                            ecom = ecom.substr(0, ecom.length-1);
798
+
799
+                            data+='<br><a href="'+ ecom + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
779 800
                         }
801
+                        
780 802
 
781 803
                         //This is the part that allows eveything (data) to be displayed
782 804
                         document.getElementById("all2").innerHTML = `${data}`;

+ 12
- 12
www/index.html Переглянути файл

@@ -654,24 +654,24 @@
654 654
                         //If it's none of them then it will not display anything
655 655
                         //First Social Media
656 656
                         if(red1.includes("facebook")){
657
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
657
+                            data+='<br><a href="'+ red1 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
658 658
                         }
659 659
                         else if(red1.includes("instagram")){
660
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
660
+                            data+='<br><a href="'+ red1 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
661 661
                         }
662 662
                         else if(red1.includes("myspace")){
663
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
663
+                            data+='<br><a href="'+ red1 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
664 664
                         }
665 665
 
666 666
                         //Second Social Media
667 667
                         if(red2.includes("facebook")){
668
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
668
+                            data+='<br><a href="'+ red2 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
669 669
                         }
670 670
                         else if(red2.includes("instagram")){
671
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
671
+                            data+='<br><a href="'+ red2 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
672 672
                         }
673 673
                         else if(red2.includes("myspace")){
674
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
674
+                            data+='<br><a href="'+ red2 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
675 675
                         }
676 676
                         
677 677
                         //E-commerce 
@@ -769,26 +769,26 @@
769 769
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
770 770
                         //If it's none of them then it will not display anything
771 771
                         if(red1.includes("facebook")) {
772
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
772
+                            data+='<br><a href="'+ red1 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
773 773
                         }
774 774
                         else if(red1.includes("instagram")){
775 775
                             
776
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
776
+                            data+='<br><a href="'+ red1 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
777 777
                         }
778 778
                         else if(red1.includes("myspace")){
779 779
                             
780
-                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
780
+                            data+='<br><a href="'+ red1 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
781 781
                         }
782 782
 
783 783
 
784 784
                         if(red2.includes("facebook")){
785
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
785
+                            data+='<br><a href="'+ red2 + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
786 786
                         }
787 787
                         else if(red2.includes("instagram")){
788
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
788
+                            data+='<br><a href="'+ red2 + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
789 789
                         }
790 790
                         else if(red2.includes("myspace")){
791
-                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
791
+                            data+='<br><a href="'+ red2 + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
792 792
                         }
793 793
 
794 794