Split bookmarklet_url literal string into lines
To improve the readabilit of diffs that modify it, per https://github.com/diaspora/diaspora/pull/5384#issuecomment-62443426
This commit is contained in:
parent
aec00f834f
commit
9585a1877b
1 changed files with 18 additions and 1 deletions
|
|
@ -22,7 +22,24 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
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(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=1&';a=function(){if(!window.open(f+'noui=1&jump=doclose','diasporav1','location=yes,links=no,scrollbars=yes,toolbar=no,width=#{width},height=#{height}'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()"
|
||||
"javascript:(function(){" \
|
||||
"f='#{AppConfig.pod_uri.to_s}bookmarklet" \
|
||||
"?url='+encodeURIComponent(window.location.href)" \
|
||||
"+'&title='+encodeURIComponent(document.title)" \
|
||||
"+'¬es='+encodeURIComponent(''+" \
|
||||
"(window.getSelection?window.getSelection():" \
|
||||
"document.getSelection?document.getSelection():" \
|
||||
"document.selection.createRange().text))" \
|
||||
"+'&v=1&';" \
|
||||
"a=function(){" \
|
||||
"if(!window.open(f+'noui=1&jump=doclose'," \
|
||||
"'diasporav1'," \
|
||||
"'location=yes,links=no,scrollbars=yes,toolbar=no,width=#{width},height=#{height}'))" \
|
||||
"location.href=f+'jump=yes'};" \
|
||||
"if(/Firefox/.test(navigator.userAgent)){" \
|
||||
"setTimeout(a,0)" \
|
||||
"}else{a()}" \
|
||||
"})()"
|
||||
end
|
||||
|
||||
def contacts_link
|
||||
|
|
|
|||
Loading…
Reference in a new issue