Plugin Directory

Changeset 1298024


Ignore:
Timestamp:
12/01/2015 06:42:16 AM (10 years ago)
Author:
roidayan
Message:

allow to specify hours for time

Location:
simple-youtube/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • simple-youtube/trunk/inc/youtube.playlist.js

    r1113795 r1298024  
    2222    if (typeof(time) === 'number')
    2323        return parseInt(time);
    24     var s = time.split(':');
    25     if (s.length == 1)
    26         return parseInt(s);
    27     return parseInt(s[0])*60 + parseInt(s[1]);
     24    var time_parts = time.split(':').reverse();
     25    if (time_parts.length == 1)
     26        return parseInt(time_parts);
     27    s = parseInt(time_parts[0]) || 0;
     28    m = (parseInt(time_parts[1]) || 0) * 60;
     29    h = (parseInt(time_parts[2]) || 0) * 60 * 60;
     30    return s+m+h;
    2831}
    2932
  • simple-youtube/trunk/readme.txt

    r1266576 r1298024  
    55Requires at least: 3.2.1
    66Tested up to: 4.3.1
    7 Stable tag: 1.5.6
     7Stable tag: 1.5.7
    88
    99Simple youtube plugin to help embed youtube videos
     
    5858== Changelog ==
    5959
     60= 1.5.7 =
     61* Allow to specify time with hours like 00:00:00 instead of just 00:00
     62
    6063= 1.5.6 =
    6164* Accept dash and underscore for video id in urls.
  • simple-youtube/trunk/simple-youtube.php

    r1266576 r1298024  
    44Plugin URI: http://roidayan.com
    55Description: YouTube with playlist
    6 Version: 1.5.6
     6Version: 1.5.7
    77Author: Roi Dayan
    88Author URI: http://roidayan.com
Note: See TracChangeset for help on using the changeset viewer.