|
|
@ -1,4 +1,3 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> |
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> |
|
|
|
<head> |
|
|
|
<head> |
|
|
@ -13,7 +12,8 @@ |
|
|
|
<script type="text/javascript" src="script/superfish.js"></script> |
|
|
|
<script type="text/javascript" src="script/superfish.js"></script> |
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var popupFlag = false; |
|
|
|
var browsing = false; |
|
|
|
var browsing = false; |
|
|
|
var mode = 'wiki'; |
|
|
|
var mode = 'wiki'; |
|
|
|
var lang = 'en'; |
|
|
|
var lang = 'en'; |
|
|
@ -38,25 +38,27 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
index:-1 |
|
|
|
index:-1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() { |
|
|
|
$(document).ready(function() { |
|
|
|
|
|
|
|
|
|
|
|
var ubHistoryList = ""; |
|
|
|
var ubHistoryList = ""; |
|
|
|
var ubHistoryIndex = ""; |
|
|
|
var ubHistoryIndex = ""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var popupText = $("<div id='popupWordInfo' class='popupWordInfo'></div>").appendTo("body"); |
|
|
|
|
|
|
|
|
|
|
|
lang = navigator.userAgent.split(";"); |
|
|
|
lang = navigator.userAgent.split(";"); |
|
|
|
|
|
|
|
|
|
|
|
lang = (navigator.language || navigator.systemLanguage || |
|
|
|
lang = (navigator.language || navigator.systemLanguage || |
|
|
|
navigator.userLanguage || 'en').substr(0, 2).toLowerCase(); |
|
|
|
navigator.userLanguage || 'en').substr(0, 2).toLowerCase(); |
|
|
|
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); |
|
|
|
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); |
|
|
|
|
|
|
|
|
|
|
|
if(window.sankore){ |
|
|
|
if(window.sankore){ |
|
|
|
toolbar.state = loadPref("historyState", "begin"); |
|
|
|
toolbar.state = loadPref("historyState", "begin"); |
|
|
|
ubHistoryList = loadPref("historyList", ""); |
|
|
|
ubHistoryList = loadPref("historyList", ""); |
|
|
|
ubHistoryIndex = loadPref("historyIndex", "-1"); |
|
|
|
ubHistoryIndex = loadPref("historyIndex", "-1"); |
|
|
|
//window.resizeTo(350, 450); |
|
|
|
//window.resizeTo(350, 450); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(ubHistoryList !== "") { |
|
|
|
if(ubHistoryList !== "") { |
|
|
|
appHistory.list = ubHistoryList.split(","); |
|
|
|
appHistory.list = ubHistoryList.split(","); |
|
|
|
appHistory.index = parseInt(ubHistoryIndex); |
|
|
|
appHistory.index = parseInt(ubHistoryIndex); |
|
|
@ -64,22 +66,22 @@ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
wikiReq(""); |
|
|
|
wikiReq(""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$(window).resize(); |
|
|
|
$(window).resize(); |
|
|
|
|
|
|
|
|
|
|
|
$("#languages-dropdown>li>ul>li").each(function(){ |
|
|
|
$("#languages-dropdown>li>ul>li").each(function(){ |
|
|
|
$(this).click(function(){ |
|
|
|
$(this).click(function(){ |
|
|
|
languagesHandler($(this).text()); |
|
|
|
languagesHandler($(this).text()); |
|
|
|
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); |
|
|
|
$("#current-language").text(lang.charAt(0).toUpperCase() + lang.substr(1)); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("#languages-dropdown").superfish({ |
|
|
|
$("#languages-dropdown").superfish({ |
|
|
|
dropShadows:false, |
|
|
|
dropShadows:false, |
|
|
|
speed:1, |
|
|
|
speed:1, |
|
|
|
delay:100 |
|
|
|
delay:100 |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("#url") |
|
|
|
$("#url") |
|
|
|
.change(function(){ |
|
|
|
.change(function(){ |
|
|
|
if(!toolbar.loading){ |
|
|
|
if(!toolbar.loading){ |
|
|
@ -92,26 +94,76 @@ |
|
|
|
$("#url").change(); |
|
|
|
$("#url").change(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("#url").val(appHistory.list[appHistory.index]); |
|
|
|
$("#url").val(appHistory.list[appHistory.index]); |
|
|
|
|
|
|
|
|
|
|
|
if($("#url").val().length > 0) |
|
|
|
if($("#url").val().length > 0) |
|
|
|
$("#url").change(); |
|
|
|
$("#url").change(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-search").click(function(){ |
|
|
|
|
|
|
|
$("#url").trigger("change"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-search").mouseover(function(evt){ |
|
|
|
|
|
|
|
popupFlag = true; |
|
|
|
|
|
|
|
popupText.text("Search") |
|
|
|
|
|
|
|
.css("top", evt.pageY + 5) |
|
|
|
|
|
|
|
.css("left", evt.pageX + 13) |
|
|
|
|
|
|
|
.css({width:"70px"}) |
|
|
|
|
|
|
|
.show("fast", function(){ |
|
|
|
|
|
|
|
if(!popupFlag) |
|
|
|
|
|
|
|
popupText.hide(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-search, #toolbar-button-back, #toolbar-button-forward").mousemove(function(evt){ |
|
|
|
|
|
|
|
popupText.css("top", evt.pageY + 5) |
|
|
|
|
|
|
|
.css("left", evt.pageX + 13); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-search, #toolbar-button-back, #toolbar-button-forward").mouseout(function(evt){ |
|
|
|
|
|
|
|
popupFlag = false; |
|
|
|
|
|
|
|
popupText.hide(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-back").click(function(){ |
|
|
|
$("#toolbar-button-back").click(function(){ |
|
|
|
browsing = true; |
|
|
|
browsing = true; |
|
|
|
appHistory.back(); |
|
|
|
appHistory.back(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-back").mouseover(function(evt){ |
|
|
|
|
|
|
|
popupFlag = true; |
|
|
|
|
|
|
|
popupText.text("Previous word") |
|
|
|
|
|
|
|
.css("top", evt.pageY + 5) |
|
|
|
|
|
|
|
.css("left", evt.pageX + 13) |
|
|
|
|
|
|
|
.css({width:"100px"}) |
|
|
|
|
|
|
|
.show("fast", function(){ |
|
|
|
|
|
|
|
if(!popupFlag) |
|
|
|
|
|
|
|
popupText.hide(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-forward").click(function(){ |
|
|
|
$("#toolbar-button-forward").click(function(){ |
|
|
|
browsing = true; |
|
|
|
browsing = true; |
|
|
|
appHistory.forward(); |
|
|
|
appHistory.forward(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-forward").mouseover(function(evt){ |
|
|
|
|
|
|
|
popupFlag = true; |
|
|
|
|
|
|
|
popupText.text("Next word") |
|
|
|
|
|
|
|
.css("top", evt.pageY + 5) |
|
|
|
|
|
|
|
.css("left", evt.pageX + 13) |
|
|
|
|
|
|
|
.css({width:"70px"}) |
|
|
|
|
|
|
|
.show("fast", function(){ |
|
|
|
|
|
|
|
if(!popupFlag) |
|
|
|
|
|
|
|
popupText.hide(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$("#toolbar-button-home").click(function(){ |
|
|
|
$("#toolbar-button-home").click(function(){ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$(window).resize(function(){ |
|
|
|
$(window).resize(function(){ |
|
|
|
|
|
|
|
|
|
|
|
if($(window).width() < 300){ |
|
|
|
if($(window).width() < 300){ |
|
|
@ -121,15 +173,15 @@ |
|
|
|
$("#web-browser").width($(window).width() - 2); |
|
|
|
$("#web-browser").width($(window).width() - 2); |
|
|
|
} else |
|
|
|
} else |
|
|
|
$("#web-browser").height($(window).height() - $("#toolbar").height() - 2); |
|
|
|
$("#web-browser").height($(window).height() - $("#toolbar").height() - 2); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function wikiReq(kword){ |
|
|
|
function wikiReq(kword){ |
|
|
|
|
|
|
|
|
|
|
|
var textBoxInput = ""; |
|
|
|
var textBoxInput = ""; |
|
|
|
|
|
|
|
|
|
|
|
textBoxInput = remacc(kword.replace(/ /g,'_')); |
|
|
|
textBoxInput = remacc(kword.replace(/ /g,'_')); |
|
|
|
|
|
|
|
|
|
|
|
textBoxInput = textBoxInput.replace(textBoxInput.charAt(0),textBoxInput.charAt(0).toLowerCase()); |
|
|
|
textBoxInput = textBoxInput.replace(textBoxInput.charAt(0),textBoxInput.charAt(0).toLowerCase()); |
|
|
|
if(toolbar.state == "begin"){ |
|
|
|
if(toolbar.state == "begin"){ |
|
|
|
$('#web-browser').attr('src',""); |
|
|
|
$('#web-browser').attr('src',""); |
|
|
@ -141,25 +193,25 @@ |
|
|
|
$('#toolbar-button-search').css("background-image", "url(images/toolbarLoading.jpg)"); |
|
|
|
$('#toolbar-button-search').css("background-image", "url(images/toolbarLoading.jpg)"); |
|
|
|
toolbar.loading = true; |
|
|
|
toolbar.loading = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function hideLoading(){ |
|
|
|
function hideLoading(){ |
|
|
|
$('#toolbar-button-search').css("background-image", "url(images/toolbarButtonSearch.png)"); |
|
|
|
$('#toolbar-button-search').css("background-image", "url(images/toolbarButtonSearch.png)"); |
|
|
|
toolbar.loading = false; |
|
|
|
toolbar.loading = false; |
|
|
|
|
|
|
|
|
|
|
|
// History |
|
|
|
// History |
|
|
|
if(appHistory.list[appHistory.index] !== $("#url").val() && !browsing && $("#url").val().length > 0){ |
|
|
|
if(appHistory.list[appHistory.index] !== $("#url").val() && !browsing && $("#url").val().length > 0){ |
|
|
|
appHistory.list = appHistory.list.slice(0, appHistory.index+1); |
|
|
|
appHistory.list = appHistory.list.slice(0, appHistory.index+1); |
|
|
|
appHistory.list[appHistory.index+1] = $("#url").val(); |
|
|
|
appHistory.list[appHistory.index+1] = $("#url").val(); |
|
|
|
appHistory.index = appHistory.list.length-1; |
|
|
|
appHistory.index = appHistory.list.length-1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(window.sankore && $("#web-browser").attr("src") !== ""){ |
|
|
|
if(window.sankore && $("#web-browser").attr("src") !== ""){ |
|
|
|
savePref("historyState", "started"); |
|
|
|
savePref("historyState", "started"); |
|
|
|
savePref("historyList", appHistory.list.toString()); |
|
|
|
savePref("historyList", appHistory.list.toString()); |
|
|
|
savePref("historyIndex", appHistory.index) |
|
|
|
savePref("historyIndex", appHistory.index) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String.prototype.accnt = function(){ |
|
|
|
String.prototype.accnt = function(){ |
|
|
|
var cnt = 0; |
|
|
|
var cnt = 0; |
|
|
|
var acnt = this; |
|
|
|
var acnt = this; |
|
|
@ -171,7 +223,7 @@ |
|
|
|
cnt++; |
|
|
|
cnt++; |
|
|
|
return cnt; |
|
|
|
return cnt; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String.prototype.renlacc = function(){ |
|
|
|
String.prototype.renlacc = function(){ |
|
|
|
var torem = this; |
|
|
|
var torem = this; |
|
|
|
torem = torem.split(''); |
|
|
|
torem = torem.split(''); |
|
|
@ -188,9 +240,9 @@ |
|
|
|
document.title = toascout; |
|
|
|
document.title = toascout; |
|
|
|
return toascout; |
|
|
|
return toascout; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function remacc(kword){ |
|
|
|
function remacc(kword){ |
|
|
|
|
|
|
|
|
|
|
|
var countarr = new Array(); |
|
|
|
var countarr = new Array(); |
|
|
|
var c = ''; |
|
|
|
var c = ''; |
|
|
|
var text=kword; |
|
|
|
var text=kword; |
|
|
@ -205,21 +257,21 @@ |
|
|
|
textout = textout.join('\n'); |
|
|
|
textout = textout.join('\n'); |
|
|
|
return textout; |
|
|
|
return textout; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function loadPref(name, defaultValue){ |
|
|
|
function loadPref(name, defaultValue){ |
|
|
|
var pref = defaultValue; |
|
|
|
var pref = defaultValue; |
|
|
|
|
|
|
|
|
|
|
|
if (sankore.preference(name) !== "") { |
|
|
|
if (sankore.preference(name) !== "") { |
|
|
|
pref = sankore.preference(name); |
|
|
|
pref = sankore.preference(name); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return pref; |
|
|
|
return pref; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function savePref(name, value){ |
|
|
|
function savePref(name, value){ |
|
|
|
sankore.setPreference(name, String(value)); |
|
|
|
sankore.setPreference(name, String(value)); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function languagesHandler(language){ |
|
|
|
function languagesHandler(language){ |
|
|
|
switch(language){ |
|
|
|
switch(language){ |
|
|
|
case "Deutsch": |
|
|
|
case "Deutsch": |
|
|
@ -254,7 +306,7 @@ |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
</head> |
|
|
|
</head> |
|
|
|
<body style="overflow:hidden; margin: 0px; width:100%; height:100%; position:absolute; background:#ffffff"> |
|
|
|
<body style="overflow:hidden; margin: 0px; width:100%; height:100%; position:absolute; background:#ffffff"> |
|
|
@ -278,9 +330,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="center-field" class="full"> |
|
|
|
<div id="center-field" class="full"> |
|
|
|
<input type="text" id="url" alt="url"/> |
|
|
|
<input type="text" id="url" alt="url"/> |
|
|
|
<div class="on-the-right"> |
|
|
|
<div class="on-the-right"> |
|
|
|
<div id="toolbar-button-search"></div> |
|
|
|
<div id="toolbar-button-search"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> <!--center-field--> |
|
|
|
</div> <!--center-field--> |
|
|
|
<div id="right-field"> |
|
|
|
<div id="right-field"> |
|
|
|
<div id="toolbar-button-languages" class="button" alt="languages button"> |
|
|
|
<div id="toolbar-button-languages" class="button" alt="languages button"> |
|
|
|