body {font-family: monospace} a {color: blue; text-decoration: none} img {border-style: none}"; function h() { print ""; print "drag the robot"; print "**"; print "to the bookmarks toolbar, right click -> properties, and set a keyword."; print "
"; print "<keyword> // view all entries\n"; print "<keyword> ;[text] // add link to current page (with optional custom text)*\n"; print "<keyword> <text>[;text[;text]] // add text, (optional) link text, (optional) text after link*\n"; print "<keyword> -<line number> // delete line\n"; print "<keyword> -h // show this page\n"; print ""; print "*add |<url> to the end to override current page url"; } if( !file_exists($markdown_file) ) { print "can't find markdown.php"; print "get it here if you don't have it"; } include_once $markdown_file; $all=explode("|",urldecode($_SERVER['QUERY_STRING'])); $txt=explode(";",$all[0]); $before = trim($txt[0]); $link = trim($txt[1]); $after = trim($txt[2]); if( $before == "-h" ) { $_SERVER['QUERY_STRING'] != "-h" ? header("Location: ?-h") : h(); die; } if( $before == "%s" ) { header("Location: ."); die; } // display if( !$before && !$link && !$all[1] ) { if( $_SERVER['QUERY_STRING'] ) { header("Location: ."); } if( !file_exists($data_file) || !filesize($data_file) ) { h(); die; } $lines = file($data_file); $i = count($lines); $j = strlen($i); foreach( $lines as $line ) { $all[] .= str_repeat(" ",$j - strlen($i))."[".$i--."] $line"; } $all = @join("