2009-05-07 20:22:43 +00:00
|
|
|
<!--
|
|
|
|
Speed Dial head template for Midori.
|
|
|
|
Copyright (C) 2009 Jean-François Guchens <zcx000@gmail.com>
|
2011-10-14 17:42:29 +00:00
|
|
|
Copyright (C) 2011 Paweł Forysiuk <tuxator@o2.pl>
|
|
|
|
Copyright (C) 2011 Cassidy James <email@cassidyjames.com>
|
2009-05-07 20:22:43 +00:00
|
|
|
This file is licensed under the terms of the expat license, see the file EXPAT.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<title>{title}</title>
|
|
|
|
<style>
|
2011-10-09 23:38:39 +00:00
|
|
|
* {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
cursor: default;
|
|
|
|
font-size: 13px;
|
|
|
|
color: #4d4d4d;
|
2009-05-13 21:56:55 +00:00
|
|
|
}
|
|
|
|
|
2011-10-09 23:38:39 +00:00
|
|
|
html, body {
|
2009-05-07 20:22:43 +00:00
|
|
|
font-family: sans-serif;
|
2011-10-09 23:38:39 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
outline: 0;
|
2009-05-07 20:22:43 +00:00
|
|
|
}
|
|
|
|
|
2009-05-15 21:47:32 +00:00
|
|
|
#content {
|
2011-10-09 23:38:39 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 95%;
|
|
|
|
margin: 0 auto;
|
|
|
|
padding: 0;
|
2009-05-15 21:47:32 +00:00
|
|
|
}
|
|
|
|
|
2009-05-07 20:22:43 +00:00
|
|
|
div.shortcut {
|
2011-10-09 23:38:39 +00:00
|
|
|
width: 25%;
|
|
|
|
height: 33%;
|
2009-05-07 20:22:43 +00:00
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
2011-10-09 23:38:39 +00:00
|
|
|
div.shortcut .preview {
|
|
|
|
width: 70%;
|
|
|
|
height: 60%;
|
|
|
|
margin: 20% auto;
|
|
|
|
-webkit-box-shadow: 0 1px 6px rgba(0,0,0,.25), 0 0 2px #fff inset;
|
|
|
|
box-shadow: 0 1px 6px rgba(0,0,0,.25), 0 0 2px #fff inset;
|
|
|
|
background-image: -webkit-gradient(
|
|
|
|
linear, center top, center bottom,
|
|
|
|
from(#f6f6f6), to(#e3e3e3));
|
|
|
|
border: 1px solid #bebebe;
|
|
|
|
border-bottom-color: #a0a0a0;
|
2011-10-10 23:52:39 +00:00
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.shortcut .preview img {
|
|
|
|
width: 100%;
|
|
|
|
height: 98%;
|
|
|
|
cursor: pointer;
|
2009-05-07 20:22:43 +00:00
|
|
|
}
|
|
|
|
|
2011-10-09 23:38:39 +00:00
|
|
|
div.shortcut .preview.new .add {
|
2009-05-07 20:22:43 +00:00
|
|
|
display: block;
|
2010-06-01 21:56:04 +00:00
|
|
|
height: 100%;
|
2011-10-09 23:38:39 +00:00
|
|
|
width: 50%;
|
|
|
|
margin: 0 auto;
|
|
|
|
cursor: pointer;
|
2010-06-01 21:56:04 +00:00
|
|
|
}
|
|
|
|
|
2011-10-09 23:38:39 +00:00
|
|
|
.title {
|
|
|
|
text-align: center;
|
|
|
|
margin-top: -12%;
|
2011-03-22 21:59:56 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2009-05-09 14:41:01 +00:00
|
|
|
cursor: text;
|
2010-05-16 15:56:22 +00:00
|
|
|
}
|
|
|
|
|
2011-10-09 23:38:39 +00:00
|
|
|
.cross {
|
|
|
|
display: block;
|
|
|
|
width: 27px;
|
|
|
|
height: 27px;
|
|
|
|
top: -14px;
|
2011-10-12 23:40:39 +00:00
|
|
|
right: -14px;
|
2011-10-09 23:38:39 +00:00
|
|
|
background: url(res://close.png);
|
2011-10-10 23:52:39 +00:00
|
|
|
position: absolute;
|
2010-05-16 15:56:22 +00:00
|
|
|
cursor: pointer;
|
2011-10-10 23:52:39 +00:00
|
|
|
visibility: hidden;
|
|
|
|
opacity: 0;
|
|
|
|
-webkit-transition: opacity 0.15s;
|
|
|
|
}
|
|
|
|
|
2011-10-14 17:42:29 +00:00
|
|
|
div.shortcut .preview:hover .cross {
|
2011-10-10 23:52:39 +00:00
|
|
|
visibility: visible;
|
|
|
|
opacity: 1;
|
|
|
|
-webkit-transition-delay: 0.5s;
|
2010-05-16 15:56:22 +00:00
|
|
|
}
|
2010-06-01 21:56:04 +00:00
|
|
|
|
2011-10-09 23:38:39 +00:00
|
|
|
.box.added {
|
|
|
|
display:none;
|
2010-06-01 21:56:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
div.osd {
|
|
|
|
top: 9px;
|
|
|
|
position: fixed;
|
|
|
|
width: 100%;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.osd span {
|
|
|
|
border: 1px solid #999;
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
padding: 8px;
|
|
|
|
color: #999;
|
|
|
|
-webkit-border-bottom-left-radius: 10px;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2009-05-07 20:22:43 +00:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2009-05-13 21:56:55 +00:00
|
|
|
|
2009-05-07 20:22:43 +00:00
|
|
|
var getAction = function (id)
|
|
|
|
{
|
2011-10-09 23:38:39 +00:00
|
|
|
var host = document.getElementById(id).childNodes[0].childNodes[0].host;
|
2011-09-06 20:50:20 +00:00
|
|
|
if (host)
|
2009-05-07 20:22:43 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
var url = prompt ("{enter_shortcut_address}", "http://");
|
|
|
|
if (!url) return false;
|
2010-06-06 21:29:08 +00:00
|
|
|
if (url.indexOf ("://") == -1)
|
|
|
|
url = "http://" + url;
|
2009-05-07 20:22:43 +00:00
|
|
|
|
2011-10-10 23:53:12 +00:00
|
|
|
console.log ("speed_dial-save-add " + id + " " + url + " ");
|
2009-05-07 20:22:43 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2009-05-13 21:56:55 +00:00
|
|
|
var renameShortcut = function (id)
|
2009-05-09 14:41:01 +00:00
|
|
|
{
|
2011-10-09 23:38:39 +00:00
|
|
|
var old_name = document.getElementById(id).childNodes[1].textContent;
|
2009-05-13 21:56:55 +00:00
|
|
|
|
2011-09-06 20:50:20 +00:00
|
|
|
var name = prompt ("{enter_shortcut_name}", old_name);
|
|
|
|
if (!name) return;
|
2009-05-09 21:29:35 +00:00
|
|
|
|
2011-03-22 21:59:56 +00:00
|
|
|
console.log ("speed_dial-save-rename " + id + " " + name);
|
2009-05-09 14:41:01 +00:00
|
|
|
}
|
2009-05-07 20:22:43 +00:00
|
|
|
|
|
|
|
var clearShortcut = function (id)
|
|
|
|
{
|
|
|
|
if(!confirm("{are_you_sure}"))
|
|
|
|
return;
|
|
|
|
|
2011-03-22 21:59:56 +00:00
|
|
|
console.log ("speed_dial-save-delete " + id);
|
2009-05-09 21:29:35 +00:00
|
|
|
}
|
|
|
|
|
2010-06-01 21:56:04 +00:00
|
|
|
var key_id = 's';
|
|
|
|
var key_timeout;
|
|
|
|
|
2010-05-14 20:59:21 +00:00
|
|
|
document.onkeypress = function ()
|
|
|
|
{
|
2010-06-01 21:56:04 +00:00
|
|
|
key_id = key_id + String.fromCharCode (event.which);
|
2010-05-14 20:59:21 +00:00
|
|
|
|
2010-06-01 21:56:04 +00:00
|
|
|
clearTimeout (key_timeout);
|
|
|
|
|
2011-09-06 20:50:20 +00:00
|
|
|
document.getElementById('dialing').innerText = key_id.substr(1);
|
|
|
|
document.getElementById('dialing').style.visibility = 'visible';
|
2010-06-01 21:56:04 +00:00
|
|
|
|
2011-09-06 20:50:20 +00:00
|
|
|
var div = document.getElementById(key_id);
|
|
|
|
if (div)
|
2010-05-14 20:59:21 +00:00
|
|
|
{
|
2011-04-03 22:15:58 +00:00
|
|
|
if (key_id.substr(1) > 9)
|
2010-06-01 21:56:04 +00:00
|
|
|
{
|
|
|
|
if (getAction (key_id))
|
2011-10-09 23:38:39 +00:00
|
|
|
document.location = div.childNodes[0].childNodes[0].href;
|
2010-06-01 21:56:04 +00:00
|
|
|
key_id = 's';
|
|
|
|
}
|
|
|
|
else
|
2011-10-09 23:38:39 +00:00
|
|
|
key_timeout = setTimeout ('if (getAction (key_id)) document.location = document.getElementById(key_id).childNodes[0].childNodes[0].href; key_id = \'s\'', 1000);
|
2010-05-14 20:59:21 +00:00
|
|
|
}
|
2010-06-01 21:56:04 +00:00
|
|
|
else
|
|
|
|
key_id = 's';
|
|
|
|
|
|
|
|
if (key_id.length <= 1)
|
2011-09-06 20:50:20 +00:00
|
|
|
document.getElementById('dialing').style.visibility = 'hidden';
|
2010-05-14 20:59:21 +00:00
|
|
|
|
2010-06-01 21:56:04 +00:00
|
|
|
return false;
|
2010-05-14 20:59:21 +00:00
|
|
|
}
|
|
|
|
|
2009-05-08 00:56:26 +00:00
|
|
|
</script>
|
2009-05-07 20:22:43 +00:00
|
|
|
</head>
|
2009-05-09 21:29:35 +00:00
|
|
|
<body>
|
2010-06-01 21:56:04 +00:00
|
|
|
<div class="osd" >
|
|
|
|
<span id="dialing"></span>
|
|
|
|
</div>
|
2011-10-09 23:38:39 +00:00
|
|
|
<div id="content">
|