@@ -57,7 +57,7 @@ slug: download/
57
57
</div >
58
58
</a >
59
59
60
- <a class =' support_link' href =" http://cdnjs.com/libraries/p5.js" >
60
+ <a class =' support_link' href =" http://cdnjs.com/libraries/p5.js" target = " _blank " >
61
61
<div class =" download_box half_box last_box" >
62
62
<h4 >CDN</h4 >
63
63
<p >{{ #i18n " link" }} {{ /i18n }}
@@ -73,7 +73,7 @@ slug: download/
73
73
<div class =" link_group" >
74
74
<a name =" editor" class =" anchor" ><h2 >{{ #i18n " editor-title" }} {{ /i18n }} </h2 ></a >
75
75
76
- <a class =' support_link' href =" https://editor.p5js.org" >
76
+ <a class =' support_link' href =" https://editor.p5js.org" target = " _blank " >
77
77
<div class =" download_box" >
78
78
79
79
<h4 >{{ #i18n " p5.js-editor" }} {{ /i18n }} </h4 >
@@ -124,14 +124,13 @@ slug: download/
124
124
});
125
125
});
126
126
$ (' .support_link' ).on (' click' , function (e ) {
127
- e .preventDefault ();
128
- // if ($(this).hasClass('p5_link')) {
129
- // window.open($(this).attr('href'), '_self');
130
- // setTimeout( function() { window.location = 'support.html'; }, 2000);
131
- // } else {
132
- window .location = ' support.html' ;
133
- window .open ($ (this ).attr (' href' ));
134
- // }
127
+ if ($ (this ).hasClass (' p5_link' )) {
128
+ e .preventDefault ();
129
+ window .location = $ (this ).attr (' href' );
130
+ setTimeout ( function () { window .location = ' support.html' ; }, 2000 );
131
+ } else {
132
+ setTimeout ( function () { window .location = ' support.html' ; }, 100 );
133
+ }
135
134
136
135
});
137
136
0 commit comments