mustpax / save-to-nvALT

"Save to nvALT" saves pages from Chrome to nvALT. Pages are saved in clean Markdown. No fluff.
https://chrome.google.com/webstore/detail/save-to-nvalt/ebkgfgjoekdgchbafocpchdecgmicbfi?hl=en-US
MIT License
20 stars 1 forks source link

Nothing happens when clicked #5

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi!

I installed nvAlt and this chrome extension.

When I first used it, Chrome asked me if I wanted to allow it to run the external app to handle the URLs. I said yes.

However, whether I select text on a page or not, when I click on the extension icon, nothing happens.

Any ideas what I may be doing wrong?

The only thing that I think might be interesting is the order that I installed/did things:

OSX 10.11.6 (15G31) Google Chrome Version 51.0.2704.103 (64-bit) Save to nvALT 1.0.1 nvAlt Version 2.2b (111)

lukebrooker commented 8 years ago

I have the same problem. Same steps as above.

ghost commented 8 years ago

FYI, I uninstalled it and am using this instead:

http://jots.mypopescu.com/post/8529405944/nvalt-bookmarklet

lukebrooker commented 8 years ago

Ah awesome. Thank you!

cdromain commented 8 years ago

Hey guys,

I'm also looking for a tool to save web content to nvALT as Markdown, if possible including the source URL. On my setup (OSX 10.10, Chrome v52) the Save to nvALT Chrome extension sometimes works and sometimes doesn't (probably have to do with the website, not sure need to test more). I tried the one you recommend but it doesn't work at all on my side - is it working for you ? I've read that it was using Instapaper mobilizer and it's been deprecated... I'm also using PopClip which works pretty well (with the nvALT extension) to copy selected text into nvALT (without the source URL unfortunately).

Thanks in advance, let's find that perfect tool we're looking for :)

ghost commented 8 years ago

I definitely edited it. Here is mine:

javascript:(function()%7B%0A%20%20var%20w%3Dwindow%3B%0A%20%20var%20d%3Ddocument%3B%0A%20%20var%20pageSelectedTxt%3Dw.getSelection%3Fw.getSelection()%3A(d.getSelection)%3Fd.getSelection()%3A(d.selection%3Fd.selection.createRange().text%3A0)%3B%0A%20%20var%20pageTitle%3Dd.title%3B%0A%20%20var%20pageUri%3Dw.location.href%3B%0A%20%20var%20tmplt%3D%22From%20%5B%22%2BpageTitle%2B%22%5D(%22%2BpageUri%2B%22)%3A%5Cn%5Cn%22%3B%0A%20%20if(pageSelectedTxt!%3D%22%22)%20%7B%0A%20%20%20%20pageSelectedTxt%3D%22%3E%2520%22%2BpageSelectedTxt%3B%0A%20%20%20%20pageSelectedTxt%3DpageSelectedTxt.replace(%2F(%5Cr%5Cn%7C%5Cn%2B%7C%5Cr)%2Fgm%2C%22%5Cn%22)%3B%0A%20%20%20%20pageSelectedTxt%3DpageSelectedTxt.replace(%2F%5Cn%2Fg%2C%22%5Cn%3E%20%5Cn%3E%20%22)%3B%20%2F%2F%20todo%20fix%20this%0A%20%20%20%20w.location.href%3D%22nvalt%3A%2F%2Fmake%2F%3Ftxt%3D%22%2BencodeURIComponent(tmplt%2BpageSelectedTxt)%2B%22%26title%3D%22%2BencodeURIComponent(%22TODO%20READ%20%22%20%2B%20pageTitle)%3B%0A%20%20%7D%0A%20%20else%20%7B%0A%20%20%20%20w.location.href%3D%22nvalt%3A%2F%2Fmake%2F%3Furl%3D%22%2BencodeURIComponent(pageUri)%2B%22%26title%3D%22%2BencodeURIComponent(%22TODO%20READ%20%22%20%2B%20pageTitle)%3B%0A%20%20%7D%0A%7D)()%3B

cdromain commented 8 years ago

Thanks a bunch : ) Works with all kinds of websites, and even saves the source URL inside the nvALT note, exactly what I was looking for ! 👍 Modified it as well - here's my version in case it can be useful to someone else : (just copy the JS code into the URL field of a new bookmark in your browser bookmark bar) :

javascript:(function(){ var w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt=""; tmplt="From ["+pageTitle+"]("+pageUri+"):\n\n"; if(pageSelectedTxt!="") { pageSelectedTxt=">%20"+pageSelectedTxt; pageSelectedTxt=pageSelectedTxt.replace(/(\r\n|\n+|\r)/gm,"\n"); pageSelectedTxt=pageSelectedTxt.replace(/\n/g,"\n>%20\n>%20"); w.location.href="nvalt://make/?txt="+encodeURIComponent(tmplt+pageSelectedTxt)+"&title="+encodeURIComponent(pageTitle) } else { w.location.href="nvalt://make/?url="+encodeURIComponent(pageUri)+"&title="+encodeURIComponent(pageTitle) } })();

Cheers