View Single Post
Posts: 23 | Thanked: 15 times | Joined on Mar 2010 @ Moscow
#7
This thread doesn't seem to gain much attention, but I'll post my solution to send-to-device feature anyway. Maybe someone finds this useful.

1) Go to snipurl.com and get an account. Remember your username (example "myUname")
2) Go to your account settings and find api key in the right settings pane. (example "blahblahblah")
3) Create a new snip with any destination and nick and passcode of your choice. (example nick "c2dmwannabe", passcode "123")
4) Create a bookmark on your n900 (or any other device) that points to http://cl.lk/c2dmwannabe-123 (pick any base url you like, then add snip nick, "-" symbol and your passcode. Verify that this bookmark takes you where it should.
5) if step 4 succeeded, go to http://subsimple.com/bookmarklets/jsbuilder.htm and fill in the following code:
Code:
javascript:
var uname = 'myUname';
var apikey = 'blahblahblah';
var snipnick = 'c2dmwannabe';
var snipPasscode = '123';
snipnick = encodeURIComponent(snipnick );
var httpReq;
if (typeof XMLHttpRequest != "undefined") {
  httpReq = new XMLHttpRequest();
}
else{
  try {
    httpReq = new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch (e) {
    try {
      httpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (E) {
      throw new Error("This browser does not support XMLHttpRequest.");
    }
  }
}
var posttext;
posttext = '';
posttext += 'sniplink=' + encodeURIComponent(document.URL) + '&';
posttext += 'snipnick='+ snipnick +'&';
posttext += 'snipuser='+ uname +'&';
posttext += 'snipapi='+ apikey +'&';
posttext += 'sniptitle=C2DMwannabe&';
posttext += 'snipowner=&';
posttext += 'snipformat=simple&';
posttext += 'snipaction=UPDATE&';
posttext += 'snipcurrentnick='+ snipnick +'&';
posttext += 'snipresetcount=&';
posttext += 'snippk='+ snipPasscode;
httpReq.open("POST", "http://snipurl.com/site/getsnip", false);
httpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpReq.send( posttext );
httpReq = null;
6) Change first 4 lines of code with your actual details
7) Press "Format" button and bookmark the link that you get below.
8) Now every time you click the bookmark you get while being on some page, it's url is sent to snurl, so the bookmark on n900 starts pointing to the very same page.

Enjoy!

Last edited by little_beat; 2010-06-05 at 14:56.