| View previous topic :: View next topic |
| Author |
Message |
gashade
Joined: 19 Apr 2007 Posts: 12 Location: Amsterdam
|
Posted: Tue Jun 12, 2007 22:40 Post subject: Doesn't work anymore with Safari 3.0 beta? |
|
|
| LogitechLCDTool doesn't work anymore here. I didn't change anything to the HTML code. Only thing that I know is different is that I now have the Safari 3.0 beta installed. Could that be it? |
|
| Back to top |
|
 |
liyanage Site Admin

Joined: 22 May 2003 Posts: 1104 Location: Zurich, Switzerland
|
Posted: Tue Jun 12, 2007 23:24 Post subject: |
|
|
| indeed, same here... Doesn't seem to be compatible with the webkit installed by Safari 3 beta. |
|
| Back to top |
|
 |
etj
Joined: 12 Jun 2007 Posts: 1
|
Posted: Wed Jun 13, 2007 0:05 Post subject: |
|
|
| Yes that seems to be it- when I used the Safari "Uninstaller" and went back to Safari 2.0.4, then it was back to normal for the LCD display. |
|
| Back to top |
|
 |
gashade
Joined: 19 Apr 2007 Posts: 12 Location: Amsterdam
|
Posted: Thu Jun 14, 2007 22:29 Post subject: |
|
|
Is an update still in the works, Marc?
Thanks. _________________ dvdpedia
Last edited by gashade on Wed Aug 01, 2007 22:51; edited 1 time in total |
|
| Back to top |
|
 |
liyanage Site Admin

Joined: 22 May 2003 Posts: 1104 Location: Zurich, Switzerland
|
Posted: Sat Jun 16, 2007 8:20 Post subject: |
|
|
| yes, however, if a build for the Safari 3 beta webkit is incompatible with a system running Safari 2, then I will obviously have to configure for the latter, i.e. I can't promise a build that will work with Safari 3 beta systems. |
|
| Back to top |
|
 |
gashade
Joined: 19 Apr 2007 Posts: 12 Location: Amsterdam
|
Posted: Sun Jun 17, 2007 12:09 Post subject: |
|
|
| liyanage wrote: | | yes, however, if a build for the Safari 3 beta webkit is incompatible with a system running Safari 2, then I will obviously have to configure for the latter, i.e. I can't promise a build that will work with Safari 3 beta systems. |
Thanks Marc, looking forward to it very much!
Personally, I have gone back to Safari 2. |
|
| Back to top |
|
 |
liyanage Site Admin

Joined: 22 May 2003 Posts: 1104 Location: Zurich, Switzerland
|
Posted: Sun Jun 17, 2007 22:05 Post subject: |
|
|
It seems to be just a small JavaScript issue. Try to replace the "update" JavaScript function in the code with this version:
| Code: | function update() {
var itunesStatus = application.runSystemScript('iTunesCurrentTrackFullStatus');
itunesStatus = '(' + itunesStatus + ')';
var itunes = eval(itunesStatus);
setText('pos', formatTime(itunes['position']));
setText('duration', formatTime(itunes['duration']));
setText('artist', itunes['artist']);
setText('name', itunes['name']);
setText('album', itunes['album']);
$('diamond').style.left = Math.floor(90 / itunes['duration'] * itunes['position']) + 'px';
if(!application.updateDisplay()) stop();
} |
This works on my system with Safari 3 beta. Let me know if it works for you.
This is the full script:
| Code: | <html>
<head>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript">
var timer;
function setText(id, value) {$(id).innerHTML = value}
function formatTime(sec) {var ss = Math.floor(sec % 60); ss = ss < 10 ? '0' + ss : ss; return Math.floor(sec/60) + ':' + ss}
function update() {
var itunesStatus = application.runSystemScript('iTunesCurrentTrackFullStatus');
itunesStatus = '(' + itunesStatus + ')';
var itunes = eval(itunesStatus);
setText('pos', formatTime(itunes['position']));
setText('duration', formatTime(itunes['duration']));
setText('artist', itunes['artist']);
setText('name', itunes['name']);
setText('album', itunes['album']);
$('diamond').style.left = Math.floor(90 / itunes['duration'] * itunes['position']) + 'px';
if(!application.updateDisplay()) stop();
}
function handleButton(button, upDown) {
if (upDown == "down") return;
if (button == "Softkey1") window.application.runUserScript('iTunesActivate');
if (button == "Softkey4") window.application.runSystemScript('visitEntropyWebsite');
if (button == "Display") showOverlay();
}
function showOverlay() {
var data = window.application.runUserScript('doShellScript');
setText('overlay', data);
$('overlay').style.display = 'block';
setTimeout("$('overlay').style.display = 'none';", 4000);
}
function init() {
window.application.registerUserScript('iTunesActivate', 'tell application "iTunes" to activate');
window.application.registerUserScript('doShellScript', 'do shell script "uptime"');
start();
}
function start() {
timer = setInterval("update()", 1000);
}
function stop() {
clearInterval(timer);
}
</script>
<style type="text/css">
#top {overflow: hidden; height: 13px; margin-left: 1px;}
#time {width: 156px;}
#progress {width: 90px; height: 7px; border: 1px solid black; position: relative; overflow: hidden;}
#diamond {position: absolute; z-index: -1; margin-left: -3px;}
#overlay {position: fixed; top: 0; left: 0; background-color: white; width: 160; height: 43; padding: 2px; display: none;}
</style>
<link rel="stylesheet" href="css/default.css" />
</head>
<body class="border" onload="init();">
<div id="top"><span id="artist"></span></div>
<marquee scrolldelay="1000" scrollamount="20"><span id="name"></span> - <span id="album"></span></marquee>
<table id="time"><tr><td id="pos"></td><td><div id="progress"><img id="diamond" src="data:image/gif;base64,R0lGODlhBwAHAIAAAP///wAAACH5BAAAAAAALAAAAAAHAAcAAAIMhGMZq8sOAUSHJZkKADs=" /></div></td><td id="duration"></td></tr></table>
<div id="overlay"></div>
</body>
</html> |
|
|
| Back to top |
|
 |
gashade
Joined: 19 Apr 2007 Posts: 12 Location: Amsterdam
|
Posted: Mon Jun 18, 2007 10:03 Post subject: |
|
|
Yes it works here too. Thank you, Marc! _________________ dvdpedia |
|
| Back to top |
|
 |
|