2 header('Content-Type: text/javascript');
3 require_once 'header.inc.php';
4 require_once 'functions.inc.php';
5 $player_root = $root .'includes/player/';
9 function deleteBookmark(ele, input) {
11 $(ele).parent().append("<span><?php echo T_('Are you sure?') ?> <a href=\"#\" onclick=\"deleteConfirmed(this, " + input + "); return false;\"><?php echo T_('Yes'); ?></a> - <a href=\"#\" onclick=\"deleteCancelled(this); return false;\"><?php echo T_('No'); ?></a></span>");
14 function deleteCancelled(ele) {
15 $(ele).parent().prev().show();
16 $(ele).parent().remove();
19 function deleteConfirmed(ele, input) {
20 $.get("<?php echo $root; ?>ajaxDelete.php?id=" + input, function(data) {
21 if (1 === parseInt(data)) {
22 $(ele).parents(".xfolkentry").slideUp();
28 function useAddress(ele) {
29 var address = ele.value;
31 if (address.indexOf(':') < 0) {
32 address = 'http:\/\/' + address;
34 getTitle(address, null);
39 function getTitle(input) {
40 var title = $("#titleField").val();
41 if (title.length < 1) {
42 $("#titleField").css("background-image", "url(<?php echo $root; ?>loading.gif)");
43 if (input.indexOf("http") > -1) {
44 $.get("<?php echo $root; ?>ajaxGetTitle.php?url=" + input, function(data) {
45 $("#titleField").css("background-image", "none")
54 /* Insert Flash player for MP3 links */
55 if ($("#bookmarks").length > 0) {
56 $("a[href$=.mp3].taggedlink").each(function() {
58 var code = '<object type="application/x-shockwave-flash" data="<?php echo $player_root ?>musicplayer_f6.swf?song_url=' + url +'&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=0000ff,0000ff,ff0000,ff0000&buttons=<?php echo $player_root ?>load.swf,<?php echo $player_root ?>play.swf,<?php echo $player_root ?>stop.swf,<?php echo $player_root ?>error.swf" width="14" height="14">';
59 code = code + '<param name="movie" value="<?php echo $player_root ?>musicplayer.swf?song_url=' + url +'&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=0000ff,0000ff,ff0000,ff0000&buttons=<?php echo $player_root ?>load.swf,<?php echo $player_root ?>play.swf,<?php echo $player_root ?>stop.swf,<?php echo $player_root ?>error.swf" />';
60 code = code + '</object> ';
61 $(this).prepend(code);