29.06.2014, 14:40
iOS 7 Lockscreen Weather
Zitat:/*****appIcon*****/
#mail {
position:absolute;
top:390px;
left:130px;
width:80px;
height:80px;
background-image:url(../image/mail.png);
background-size:80px 80px;
}
#mailCount {}
#sms {
position:absolute;
top:390px;
left:210px;
width:80px;
height:80px;
background-image:url(../image/sms.png);
background-size:80px 80px;}
#smsCount {}
#phone {
position:absolute;
top:390px;
left:50px;
width:80px;
height:80px;
background-image:url(../image/phone.png);
background-size:80px 80px;}
#phoneCount {}
.count{
position:absolute;
top:43px;
left:2px;
width:60px;
font-size:14px;
font-weight:bold;
text-align:center;}
Zitat:<div id="mail" onclick="openApp(event)"><div id="mailCount" class="count">mail</div></div>
<div id="phone" onclick="openApp(event)"><div id="phoneCount" class="count">phone</div></div>
<div id="sms" onclick="openApp(event)"><div id="smsCount" class="count">sms</div></div>
<script type="text/cycript">//get badges
try {
//Run some code here
var sms = SBIconController.sharedInstance.model.leafIconsByIdentifier["com.apple.MobileSMS"].badgeValue;
var email = SBIconController.sharedInstance.model.leafIconsByIdentifier["com.apple.mobilemail"].badgeValue;
var phones = SBIconController.sharedInstance.model.leafIconsByIdentifier["com.apple.mobilephone"].badgeValue;
} catch (err) {}
if (sms > 0) document.getElementById("smsCount").innerHTML = sms;
else document.getElementById("smsCount").innerHTML = "<font color=#eeeeee>--</font>";
if (email > 0) document.getElementById("mailCount").innerHTML = email;
else document.getElementById("mailCount").innerHTML = "<font color=#eeeeee>--</font>";
if (phones > 0) document.getElementById("phoneCount").innerHTML = phones;
else document.getElementById("phoneCount").innerHTML = "<font color=#eeeeee>--</font>";
function openapp(bundle){
[^void(){[[UIApplication sharedApplication] launchApplicationWithIdentifier:@""+bundle suspended:NO];}
performSelectorOnMainThread: @selector(invoke) withObject: nil waitUntilDone: NO]
}
function openApp(event){
var element = event.currentTarget;
if(element.id=="mail")openapp("com.apple.mobilemail");
if(element.id=="sms")openapp("com.apple.MobileSMS");
if(element.id=="phone")openapp("com.apple.mobilephone");
}
</script>
(29.06.2014, 16:18)Captori schrieb: Habe es jetzt einige Stunden Laufen gelassen und muss sagen, der Akkuverbrauch bei mir ist immens. Ist bei Uniaw Widgets ja leider keine Seltenheit.