replaced all important links with javascript links, thus effectively enabling the
app to be a true offline app.
This commit is contained in:
parent
28670a66bb
commit
a5599242f6
2 changed files with 14 additions and 21 deletions
23
index.html
23
index.html
|
@ -43,29 +43,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<script type="text/javascript" src="js/uhr-fr.js"></script>
|
||||
<script type="text/javascript" src="js/uhr-it.js"></script>
|
||||
<script type="text/javascript">
|
||||
(function(doc, nav, standalone) {
|
||||
if ((standalone in nav) && nav[standalone]) {
|
||||
var curnode;
|
||||
var loc = doc.location;
|
||||
var stop = /^(a|html)$/i;
|
||||
doc.addEventListener('click', function(e) {
|
||||
curnode = e.target;
|
||||
while (!(stop).test(curnode.nodeName)) {
|
||||
curnode = curnode.parentNode;
|
||||
}
|
||||
if ('href' in curnode && (curnode.href.indexOf('http') || ~curnode.href.indexOf(location.host))) {
|
||||
e.preventDefault();
|
||||
location.href=curnode.href;
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
}(document, window.navigator, 'standalone'));
|
||||
function go(url) {
|
||||
window.location = url;
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding:0;margin:0;">
|
||||
<div id="uhr"></div>
|
||||
<p id="disclaimer">Created by <a href="http://www.fritteli.ch/">fritteli</a>, inspired by <a href="http://www.qlocktwo.com/">QLOCKTWO</a>. <a
|
||||
href="info/">Read more!</a> - <a href="showcase">View full showcase!</a></p>
|
||||
onclick="go('info/')" href="#">Read more!</a> - <a href="showcase">View full showcase!</a></p>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var width = $(window).width();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue