commit
d8b0d44b7f
@ -1,33 +1,33 @@ |
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||||
|
|
||||||
<head> |
<head> |
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
||||||
<title>ubwidget</title> |
<title>ubwidget</title> |
||||||
|
|
||||||
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> |
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> |
||||||
<script src="js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script> |
<script src="js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script> |
||||||
<script src="js/jquery.disable.text.select.js" type="text/javascript"></script> |
<script src="js/jquery.disable.text.select.js" type="text/javascript"></script> |
||||||
<script src="js/jquery.center.js" type="text/javascript"></script> |
<script src="js/jquery.center.js" type="text/javascript"></script> |
||||||
<script src="js/jquery.ubwidget.js" type="text/javascript"></script> |
<script src="js/jquery.ubwidget.js" type="text/javascript"></script> |
||||||
<script src="js/DD_roundies_0.0.2a.js" type="text/javascript"></script> |
<script src="js/DD_roundies_0.0.2a.js" type="text/javascript"></script> |
||||||
<script src="js/ubw-main.js" type="text/javascript"></script> |
<script src="js/ubw-main.js" type="text/javascript"></script> |
||||||
<script src="js/calculate.js" type="text/javascript"></script> |
<script src="js/calculate.js" type="text/javascript"></script> |
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/ubwidget.css" /> |
<link rel="stylesheet" type="text/css" href="css/ubwidget.css" /> |
||||||
|
|
||||||
</head> |
</head> |
||||||
|
|
||||||
<body> |
<body> |
||||||
|
|
||||||
<script type="text/javascript"> |
<script type="text/javascript"> |
||||||
$(document).ready(function(){ |
$(document).ready(function(){ |
||||||
init(); |
init(); |
||||||
}); |
}); |
||||||
</script> |
</script> |
||||||
|
|
||||||
<div id="ubwidget"></div> |
<div id="ubwidget"></div> |
||||||
|
|
||||||
</body> |
</body> |
||||||
|
|
||||||
</html> |
</html> |
@ -1,231 +1,226 @@ |
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
||||||
"http://www.w3.org/TR/html4/loose.dtd"> |
"http://www.w3.org/TR/html4/loose.dtd"> |
||||||
|
|
||||||
<html> |
<html> |
||||||
|
|
||||||
<head> |
<head> |
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||||||
<title>Video Picker</title> |
<title>Web Browser</title> |
||||||
<link rel="stylesheet" type="text/css" href="css/main.css"> |
<link rel="stylesheet" type="text/css" href="css/main.css"> |
||||||
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script> |
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script> |
||||||
<script src="scripts/jquery.oembed.js" type="text/javascript"></script> |
<!--DEFAULT FR--> |
||||||
<!--DEFAULT FR--> |
</head> |
||||||
</head> |
|
||||||
|
<body> |
||||||
<body> |
<script type="text/javascript"> |
||||||
<script type="text/javascript"> |
|
||||||
|
var loadingState = false; |
||||||
$(document).ready(function(){ |
|
||||||
//var resizer; // Timer |
function changeLoadingState(){ |
||||||
//var resizerIndex; |
loadingState = true; |
||||||
var currentHistory = 0; |
} |
||||||
var references = new Array(); |
|
||||||
var globalWidth = 850; |
$(document).ready(function(){ |
||||||
var globalHeight = 700; |
//var resizer; // Timer |
||||||
var language; |
//var resizerIndex; |
||||||
var url = ""; |
var currentHistory = 0; |
||||||
var margins = { |
var references = new Array(); |
||||||
top: cssToInt($("body").css("margin-top")), |
var globalWidth = 850; |
||||||
right: cssToInt($("body").css("margin-right")), |
var globalHeight = 700; |
||||||
bottom: cssToInt($("body").css("margin-bottom")), |
var language; |
||||||
left: cssToInt($("body").css("margin-left")) |
var url = ""; |
||||||
}; |
var margins = { |
||||||
|
top: cssToInt($("body").css("margin-top")), |
||||||
//resizerIndex = 0; |
right: cssToInt($("body").css("margin-right")), |
||||||
|
bottom: cssToInt($("body").css("margin-bottom")), |
||||||
if(window.sankore){ |
left: cssToInt($("body").css("margin-left")) |
||||||
url = window.sankore.preference("url", ""); |
}; |
||||||
}else{ |
|
||||||
url = ""; |
var resizer; // Timer |
||||||
}; |
var resizerIndex; |
||||||
|
|
||||||
language = navigator.userAgent.split(";"); |
|
||||||
language = language[3].replace(/\s/g, "").substr(0, 2); |
resizerIndex = 0; |
||||||
|
|
||||||
$("#back-button") |
if(window.sankore){ |
||||||
.click(function(){ |
url = window.sankore.preference("url", ""); |
||||||
if((currentHistory - 1) > 0){ |
}else{ |
||||||
$("#textbox").val(references[--currentHistory-1]); |
url = ""; |
||||||
frames['web-content'].location.href = references[currentHistory-1]; |
}; |
||||||
} |
|
||||||
}); |
language = navigator.userAgent.split(";"); |
||||||
|
language = language[3].replace(/\s/g, "").substr(0, 2); |
||||||
$("#forward-button") |
|
||||||
.click(function(){ |
$("#back-button") |
||||||
if(currentHistory < references.length) { |
.click(function(){ |
||||||
$("#textbox").val(references[currentHistory++]); |
loadingState = false; |
||||||
frames['web-content'].location.href = $("#textbox").val(); |
if((currentHistory - 1) > 0){ |
||||||
} |
$("#textbox").val(references[--currentHistory-1]); |
||||||
}); |
$("#search-button").trigger("click"); |
||||||
|
} |
||||||
$("#textbox").keypress(function(e) { |
}); |
||||||
if(e.keyCode == 13) { |
|
||||||
$("#search-button").trigger("click"); |
$("#forward-button") |
||||||
} |
.click(function(){ |
||||||
}); |
loadingState = false; |
||||||
|
if(currentHistory < references.length) { |
||||||
$("#search-button") |
$("#textbox").val(references[currentHistory++]); |
||||||
.click(function(){ |
$("#search-button").trigger("click"); |
||||||
if($("#textbox").val().length > 0){ |
} |
||||||
var url = $("#textbox").val(); |
}); |
||||||
var urlStart = url.split("://"); |
|
||||||
|
$("#textbox").keypress(function(e) { |
||||||
if(urlStart[0]!="http"){ |
if(e.keyCode == 13) { |
||||||
url = "http://" + url; |
$("#search-button").trigger("click"); |
||||||
}; |
} |
||||||
|
}); |
||||||
if(checkURLs(references, url)){ |
|
||||||
if(currentHistory == references.length) |
$("#search-button").click(function(){ |
||||||
references[currentHistory++] = url; |
if($("#textbox").val().length > 0){ |
||||||
else |
loadingState = false; |
||||||
references = insertInto(references, currentHistory++, url); |
var url = $("#textbox").val(); |
||||||
} |
var urlStart = url.split("://"); |
||||||
window.resizeTo(globalWidth, globalHeight); |
|
||||||
|
if(urlStart[0]!="http"){ |
||||||
$("#container") |
url = "http://" + url; |
||||||
.removeClass("welcome") |
}; |
||||||
.removeClass("change") |
|
||||||
.removeClass("error") |
if(checkURLs(references, url)){ |
||||||
.addClass("load"); |
if(currentHistory == references.length) |
||||||
$("#container-shadow").hide(); |
references[currentHistory++] = url; |
||||||
$("#arrow").hide(); |
else |
||||||
$("#embeded-content").hide(); |
references = insertInto(references, currentHistory++, url); |
||||||
$("#web-content").show(); |
} |
||||||
|
window.resizeTo(globalWidth, globalHeight); |
||||||
frames['web-content'].location.href = url; |
|
||||||
|
$("#container").removeClass("welcome").removeClass("change") |
||||||
checkcontent(); |
.removeClass("error").addClass("load"); |
||||||
} else { |
$("#container-shadow").hide(); |
||||||
$("#embeded-content").load("locales/" + "en" + "/howto.html"); // Welcome screen with some explanations |
$("#arrow").hide(); |
||||||
$("#container") |
$("#embeded-content").hide(); |
||||||
.addClass("welcome") |
$("#web-content").show(); |
||||||
.addClass("change") |
$('#web-content').attr('src',url); |
||||||
.addClass("error") |
|
||||||
.removeClass("load"); |
checkcontent(); |
||||||
$("#container-shadow").show(); |
checkLoading(); |
||||||
$("#arrow").show(); |
} else { |
||||||
$("#embeded-content").show(); |
$("#embeded-content").load("locales/" + "en" + "/howto.html"); // Welcome screen with some explanations |
||||||
$("#web-content").hide(); |
$("#container") |
||||||
window.resizeTo(550, 280); |
.addClass("welcome") |
||||||
} |
.addClass("change") |
||||||
}) |
.addClass("error") |
||||||
.mouseenter(function(){ |
.removeClass("load"); |
||||||
$(this) |
$("#container-shadow").show(); |
||||||
.addClass("over"); |
$("#arrow").show(); |
||||||
}) |
$("#embeded-content").show(); |
||||||
.mouseleave(function(){ |
$("#web-content").hide(); |
||||||
$(this) |
window.resizeTo(550, 280); |
||||||
.removeClass("over"); |
} |
||||||
}); |
}) |
||||||
|
.mouseenter(function(){ |
||||||
if(url.length > 0){ |
$(this) |
||||||
$("#textbox").val(url); |
.addClass("over"); |
||||||
$("#search-button").trigger("click"); |
}) |
||||||
}else{ |
.mouseleave(function(){ |
||||||
$("#embeded-content").load("locales/" + "en" + "/howto.html"); // Welcome screen with some explanations |
$(this) |
||||||
}; |
.removeClass("over"); |
||||||
|
}); |
||||||
/*$("#show-inputfield-button") |
|
||||||
.click( |
if(url.length > 0){ |
||||||
function(){ |
$("#textbox").val(url); |
||||||
$("#show-area").hide(); |
$("#search-button").trigger("click"); |
||||||
$("#inputfield").show(); |
}else{ |
||||||
$("#shadow").show(); |
$("#embeded-content").load("locales/" + "en" + "/howto.html"); // Welcome screen with some explanations |
||||||
$("#container") |
}; |
||||||
.removeClass("show") |
|
||||||
.addClass("change"); |
$(window).resize(function(){ |
||||||
adaptWidgetSize(18, 82); |
globalWidth = $(window).width(); |
||||||
}) |
globalHeight = $(window).height(); |
||||||
.mouseenter(function(){ |
$("#web-content") |
||||||
$(this) |
.attr("width", globalWidth - 25) |
||||||
.addClass("over"); |
.attr("height", globalHeight - 90); |
||||||
}) |
}); |
||||||
.mouseleave(function(){ |
|
||||||
$(this) |
function checkcontent(){ |
||||||
.removeClass("over"); |
|
||||||
});*/ |
if(window.sankore){ |
||||||
|
window.sankore.setPreference("url", $("#textbox").val()); |
||||||
$(window).resize(function(){ |
}; |
||||||
globalWidth = $(window).width(); |
|
||||||
globalHeight = $(window).height(); |
$("#embeded-content").hide(); |
||||||
$("#web-content") |
$("#container").removeClass("load").addClass("show"); |
||||||
.attr("width", globalWidth - 25) |
}; |
||||||
.attr("height", globalHeight - 90); |
|
||||||
}); |
function checkLoading(){ |
||||||
|
if(loadingState){ |
||||||
function checkcontent(){ |
|
||||||
//clearTimeout(resizer); |
clearTimeout(resizer); |
||||||
//resizerIndex = 0; |
resizerIndex = 0; |
||||||
|
return false; |
||||||
if(window.sankore){ |
}; |
||||||
window.sankore.setPreference("url", $("#textbox").val()); |
if(resizerIndex > 70){ |
||||||
}; |
resizerIndex = 0; |
||||||
|
$("#textbox").val("http://www.google.com/search?q=" + $("#textbox").val().replace("http://", "")); |
||||||
$("#embeded-content").hide(); |
$("#search-button").trigger("click"); |
||||||
$("#container").removeClass("load").addClass("show"); |
}else{ |
||||||
}; |
resizer = setTimeout(function(){checkLoading()}, 100); |
||||||
|
resizerIndex++; |
||||||
/*function adaptWidgetSize(adjustmentX, adjustmentY){ |
}; |
||||||
var widgetWidth = $("#container").width() + margins.right + margins.left + adjustmentX; |
}; |
||||||
var widgetHeight = $("#container").position().top + $("#container").height() + margins.bottom + adjustmentY; |
|
||||||
|
function cssToInt(cssvalue){ |
||||||
window.resizeTo(widgetWidth, $(window).height()); |
return(parseInt(cssvalue.replace("px", ""))); |
||||||
window.resizeTo($(window).width(), widgetHeight); |
} |
||||||
};*/ |
|
||||||
|
function checkURLs(arr, value){ |
||||||
function cssToInt(cssvalue){ |
for(var i = 0; i < arr.length; i++) |
||||||
return(parseInt(cssvalue.replace("px", ""))); |
if(arr[i] == value) |
||||||
} |
return false; |
||||||
|
return true; |
||||||
function checkURLs(arr, value){ |
} |
||||||
for(var i = 0; i < arr.length; i++) |
|
||||||
if(arr[i] == value) |
function insertInto(arr, index, url){ |
||||||
return false; |
var newArr = new Array(); |
||||||
return true; |
for(var i = 0, j = 0; i < arr.length; i++, j++) |
||||||
} |
if(i == index - 1){ |
||||||
|
newArr[j] = arr[i]; |
||||||
function insertInto(arr, index, url){ |
newArr[++j] = url; |
||||||
var newArr = new Array(); |
} else |
||||||
for(var i = 0, j = 0; i < arr.length; i++, j++) |
newArr[j] = arr[i]; |
||||||
if(i == index - 1){ |
return newArr; |
||||||
newArr[j] = arr[i]; |
} |
||||||
newArr[++j] = url; |
|
||||||
} else |
}); |
||||||
newArr[j] = arr[i]; |
</script> |
||||||
return newArr; |
|
||||||
} |
<div id="ubwidget"> |
||||||
|
<div id="shadow"></div> |
||||||
}); |
|
||||||
</script> |
<div id="inputfield"> |
||||||
|
<div id="back-button" class="button">Previous</div> |
||||||
<div id="ubwidget"> |
<div id="forward-button" class="button">Next</div> |
||||||
<div id="shadow"></div> |
<input id="textbox" type="text"> |
||||||
|
<div id="search-button" class="button">Show</div> |
||||||
<div id="inputfield"> |
</div> |
||||||
<div id="back-button" class="button">Previous</div> |
|
||||||
<div id="forward-button" class="button">Next</div> |
<div id="container" class="welcome"> |
||||||
<input id="textbox" type="text"> |
<div id="arrow"><img src="imgs/arrow.png" alt="arrow-top"></div> |
||||||
<div id="search-button" class="button">Show</div> |
|
||||||
</div> |
<div id="show-container"> |
||||||
|
<div id="embeded-content"></div> |
||||||
<div id="container" class="welcome"> |
<iframe id="web-content" name="web-content" src="" scrolling=auto frameborder=1 onload="changeLoadingState()"></iframe> |
||||||
<div id="arrow"><img src="imgs/arrow.png" alt="arrow-top"></div> |
</div> |
||||||
|
|
||||||
<div id="show-container"> |
<table cellspacing="0" cellpadding="0" id="container-shadow"> |
||||||
<div id="embeded-content"></div> |
<tr> |
||||||
<iframe id="web-content" name="web-content" src="" scrolling=auto frameborder=1 ></iframe> |
<td id="shadow-left"></td> |
||||||
</div> |
<td id="shadow-center"> </td> |
||||||
|
<td id="shadow-right"></td> |
||||||
<table cellspacing="0" cellpadding="0" id="container-shadow"> |
</tr> |
||||||
<tr> |
</table> |
||||||
<td id="shadow-left"></td> |
</div> |
||||||
<td id="shadow-center"> </td> |
|
||||||
<td id="shadow-right"></td> |
</div> |
||||||
</tr> |
</body> |
||||||
</table> |
|
||||||
</div> |
|
||||||
|
|
||||||
</div> |
|
||||||
</body> |
|
||||||
|
|
||||||
</html> |
</html> |
Loading…
Reference in new issue