-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimage_urls.js
32 lines (31 loc) · 1.92 KB
/
image_urls.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const IMAGE_URLS = [
{ name: '-Pick an Image-', value: '' },
{ name: 'Cat', value: 'http://i.imgur.com/Tn1VjEp.jpg' },
{ name: 'Dog', value: 'http://i.imgur.com/8A3lses.jpg' },
{ name: 'Elephant', value: 'https://c1.staticflickr.com/8/7391/11330864553_dfc560ae6a.jpg' },
{ name: 'Goldfish', value: 'https://farm2.staticflickr.com/1301/1349366952_982df2276f_z_d.jpg' },
{ name: 'Spider', value: 'https://c1.staticflickr.com/3/2813/9669144212_9b7edef254.jpg' },
{ name: 'Otter', value: 'https://c1.staticflickr.com/9/8262/8696873843_99b3238748.jpg' },
{ name: 'Bird', value: 'https://farm4.staticflickr.com/3075/3168662394_7d7103de7d_z_d.jpg' },
{ name: 'Bridge', value: 'https://c1.staticflickr.com/9/8232/8385101488_b101c9a9a7.jpg' },
{ name: 'Airplane', value: 'https://farm6.staticflickr.com/5590/14821526429_5c6ea60405_z_d.jpg' },
{ name: 'Violin', value: 'https://farm6.staticflickr.com/5076/7175144508_e1ba0d6e35_z_d.jpg' },
{ name: 'Piano', value: 'https://farm4.staticflickr.com/3224/3081748027_0ee3d59fea_z_d.jpg' },
{ name: 'Apple', value: 'https://c1.staticflickr.com/3/2110/2442762079_5c9549c8cb.jpg' },
{ name: 'Orange', value: 'https://c1.staticflickr.com/4/3228/2624653125_8b854d5e9a_b.jpg' },
{ name: 'Flower', value: 'https://farm5.staticflickr.com/4037/4682037903_88cf1cfc47_z_d.jpg' },
{ name: 'Burrito', value: 'https://c1.staticflickr.com/8/7064/6942547573_9fb88220e4.jpg' },
{ name: 'Coffee', value: 'https://c1.staticflickr.com/4/3173/2863665832_d9b3a29e30.jpg' },
{ name: 'Wine', value: 'https://farm4.staticflickr.com/3827/11349066413_99c32dee4a_z_d.jpg' }
];
var select = document.getElementById("image-urls");
function loadURLs() {
select.remove(0);
for (i=0; i < IMAGE_URLS.length; i++) {
let obj = IMAGE_URLS[i];
let option = document.createElement("option");
option.text = obj.name;
option.value = obj.value;
select.add(option);
}
}