From ea33ef9e0b37d759523744e72ea7ee3c00c18f04 Mon Sep 17 00:00:00 2001 From: JesseWeinstein Date: Mon, 10 Nov 2014 23:24:23 -0800 Subject: [PATCH] Add Markdown to generated post Switch to using content parameter, which doesn't alter its value, unlike the other ones. Use a H2 header for the document.title, quote the selected text, and put the URL at the bottom, in a separate paragraph. --- app/helpers/application_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a51b99a53..1197a0e3d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -24,12 +24,12 @@ module ApplicationHelper def bookmarklet_url( height = 400, width = 620) "javascript:(function(){" \ "f='#{AppConfig.pod_uri.to_s}bookmarklet" \ - "?url='+encodeURIComponent(window.location.href)" \ - "+'&title='+encodeURIComponent(document.title)" \ - "+'¬es='+encodeURIComponent(''+" \ + "?content='+encodeURIComponent('##%20'+document.title+" \ + "'\n>%20'+" "(window.getSelection?window.getSelection():" \ "document.getSelection?document.getSelection():" \ - "document.selection.createRange().text))" \ + "document.selection.createRange().text)" \ + "+'\n\n'+window.location.href)" \ "+'&v=1&';" \ "a=function(){" \ "if(!window.open(f+'noui=1&jump=doclose'," \