Integrate Firefox Social API for bookmarking
This commit is contained in:
parent
f6902bc09d
commit
11e56e5861
@ -115,3 +115,38 @@ echo jsEscTitle(htmlspecialchars($link));
|
|||||||
}
|
}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function activateSocialApi(node) {
|
||||||
|
var baseurl = <?php echo json_encode(addProtocolToUrl(createURL())); ?>;
|
||||||
|
var socialApiData = {
|
||||||
|
// currently required
|
||||||
|
"name": <?php echo json_encode($GLOBALS['sitename']); ?>,
|
||||||
|
"iconURL": baseurl + "themes/default/images/logo.png",
|
||||||
|
"icon32URL": baseurl + "themes/default/images/logo.png",
|
||||||
|
"icon64URL": baseurl + "themes/default/images/logo.png",
|
||||||
|
|
||||||
|
"markURL": "<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&popup=1&width=800&height=470&address=%{url}&title=%{title}&description=%{description}%{text}",
|
||||||
|
"markedIcon": baseurl + "themes/default/images/logo.png",
|
||||||
|
"unmarkedIcon": baseurl + "themes/default/images/logo-empty.png",
|
||||||
|
|
||||||
|
// should be available for display purposes
|
||||||
|
"description": "Self-hosted bookmark manager",
|
||||||
|
"author": "Christian Weiske",
|
||||||
|
"homepageURL": "http://semanticscuttle.sf.net/",
|
||||||
|
|
||||||
|
// optional
|
||||||
|
"version": "0.0.3"
|
||||||
|
};
|
||||||
|
|
||||||
|
var event = new CustomEvent("ActivateSocialFeature");
|
||||||
|
node.setAttribute("data-service", JSON.stringify(socialApiData));
|
||||||
|
node.dispatchEvent(event);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<p>
|
||||||
|
<button onclick="activateSocialApi(this)" title="activate semanticscuttle in firefox">
|
||||||
|
Add SemanticScuttle to Firefox
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
@ -30,11 +30,25 @@ if (isset($rsschannels)) {
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<?php
|
||||||
|
$bodystyle = '';
|
||||||
|
if (isset($_GET['popup'])) {
|
||||||
|
if (isset($_GET['height'])) {
|
||||||
|
$bodystyle .= 'height:' . intval($_GET['height']) . 'px;';
|
||||||
|
}
|
||||||
|
if (isset($_GET['width'])) {
|
||||||
|
$bodystyle .= 'width:' . intval($_GET['width']) . 'px;';
|
||||||
|
}
|
||||||
|
if ($bodystyle != '') {
|
||||||
|
$bodystyle = ' style="' . $bodystyle . '"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<body<?php echo $bodystyle; ?>>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$headerstyle = '';
|
$headerstyle = '';
|
||||||
if(isset($_GET['popup'])) {
|
if (isset($_GET['popup'])) {
|
||||||
$headerstyle = ' class="popup"';
|
$headerstyle = ' class="popup"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
BIN
www/themes/default/images/logo-empty.png
Normal file
BIN
www/themes/default/images/logo-empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -110,7 +110,8 @@ html > body h1 {
|
|||||||
padding-left: 75px;
|
padding-left: 75px;
|
||||||
}
|
}
|
||||||
html > body div#header.popup h1 {
|
html > body div#header.popup h1 {
|
||||||
background: url('images/logo_24.gif') no-repeat 10px;
|
background: url('images/logo.png') no-repeat 10px;
|
||||||
|
background-size: 24px;
|
||||||
padding: 0.5em 0.5em 0.5em 50px;
|
padding: 0.5em 0.5em 0.5em 50px;
|
||||||
}
|
}
|
||||||
/*html > body div#header #welcome {
|
/*html > body div#header #welcome {
|
||||||
|
Loading…
Reference in New Issue
Block a user