Skip to content

Instantly share code, notes, and snippets.

@TaopaiC
Created October 18, 2010 18:13
Show Gist options
  • Save TaopaiC/632700 to your computer and use it in GitHub Desktop.
Save TaopaiC/632700 to your computer and use it in GitHub Desktop.
javascript:(function() {
function og_meta(val) {return $("head meta[property=og:"+val+"]").attr("content")};
var ab = ["http://chart.apis.google.com/chart?chs=300x300&cht=qr&chl=", "MECARD:N:", og_meta("title"), ";ADR:", og_meta("region"),og_meta("locality"),og_meta("street-address"), ";TEL:", og_meta("phone_number"), ";"].join("");
$("<img src='" + ab + "'></img>").appendTo($("body"));
})();
@TaopaiC
Copy link
Author

TaopaiC commented Oct 18, 2010

很隨意的 bookmarklet .

產生 Foursquare QRCode 的 Bookmarklet
在 Foursquare 的 Venue 頁面 (地點), 執行以上的 Bookmarklet , 會在頁尾產生 QRCode , 可以用手機掃描, 就會加入聯絡人了.

測試過 Firefox, Chrome 和 Safari 皆能正常產生 QRCode, 而 Barcode Scanner (Android) 以及 RedLaser (on ipod touch) 皆可正常讀取並且辨識為聯絡人.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment