Page 3 of 10 FirstFirst 12345 ... LastLast
Results 41 to 60 of 193

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Free Cydgets

  1. #41
    Quote Originally Posted by V3RSAC3PYTHON View Post
    Hey june, how to get the time not to have zero if <9 ? I see code just cant figure out how to put it lol
    Explained on the previous page.

  2. #42
    Livin the iPhone Life V3RSAC3PYTHON's Avatar
    Join Date
    Jan 2015
    Location
    North Mississippi
    Posts
    1,059
    Thanks
    938
    Thanked 642 Times in 403 Posts

    Ugh im horrible at this

  3. #43

  4. The Following User Says Thank You to June'sIphone For This Useful Post:

    Doesel (2015-01-17)

  5. #44
    That's it 7 days of free Cydgets. If you have any questions or want explanation on anything I did, don't be afraid to ask.

    All 7 days are listed here : 7 Free Lockscreens from the Cydget Challenge and in the first post.

  6. The Following 3 Users Say Thank You to June'sIphone For This Useful Post:

    Doesel (2015-01-17), map1978 (2015-01-17), metaserph (2015-01-17)

  7. #45
    What's Jailbreak?
    Join Date
    Feb 2013
    Location
    Pollock Pines, CA, USA
    Posts
    13
    Thanks
    4
    Thanked 6 Times in 6 Posts

    June, you rock! These are awesome and thank you for sharing them.

    One question: I'm using Sensa and it's showing time in 12-hour format. I tried setting
    var TwentyFour = false; //change to 24hr
    to true and false. It doesn't seem to affect the time one way or the other. Is it possible to get it to display time in 24-hour format? If so, what am I doing wrong? Thanks!
    Last edited by vectornut; 2015-01-17 at 05:57 AM.

  8. #46
    Quote Originally Posted by vectornut View Post
    June, you rock! These are awesome and thank you for sharing them.

    One question: I'm using Sensa and it's showing time in 12-hour format. I tried setting

    to true and false. It doesn't seem to affect the time one way or the other. Is it possible to get it to display time in 24-hour format? If so, what am I doing wrong? Thanks!
    Thanks! For the Sensa Cydget a piece of code needs removed.

    Quote Originally Posted by June'sIphone View Post
    This needs removed.
    Code:
    var TwentyFour = localStorage.getItem('TwentyFourSwitch');

  9. #47
    Livin the iPhone Life V3RSAC3PYTHON's Avatar
    Join Date
    Jan 2015
    Location
    North Mississippi
    Posts
    1,059
    Thanks
    938
    Thanked 642 Times in 403 Posts

    June on day 6, what would i edit to make the blue weather icon and the blue toggle to match zen 8 ?

  10. #48
    Quote Originally Posted by V3RSAC3PYTHON View Post
    June on day 6, what would i edit to make the blue weather icon and the blue toggle to match zen 8 ?
    Replace the images.

  11. #49
    I need help making my hour clock bold, please help-img_0266.png

  12. #50
    Quote Originally Posted by IONTechCentral View Post
    I need help making my hour clock bold, please help-img_0266.png
    Take a look at the Nexus Time Cydget. You will see a code much like this.

    Code:
    <div class="clock"><b id="hour"></b><span id="min"></span></div>
    The <b> tag in html will show the item inside the <b> tag BOLD. The b tag according to the HTML5 spec has been depreciated, but most browsers (including Safari) will still use it correctly. Another way you could achieve this is by setting a font-weight via css.

    Example
    Code:
    #hour{
    font-weight:bold;
    }
    The font-weight css can include normal, bold, bolder, lighter or a number. Numbers for font weight go from 100 to 900, 100 being the lightest and 900 being the most thick.

  13. #51
    I almost had it but it keeps doing something else. If you wouldn't mind editing the code to make it bold, oh god I'm be thankful .


    <html>
    <head>
    <body background='test2.jpg'>
    <style>
    body {
    background: # url("test.jpg") no-repeat left top;
    margin-left: 200px
    }
    </style>
    <title>Bold Hour Cydget</title>
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300it' rel='stylesheet' type='text/css'>
    <meta name="viewport" content="width=640, height=1136, initial-scale=1, maximum-scale=1, user-scalable=no">
    <style>
    body{
    color: black;
    font-family: 'Roboto';
    font-weight: 300;
    text-transform: ;
    }
    #test{
    position: absolute;
    left:0px;
    top:0px;
    }
    #time{
    position: absolute;
    left:0px;
    top: 4px;
    width: 320px;
    font-weight: lighter;
    text-align: center;
    font-size: 85px;
    }
    .clock{
    top:4px;
    left:0px;
    width: 320px;
    text-align: center;
    }
    .clock{
    font-size: 430%;
    font-weight: 100;
    }
    .clock{
    font-weight: 540;
    }
    #date{
    position: absolute;
    left:0px;
    top:96px;
    width: 320px;
    text-align: center;
    font-size: 14px;
    }
    #hour{
    font-weight: bold;
    }
    .timedate{
    position: absolute;
    left: 0px;
    top:30px;
    }
    #temp{
    position: absolute;
    left: 0px;
    top: 100px;
    }
    .set{
    position: absolute;
    margin-left:-13px;
    margin-top:-10px;
    }


    </style>
    </head>
    <body>
    <div></div>
    </head>
    <body onload="init();">
    <!--<img src="test.jpg" id="test" width="320"/>--> <!--only used to test-->

    <div id="pagewrap">
    <div class="timedate">
    <div class="clock"><b id="hour"></b><span id="min"></span></div>
    <div id="time"></div>
    <div id="hour"></div>
    <div id="date"></div>
    </div>
    <script type="text/javascript" src="http://modmyi.com/cstats/index.php?package=com.modmyi.circlecydget&output=t ext"></script>
    <script type="text/javascript">
    var TwentyFour = false;

    var days=["Sun","Mon","Tue","Wed","Thur","Fri","Sat"];
    var month=["January","February","March","April","May","June", "July","August","September","October","November"," December"];

    getEL = function(el){
    return document.getElementById(el);
    }

    getDates = function(){
    var date, day, datetoday, monthnum;
    date = new Date();
    day = date.getDay();
    datetoday = date.getDate();
    monthnum = date.getMonth();
    getEL('date').innerHTML = days[day]+", "+month[monthnum]+ " " +datetoday;
    }
    getTimes = function(){
    var datTime, hours, minutes;
    datTime = new Date();
    hours = datTime.getHours();
    minutes = datTime.getMinutes();
    if( minutes <= 9){
    minutes = "0" + minutes; //pad minutes with a zero
    }
    if (TwentyFour!=true){
    hours = ((hours + 11) % 12 + 1);
    }
    if(hours<=12){ hours = "" + hours;} //pad hours if single digit
    getEL('time').innerHTML = hours + ":" + minutes;

    }


    init = function(){
    getDates();
    getTimes();
    }

    setInterval (function(){ //update date
    getDates();
    }, 1800000);
    setInterval (function(){ //update time
    getTimes();
    }, 20000);

    var width = window.innerWidth; //size per device.
    if(width === 375){
    viewport = document.querySelector("meta[name=viewport]");
    viewport.setAttribute('content', 'width=device-width, initial-scale=1.18, maximum-scale=1.18, user-scalable=0');
    }
    else if(width === 414){
    viewport = document.querySelector("meta[name=viewport]");
    viewport.setAttribute('content', 'width=device-width, initial-scale=1.3, maximum-scale=1.3, user-scalable=0');
    }
    else{}
    </script>

    </script>
    </body>
    </html>

  14. #52
    Quote Originally Posted by IONTechCentral View Post
    I almost had it but it keeps doing something else. If you wouldn't mind editing the code to make it bold, oh god I'm be thankful .

    /*bunch of code*/
    Code:
    <div id="pagewrap">
    <div class="timedate">
    <div class="clock"><b id="hour"></b><span id="min"></span></div>
    <div id="time"></div>
    <div id="hour"></div>
    <div id="date"></div>
    </div>
    HTML
    The class <div class="timedate"> does not have a closing tag </div> and I don't see where a timedate class is needed in this code.

    Hour id is declared twice, which a div id name can only be used once in the entire html. You cannot have two items with the id of "hour".

    There is a time div but it is not needed. As you want the time to go to #hour and #min.

    JAVASCRIPT
    Code:
    getTimes = function(){
    var datTime, hours, minutes;
    datTime = new Date();
    hours = datTime.getHours();
    minutes = datTime.getMinutes();
    if( minutes <= 9){
    minutes = "0" + minutes; //pad minutes with a zero
    }
    if (TwentyFour!=true){
    hours = ((hours + 11) % 12 + 1);
    }
    if(hours<=12){ hours = "" + hours;} //pad hours if single digit
    getEL('time').innerHTML = hours + ":" + minutes;
    
    }
    The javascript is what gets the current time. At the end of this function it has getEL('time').innerHTML = hours + ":" + minutes; which if you look at what getEL does it returns a document element.

    Code:
    getEL = function(el){
    return document.getElementById(el);
    }
    In this case you are getting the element with the id of time and giving the innerHTML the value of hours + ":" + minutes;

    innerHTML will put contents inside the div tag. Basically what your code is doing is getting the time div and entering the hours and mintues to it. This is not what you want as you want the javascript to put the hour in the hour id and the minutes in the minute id.

    To do this you would put something like this

    Code:
    getEL('hour').innerHTML = hours;
    getEL('min').innerHTML = ":"+minutes;

    Further in the code you have this.
    Code:
    <script type="text/javascript" src="http://modmyi.com/cstats/index.php?package=com.modmyi.circlecydget&output=t ext"></script>
    Not sure what it is, but most likely not needed.

    Code:
    </head>
    <body>
    <div></div>
    </head>
    There is no need for two head and two body tags in the html. Only one is needed.

    Also you have a </script> tag at the end that isn't closing anything.

    I provided some videos in the first post. I think it will help you understand html and javascript a bit more.
    Last edited by June'sIphone; 2015-01-18 at 10:12 PM.

  15. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    metaserph (2015-01-18), rasputin007 (2015-01-19)

  16. #53
    I am stuck at this for hours and would need your help.
    I am using the cycript code from your blog
    Code:
    var settings = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.myo.wug.plist"];
    when using
    Code:
    document.write(settings)
    I can see the content of that plist file, it is like an array of key-value pairs, e.g
    Code:
    {"alert"=0;"astro"=1;"language"=LI;}
    but somehow I can not get any further. I want to assign the value to a javascript variable, for example
    Code:
    var myAlert =      //that should be 0
    var myAstro=      //that should be 1
    var myLanguage =     //that should be LI
    Any idea how to get the info out of "settings"?
    Nothing is impossible only miracles take a bit longer!

  17. #54
    Quote Originally Posted by rasputin007 View Post
    I am stuck at this for hours and would need your help.
    I am using the cycript code from your blog
    Code:
    var settings = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.myo.wug.plist"];
    when using
    Code:
    document.write(settings)
    I can see the content of that plist file, it is like an array of key-value pairs, e.g
    Code:
    {"alert"=0;"astro"=1;"language"=LI;}
    but somehow I can not get any further. I want to assign the value to a javascript variable, for example
    Code:
    var myAlert =      //that should be 0
    var myAstro=      //that should be 1
    var myLanguage =     //that should be LI
    Any idea how to get the info out of "settings"?
    Pull from it like it's an object.

    Code:
    var settings = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.myo.wug.plist"];
    
    var myAlert = settings.alert;
    var myAstro = settings.astro;
    var myLanguage = settings.language;
    or a little cleaner

    Code:
    var settings = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.myo.wug.plist"];
    var myAlert = settings.alert, myAstro = settings.astro, myLanguage = settings.language;
    Last edited by June'sIphone; 2015-01-19 at 01:36 AM.

  18. The Following 4 Users Say Thank You to June'sIphone For This Useful Post:

    Doesel (2015-01-19), metaserph (2015-01-19), NewD (2015-01-19), rasputin007 (2015-01-19)

  19. #55
    I would further recommend creating cycript functions. For a couple reasons. 1. Seems that Cycript has a limit of 250+ lines. If you have more than this in a Cycript script it will cause safemode. 2. You only need Cycript to do one calculation or return one thing, the other stuff can be done in javascript.

    Example
    Code:
    <script type="text/cycript">
    getDict = function(){
        return [NSDictionary dictionaryWithContentsOfFile: @"/var/mobile/Library/Preferences/com.myo.wug.plist"];
    };
    </script>
    
    <script>
    var wugDict = getDict(), myAlert = wugDict.alert, myAstro = wugDict.astro, myLanguage = wugDict.language;
    </script>
    This also helps as you don't have to declare wugDict, myAlert, myAstro, myLanguage as globals.

    Code:
    function getWeather(){
        var wugDict = getDict();  // wugDict is now not a global variable.
    }
    I even believe (not tested tested here Edit fiddle - JSFiddle) you can access each object key by.

    Code:
    function getWeather(){
    var myAlert = getDict().alert;
    }
    In that case you wouldn't even need to create a variable, just use it where needed. For example an if statement;

    Code:
    if(getDict().alert === 1){
    //do something
    }
    else{
    // do something else
    }
    Last edited by June'sIphone; 2015-01-19 at 02:58 AM.

  20. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    NewD (2015-01-19), rasputin007 (2015-01-19)

  21. #56

  22. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    NewD (2015-01-19), rasputin007 (2015-01-19)

  23. #57
    Default help!how to put the code...
    Quote Originally Posted by June'sIphone View Post
    Question from reddit : Day 3 free weather lockscreen (Cydget) : iOSthemes


    "Anyway to disable default unlock?"


    Yes. When I added the draggable object, I had to included evt.preventDefault(); which would stop the whole lockscreen from scrolling when the div (the slider) was moved.

    To stop the lockscreen itself from moving (which would stop the standard unlock mechanism) you need to create a transparent div that would get the touch. Before the last div in the body add a new div.

    Code:
    <div id="bg"ontouchstart="drag.startMoving(this, 'container', event);"></div>
    The div needs to have ontouchstart to start the drag code (which has the evt.preventDefault()

    In the css you need to size the div and place it below everything by adding z-index:-1;

    Code:
    #bg{
            background-color: transparent;
            width:320px;
            height: 568px;
            z-index: -1;
        }
    Since I added the option to show the arrow when someone drags the slider you will need to change this so it does not show when the #bg is touched.

    Code:
    startMoving : function(div, container, evt){
    
    
                if(div.id == "bg"){
                }
                else{
                    getEL('arrow').style.display="block";
                }
    
    
                evt = evt || window.event;
    for this just add an if statement. If the div.id == "bg" then don't show the arrow.
    Hi Sir June,kindly help me to locate where to put the code/instruction you've given us..screenshot may do..Thank you so much for the cydgets theme..

  24. #58
    Quote Originally Posted by June'sIphone View Post
    I would further recommend creating cycript functions. For a couple reasons. 1. Seems that Cycript has a limit of 250+ lines. If you have more than this in a Cycript script it will cause safemode. 2. You only need Cycript to do one calculation or return one thing, the other stuff can be done in javascript.

    Example
    Code:
    <script type="text/cycript">
    getDict = function(){
        return [NSDictionary dictionaryWithContentsOfFile: @"/var/mobile/Library/Preferences/com.myo.wug.plist"];
    };
    </script>
    
    <script>
    var wugDict = getDict(), myAlert = wugDict.alert, myAstro = wugDict.astro, myLanguage = wugDict.language;
    </script>
    This also helps as you don't have to declare wugDict, myAlert, myAstro, myLanguage as globals.

    Code:
    function getWeather(){
        var wugDict = getDict();  // wugDict is now not a global variable.
    }
    I even believe (not tested tested here Edit fiddle - JSFiddle) you can access each object key by.

    Code:
    function getWeather(){
    var myAlert = getDict().alert;
    }
    In that case you wouldn't even need to create a variable, just use it where needed. For example an if statement;

    Code:
    if(getDict().alert === 1){
    //do something
    }
    else{
    // do something else
    }
    Thanks, that looks good. I will try that, as your first answer still gives me the same error message I got for hours. Hence I got stuck.
    The error message was
    Code:
    TypeError:null is not an object (evaluating 'document.getElementById("alert").innerHTML=alert;')
    My plist file has 10 keys, 2 are strings (api key and language)and 8 are on/off switches saved as either true or false in the plist file, but displayed as 0 or 1 in settings.

    9 out of these 10 Settings menu will determine the url address.
    This is how I read the plist file with shell script
    Code:
    plutil -key alerts /private/var/mobile/Library/Preferences/com.myo.wug.plist >/var/mobile/wug/alert.txt
    if [ `cat /var/mobile/wug/alert.txt` = "1" ]
    then
    ALERT="/alerts"
    else
    ALERT=""
    fi
    Depending on the value, 0 or 1, they either - if switch is On and value is 1 - are in the url - here it would be .../alerts..., or they are empty in the url when the value is 0 , switch is set to Off.
    I want to do the same with javascript.
    Currently I use jquery.get to read those txt files in /var/mobile/wug and those set the url for the touch update. So I have a shell script that updates every 5 minutes (when connected), but I also have a touch update on the LS to get the latest weather for the current GPS position (using the cycript code).
    Example of this on the iPad mini


    The cycript function limitation, would that also apply if all cycript text is placed in an external cy file rather then in the html?

    EDIT:
    Still no success!
    Back to your original solution and with document(dot)write(dot)(settings) I get this LS

    I also attach the com.myo.wug.plist.
    Attached Files Attached Files
    Last edited by rasputin007; 2015-01-19 at 01:55 PM.
    Nothing is impossible only miracles take a bit longer!

  25. #59
    What's Jailbreak?
    Join Date
    Feb 2012
    Location
    Cologne
    Posts
    19
    Thanks
    13
    Thanked 3 Times in 3 Posts

    First of all - you absolutely rock Amazing how you are helping us out there...

    Short question: how do you preview your work in "real-time"? If I open the index.html (firefox) it is empty. Just downloaded sublime2 but can't find an option to preview stuff in there?!
    Thanks in advance!

  26. #60
    Some posts seem chinese for me.
    Is that all beauties can be used with lockhtml4 or groovylock?

Page 3 of 10 FirstFirst 12345 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •