hypertagger
an alternative to bookmarks
share websites with one right click
For this extension to work you need 3 things
- this extension
- ajax endpoint to store information on server
- web site to read the information and present as links
Here is a simple example of ajax endpoint code that will append bookmarks and titles to the file hypertagger.html
<?php
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
function append($sz="", $name='sharedLinks.html',$mode='a') {
$fp=fopen($name,$mode);
fwrite($fp,$sz."\r\n");
fclose($fp);
}
$pageUrl = @$_REQUEST['pageUrl'];
$prompt = @$_REQUEST['prompt'];
$datetime = @$_REQUEST['datetime'];
if($pageUrl && $prompt) {
$newLine = "<a href='$pageUrl' title='$datetime' >$prompt</a><br>";
append($newLine);
}
$lastId = 1; // fake database insert id
$result = array(
'status' => 0,
'lastId' => $lastId,
'message' => "ok"
);
echo json_encode($result);
download
see html
reset html