From 1527555a9631cce1eb37dd7fa76cac27adaeba96 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 4 Apr 2011 23:11:05 +0200 Subject: [PATCH] restructure opera bookmarklet popup code (doesnt work currently :)) and make normal opera bookmarklet code a bit easier to read --- data/templates/editbookmark.tpl.php | 39 +++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 99afa9c..b7fb227 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -259,25 +259,48 @@ $popupLink = 'javascript:' . '?action=add' . "&address='+encodeURIComponent(document.location.href)+'" . "&title='+encodeURIComponent(document.title)+'" - . "&description='+encodeURIComponent(SELECTION)+'" - . "';"; + . "&description='+encodeURIComponent(SELECTION)" + . ";"; $link = 'opera:/button/' //Opera command - . 'Go to page,' + . 'Go to page' //command parameter 1 - . '"' . rawurlencode($popupLink) . '",' + . ',"' . rawurlencode($popupLink) . '"' //command parameter 2 . ',' //button title - . '"Post to ' . fixOperaButtonName($GLOBALS['sitename']) . '",' - //button icon - . '"Scuttle"'; + . ',"Post to ' . fixOperaButtonName($GLOBALS['sitename']) . '"' + //button icon name + . ',"Scuttle"'; echo jsEscTitle(htmlspecialchars($link)); ?>'.replace('SELECTION', selection) + '">' + '' + '
  • ' - + '' + + ''.replace('SELECTION', selection) + + '">' + '
  • ' + '' );