Permalink
Browse files

prepopulate the cardorizer location box

  • Loading branch information...
1 parent 0007ca7 commit abf9ff6a492934823881cd3056c0752b5cc17116 @markdrago markdrago committed Feb 6, 2012
Showing with 10 additions and 1 deletion.
  1. +10 −1 js/cardorizer-creator.js
View
@@ -1,7 +1,16 @@
$(document).ready(function() {
+
+ var scheme = location.protocol + "//";
+ var host = location.hostname;
+ var port = location.port;
+ if (port != "") { port = ":" + port; }
+ var path = location.pathname;
+ var cardorizer_url = scheme + host + port + path;
+ $("#cardorizer-url").val(cardorizer_url);
+
$('#make-cardorizer').click(function() {
$.ajax({
- url:'/bookmarklet/bookmarklet.tmpl.txt',
+ url:'bookmarklet/bookmarklet.tmpl.txt',
datatype: 'text',
success: function(result) {
var board_id = $('#board-id').val();

0 comments on commit abf9ff6

Please sign in to comment.