Skip to content

Instantly share code, notes, and snippets.

@julik
Created January 11, 2010 15:29
Show Gist options
  • Save julik/274310 to your computer and use it in GitHub Desktop.
Save julik/274310 to your computer and use it in GitHub Desktop.
javascript:x%20=%20document;y%20=%20window;Q%20=%20null;if(x.selection)%20{Q%20=%20x.selection.createRange().text;}%20else%20if%20(y.getSelection)%20{Q%20=%20y.getSelection();}%20else%20if%20(x.getSelection)%20{Q%20=%20x.getSelection();}Q%20=%20encodeURIComponent(Q);var%20http%20=%20new%20XMLHttpRequest();var%20url%20=%20%22http://he-3d-05-lin:3333/%22;http.open(%22POST%22,%20url,%20true);http.setRequestHeader(%22Content-type%22,%20%22text/plain%22);http.send(Q);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment