Skip to content

Instantly share code, notes, and snippets.

@zaru
Created October 4, 2012 05:19
Show Gist options
  • Save zaru/3831619 to your computer and use it in GitHub Desktop.
Save zaru/3831619 to your computer and use it in GitHub Desktop.
Amazonのページ情報を、Googleフォームに自動挿入するブックマークレット
//完全自分専用
javascript:(function(){
var name = encodeURI('name');
var priceObj = document.getElementById('actualPriceValue');
var price = priceObj.innerText.replace('¥','').replace(' ','').replace(',','');
var bookObj = document.getElementById('btAsinTitle');
var book = bookObj.innerText;
var url = location.href;
location.href = 'https://spreadsheets0.google.com/spreadsheet/viewform?hl=ja'
+ '&formkey=XXXXXXXXXXXXXXXXXXXXXXX'
+ '&entry_8=' + name
+ '&entry_0=' + encodeURI(book)
+ '&entry_4=' + encodeURIComponent(url)
+ '&entry_1=' + '1'
+ '&entry_2=' + price
+ '#gid=0';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment