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.
This commit is contained in:
parent
9585a1877b
commit
ea33ef9e0b
1 changed files with 4 additions and 4 deletions
|
|
@ -24,12 +24,12 @@ module ApplicationHelper
|
||||||
def bookmarklet_url( height = 400, width = 620)
|
def bookmarklet_url( height = 400, width = 620)
|
||||||
"javascript:(function(){" \
|
"javascript:(function(){" \
|
||||||
"f='#{AppConfig.pod_uri.to_s}bookmarklet" \
|
"f='#{AppConfig.pod_uri.to_s}bookmarklet" \
|
||||||
"?url='+encodeURIComponent(window.location.href)" \
|
"?content='+encodeURIComponent('##%20'+document.title+" \
|
||||||
"+'&title='+encodeURIComponent(document.title)" \
|
"'\n>%20'+"
|
||||||
"+'¬es='+encodeURIComponent(''+" \
|
|
||||||
"(window.getSelection?window.getSelection():" \
|
"(window.getSelection?window.getSelection():" \
|
||||||
"document.getSelection?document.getSelection():" \
|
"document.getSelection?document.getSelection():" \
|
||||||
"document.selection.createRange().text))" \
|
"document.selection.createRange().text)" \
|
||||||
|
"+'\n\n'+window.location.href)" \
|
||||||
"+'&v=1&';" \
|
"+'&v=1&';" \
|
||||||
"a=function(){" \
|
"a=function(){" \
|
||||||
"if(!window.open(f+'noui=1&jump=doclose'," \
|
"if(!window.open(f+'noui=1&jump=doclose'," \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue