Skip to content

Commit 4efec40

Browse files
committed
add json
1 parent b6e87d6 commit 4efec40

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

BookReview.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
var html = imageLink + authorText + review;
7575
$('#showtext').val( html);
7676
$('#preview').html(html);
77+
$("#showjson").val(JSON.stringify({
78+
name: $('#title').val(),
79+
url: `http://www.amazon.com/dp/${asin}?tag=fromdevtools-20`,
80+
imageUrl: data.url
81+
}));
7782
$('#imageUrl').val(data.url);
7883
}
7984
};
@@ -86,6 +91,7 @@
8691

8792
$("#showtext").selectOnFocus();
8893
$("#imageUrl").selectOnFocus();
94+
$("#showjson").selectOnFocus();
8995

9096
});//]]>
9197

@@ -112,6 +118,7 @@
112118
</div>
113119
<div class="right">
114120
<textarea id="showtext"></textarea>
121+
<textarea id="showjson"></textarea>
115122
<input id="imageUrl" type="text" style="width:100%;"/>
116123
</div >
117124
</div>

0 commit comments

Comments
 (0)